diff --git a/pages/home/home.js b/pages/home/home.js index 974568a..4f92425 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -28,10 +28,10 @@ Page({ dd.$toolAll.removeCache('userData'); dd.$toolAll.removeCache('isInFirst'); // 钉钉跳转 - dd.navigateTo({url: '/pages/login/login'}); - }else if(e.detail.name !== 'clearAll' && e.detail.name !== ''){ + dd.redirectTo({url: '/pages/login/login'}); + }else if(e.detail.name == 'downImg'){ dd.downloadFile({ - url: e.detail.name, + url: e.detail.url, success({ filePath }) { dd.previewImage({ urls: [filePath], diff --git a/pages/login/bind/bind.acss b/pages/login/bind/bind.acss index 71e3cd1..acf6422 100644 --- a/pages/login/bind/bind.acss +++ b/pages/login/bind/bind.acss @@ -4,6 +4,7 @@ textarea::-webkit-input-placeholder{ } .verification{ background-color: #f1f4f7; + height: 100vhhaode ; } .phone-bg{ padding: 0 .4rem; @@ -43,8 +44,6 @@ textarea::-webkit-input-placeholder{ width: calc(100% - 3.6rem); } - - .login-btns{ width: 6.8rem; margin: .5rem auto 0; @@ -59,6 +58,11 @@ textarea::-webkit-input-placeholder{ font-size: .32rem; color: #FFFFFF; } +.login-btns>view:last-child{ + background-color: rgba(255, 255, 255, 0); + margin-top: .2rem; + color: #999; +} .addr-select-bg{ width: 100vw; height: 100%; diff --git a/pages/login/bind/bind.axml b/pages/login/bind/bind.axml index 26674b5..74e0820 100644 --- a/pages/login/bind/bind.axml +++ b/pages/login/bind/bind.axml @@ -15,6 +15,7 @@ 确认 + 跳过 diff --git a/pages/login/bind/bind.js b/pages/login/bind/bind.js index 162db40..f4bb1a0 100644 --- a/pages/login/bind/bind.js +++ b/pages/login/bind/bind.js @@ -166,4 +166,12 @@ Page({ openPhoneTips: false, }) }, + + // 跳过绑定 + passBind(){ + // 跳转页面 + dd.redirectTo ({ + url: '/pages/home/home' + }) + }, }); diff --git a/pages/login/verification/verification.axml b/pages/login/verification/verification.axml index 101e85e..2ee75f0 100644 --- a/pages/login/verification/verification.axml +++ b/pages/login/verification/verification.axml @@ -12,11 +12,11 @@ - + {{count}}秒后可重新获取验证码 - 获取验证码 + 获取验证码 diff --git a/pages/login/verification/verification.js b/pages/login/verification/verification.js index cf67ccf..f80e410 100644 --- a/pages/login/verification/verification.js +++ b/pages/login/verification/verification.js @@ -45,16 +45,20 @@ Page({ show: true }) },1000); - } + }; + }, // 获取验证码 bindValueInput(e){ this.setData({ value: e.detail.value, }); + if(this.data.value.length==4){ + this. handleInput(); + } + }, - // 输入完成获取数据 handleInput() { if(this.data.code == this.data.value){ this.hideKeyboard(); @@ -71,6 +75,37 @@ Page({ }, 1000) } }, + getCode(){ + let params = { + phone: this.data.phoneData, + type: "login", + } + dd.$http.post('/api/common/send-sms-captcha',params).then(res=>{ + console.log(res,'验证码数据') + if (!this.data.timer) { + this.setData({ + count: 60, + show: true + }) + let that = this; + const countDown = setInterval(() => { + if(that.data.count <= 1){ + that.setData({ + count:60, + show: false + }) + clearInterval(countDown) + return + } + that.data.count -- + that.setData({ + count: that.data.count, + show: true + }) + },1000); + } + }) + }, // 登录 hideKeyboard() { @@ -86,7 +121,6 @@ Page({ dd.$toolAll.setCache('token',res.data.token); // 缓存用户信息 dd.$toolAll.setCache('userinfo',res.data); - dd.$toolAll.setCache('centerUserData',res.data); dd.$toolAll.setCache('userData',res.data); // 跳转页面 dd.redirectTo ({ diff --git a/pages/start/start.js b/pages/start/start.js index 84bd075..a85995d 100644 --- a/pages/start/start.js +++ b/pages/start/start.js @@ -20,20 +20,20 @@ Page({ dd.$toolAll.setCache('isInFirst',60000000000000); if(dd.$toolAll.getCache('userData')){ // 前往首页 - dd.redirectTo({url:'/pages/home/home'}); + dd.navigateTo({url:'/pages/home/home'}); }else{ // 前往登录页 - dd.redirectTo({url:'/pages/login/login'}); + dd.navigateTo({url:'/pages/login/login'}); } }, 3000); }else{ if(dd.$toolAll.getCache('userData')){ // 前往首页 - dd.redirectTo({url:'/pages/home/home'}); + dd.navigateTo({url:'/pages/home/home'}); }else{ // 前往登录页 - dd.redirectTo({url:'/pages/login/login'}); + dd.navigateTo({url:'/pages/login/login'}); } } },