简易登录页

This commit is contained in:
sunliwei 2024-09-23 09:49:04 +08:00
parent 526787e232
commit eb468e35a3

View File

@ -81,65 +81,12 @@ export default{
if(res.code == 200){ if(res.code == 200){
setToken(res.data.accessToken) setToken(res.data.accessToken)
// this.userinfo()
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/index' url: '/pages/index/index'
}) })
} }
}) })
}, },
userinfo(){
request({
url: '/rescue/getRescueDriverInfo',
method: 'get',
}).then((res)=>{
if(res.code =='200'){
console.log(res)
uni.setStorageSync('driverInfo', res.data.driverInfo.id)
uni.setStorageSync('userId', res.data.user.id)
this.goselect()
}
})
},
getxz(index){
this.activeid = index
},
goregister(){
uni.navigateTo({
url:'/pages/login/register'
})
},
goforgot(){
uni.navigateTo({
url:'/pages/login/forgot'
})
},
goselect(){
console.log('去司机端首页');
uni.navigateTo({
url:'/pages/index/index'
})
},
disableButton() {
this.isButtonDisabled = true;
},
enableButton() {
this.isButtonDisabled = false;
},
startCountdown() {
let countdown = setInterval(() => {
this.countdownTime--;
if (this.countdownTime === 0) {
clearInterval(countdown);
this.enableButton(); //
}
}, 1000);
},
} }
} }