Commit b62a2913 authored by zhengke's avatar zhengke

修改

parent 04d7232a
...@@ -59,8 +59,8 @@ export default { ...@@ -59,8 +59,8 @@ export default {
setup(props, context) { setup(props, context) {
let Toast = inject("$toast"); let Toast = inject("$toast");
let msg = reactive({ let msg = reactive({
Account: "18981921485", Account: "",
Password: "123456", Password: "",
}); });
let methods = { let methods = {
usernameInput(val) { usernameInput(val) {
...@@ -128,8 +128,12 @@ export default { ...@@ -128,8 +128,12 @@ export default {
let res = await login(msg); let res = await login(msg);
if (res) { if (res) {
res.Data.Account = msg.Account; res.Data.Account = msg.Account;
uni.clearStorage(); // uni.clearStorage();
uni.setStorageSync("userInfo", res.Data); try {
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");
......
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