配置免密登录

main
15004070936 5 days ago
parent b01a431ede
commit 1d13e8361e

@ -535,26 +535,21 @@
}); });
return; return;
} }
console.log(12)
// 2. // 2.
if (this.smsCountdown > 0) { if (this.smsCountdown > 0) {
return; return;
} }
console.log(34)
// 3. // 3.
uni.showLoading({ uni.showLoading({
title: '发送中...' title: '发送中...'
}); });
try { try {
console.log(56)
const { const {
data: res data: res
} = await uni.$http.post('/sms/sendCode', { } = await uni.$http.post('/sms/sendCode', {
phone: phone phone: phone
}); });
console.log(78)
uni.hideLoading(); uni.hideLoading();
console.log(9)
if (res && res.code === 200) { if (res && res.code === 200) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '验证码已发送', title: '验证码已发送',
@ -563,6 +558,15 @@
}); });
// //
this.startCountdown(); this.startCountdown();
} else if (res && res.code === 201) {
this.$refs.uToast.show({
title: '验证码已发送',
type: 'success',
duration: 2000
});
//
this.startCountdown();
this.form.smsCode=res.data
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.msg || '发送失败,请重试', title: res.msg || '发送失败,请重试',

Loading…
Cancel
Save