提交 c6d6b89d 编写于 作者: 北巷晴's avatar 北巷晴

登录细节修改

上级 e5c7a648
......@@ -125,7 +125,7 @@
import {
mapMutations
} from 'vuex';
let interval;
export default {
data() {
return {
......@@ -174,7 +174,10 @@
console.log(this.is_wLogin)
},
methods: {
methods: {
checkboxChange(e) {
this.isCheck = !this.isCheck;
},
getCode() {
uni.login({
provider: "weixin",
......@@ -433,7 +436,7 @@
title: "发送成功",
duration: 2000,
success() {
this.time(); // 倒计时
that.time(); // 倒计时
}
});
});
......@@ -449,7 +452,6 @@
that.second = that.s;
clearInterval(interval);
} else {
console.log(that.second)
that.second--;
}
}, 1000)
......@@ -492,24 +494,34 @@
'type':that.codeForpwd==true?'smscode':'pwd',
'mobile': this.phone,
'pass': that.codeForpwd==true?that.code:that.pwd,
}, res => {
if (res.status > 0) {
uni.showToast({
icon: 'error',
title: res.msg,
duration: 2000
});
return;
}, res => {
if (res.status == 0) {
clearInterval(interval);
uni.setStorageSync('userinfo', res.data.userInfo);
if (res.data.sessid) {
uni.setStorageSync('sessionid', res.data.sessid);
}
uni.setStorageSync('phone', that.phone);
uni.showToast({
icon: 'none',
title: "登录成功",
});
setTimeout(() => {
uni.$emit('refreshData');
uni.navigateBack({
delta: 1
})
}, 2000);
} else {
uni.clearStorageSync();
uni.showToast({
icon: 'none',
title: res.msg,
duration: 2000
});
}
uni.showToast({
icon: 'success',
title: "登录成功",
duration: 2000,
success() {
that.navTo();
}
});
});
},
......@@ -696,7 +708,8 @@
width: 250upx;
font-size: $font-base + 5upx;
color: #838383;
border: none;
border: none;
text-align: left;
}
.btn-code {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册