Commit e8148734 authored by 罗超's avatar 罗超

2

parent 337c8164
...@@ -106,22 +106,19 @@ ...@@ -106,22 +106,19 @@
Toast.fail("请输入密码"); Toast.fail("请输入密码");
return; return;
} }
let res = await this.$request('/AppletLogin/Login', msg) let res = await this.$request('/AppletLogin/Login', msg).then(res=>{
if (res) { if(res.Code==1){
res.Data.Account = msg.Account; res.Data.Account = msg.Account;
try {
uni.setStorageSync("userInfo", res.Data); uni.setStorageSync("userInfo", res.Data);
} catch (e) { Toast.success("登录成功");
console.log(e, "eeeee"); setTimeout(() => {
let data = uni.getStorageSync("userInfo");
if (data) {
that.jumpPage();
}
}, 1000);
} }
Toast.success("登录成功"); })
setTimeout(() => {
let data = uni.getStorageSync("userInfo");
if (data) {
that.jumpPage();
}
}, 1000);
}
}, },
login2() { login2() {
uni.login({ uni.login({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment