Commit e8148734 authored by 罗超's avatar 罗超

2

parent 337c8164
...@@ -106,14 +106,10 @@ ...@@ -106,14 +106,10 @@
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) {
console.log(e, "eeeee");
}
Toast.success("登录成功"); Toast.success("登录成功");
setTimeout(() => { setTimeout(() => {
let data = uni.getStorageSync("userInfo"); let data = uni.getStorageSync("userInfo");
...@@ -122,6 +118,7 @@ ...@@ -122,6 +118,7 @@
} }
}, 1000); }, 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