|
|
|
@ -125,26 +125,24 @@ export default { |
|
|
|
|
obtainCode() { |
|
|
|
|
if (this.countdown.num != 60) return; |
|
|
|
|
if (!this.checkParams(["username"])) return; |
|
|
|
|
serve.getVerifyCode({ username: this.params.username }).then((res) => { |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
|
icon: "none", |
|
|
|
|
}); |
|
|
|
|
this.params.verifyCodeToken = res.data.verifyCodeToken; |
|
|
|
|
|
|
|
|
|
let instance = setInterval(() => { |
|
|
|
|
if (!this.countdown.num) { |
|
|
|
|
clearInterval(instance); |
|
|
|
|
this.countdown.num = 60; |
|
|
|
|
return; |
|
|
|
|
let instance = setInterval(() => { |
|
|
|
|
if (!this.countdown.num) { |
|
|
|
|
clearInterval(instance); |
|
|
|
|
this.countdown.num = 60; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.countdown.num -= 1; |
|
|
|
|
}, 1000); |
|
|
|
|
} |
|
|
|
|
this.countdown.num -= 1; |
|
|
|
|
}, 1000); |
|
|
|
|
|
|
|
|
|
serve |
|
|
|
|
.verifyCodeLoginCheckAccountPersonal({ username: this.params.username }) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
|
}); |
|
|
|
|
this.params.verifyCodeToken = res.data.verifyCodeToken; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 自动登录 |
|
|
|
|
loginPersonal() { |
|
|
|
@ -183,11 +181,16 @@ export default { |
|
|
|
|
realLogin() { |
|
|
|
|
if (!this.checkParams(["username", "verifyCode"])) return; |
|
|
|
|
|
|
|
|
|
serve.verifyCodeLoginPersonal(this.params).then((res) => { |
|
|
|
|
if (res.code === 20000) { |
|
|
|
|
this.callbackLogin(res); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
serve |
|
|
|
|
.verifyCodeRegister({ |
|
|
|
|
unionId: uni.getStorageSync("unionid"), |
|
|
|
|
...this.params, |
|
|
|
|
}) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code === 20000) { |
|
|
|
|
this.callbackLogin(res); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
bindLoginByPhonePersonal(detail) { |
|
|
|
|
const params = { |
|
|
|
|