优化代码

master
Lee-1203 2022-03-09 15:48:29 +08:00
parent 948ca2bc67
commit afc5604e99
13 changed files with 14 additions and 28 deletions

View File

@ -84,7 +84,7 @@ Page({
console.log(res,'绑定数据') console.log(res,'绑定数据')
if (res.code == 0) { if (res.code == 0) {
// 跳转页面 // 跳转页面
dd.navigateTo ({ dd.redirectTo ({
url: '/pages/home/home' url: '/pages/home/home'
}) })
} }

View File

@ -15,7 +15,7 @@ textarea::-webkit-input-placeholder{
z-index: 998; z-index: 998;
} }
.login-txt{ .login-txt{
padding: 0.4rem; padding: 1rem 0.4rem 0;
min-height: 6.6rem; min-height: 6.6rem;
} }
.login-txt .logo{ .login-txt .logo{

View File

@ -94,12 +94,12 @@ Page({
}) })
if(dd.$toolAll.getCache('userinfo').mobile !== ''){ if(dd.$toolAll.getCache('userinfo').mobile !== ''){
// 跳转页面 // 跳转页面
dd.navigateTo ({ dd.redirectTo ({
url: '/pages/home/home' url: '/pages/home/home'
}) })
}else{ }else{
// 跳转到绑定手机号页面 // 跳转到绑定手机号页面
dd.navigateTo ({ dd.redirectTo ({
url: '/pages/login/bind/bind' url: '/pages/login/bind/bind'
}) })
} }
@ -193,7 +193,7 @@ Page({
dd.$http.post('/api/common/send-sms-captcha',params).then(res=>{ dd.$http.post('/api/common/send-sms-captcha',params).then(res=>{
console.log(res,'验证码数据') console.log(res,'验证码数据')
// 跳转页面 // 跳转页面
dd.navigateTo ({ dd.redirectTo ({
url: '/pages/login/verification/verification?phone='+this.data.phoneNumber+'&code='+res.data.code url: '/pages/login/verification/verification?phone='+this.data.phoneNumber+'&code='+res.data.code
}) })
}) })

View File

@ -89,7 +89,7 @@ Page({
dd.$toolAll.setCache('centerUserData',res.data); dd.$toolAll.setCache('centerUserData',res.data);
dd.$toolAll.setCache('userData',res.data); dd.$toolAll.setCache('userData',res.data);
// 跳转页面 // 跳转页面
dd.navigateTo ({ dd.redirectTo ({
url: '/pages/home/home' url: '/pages/home/home'
}) })
} }

View File

@ -1,3 +0,0 @@
<view>
New Page
</view>

View File

@ -1,4 +0,0 @@
Page({
data: {},
onLoad() {},
});

View File

@ -1,3 +0,0 @@
{
"usingComponents": {}
}

View File

@ -1,3 +0,0 @@
<view>
New Page
</view>

View File

@ -1,4 +0,0 @@
Page({
data: {},
onLoad() {},
});

View File

@ -1,3 +0,0 @@
{
"usingComponents": {}
}

View File

@ -14,8 +14,14 @@ Page({
}) })
}, 2000); }, 2000);
setTimeout(() => { setTimeout(() => {
// 前往登录页 if(dd.$toolAll.getCache('userinfo')){
dd.redirectTo({url:'/pages/login/login'}); // 前往首页
dd.redirectTo({url:'/pages/home/home'});
}else{
// 前往登录页
dd.redirectTo({url:'/pages/login/login'});
}
}, 3000); }, 3000);
}, },
onLoad() { onLoad() {