提交 748e044e 编写于 作者: 芊里

头像更换

上级 23a3261d
......@@ -68,7 +68,7 @@
userTable.doc(this.userInfo._id)
.update(data)
.then(res=>{
console.log(res);
this.login(data)
})
.catch(err=>{
console.log(err);
......
......@@ -19,7 +19,8 @@ let state = {
},
mutations = {
login(state, info) {
state.info = info;
let _info = state.info;
state.info = Object.assign({}, _info, info);
state.hasLogin = true;
uni.setStorageSync('userInfo', info);
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册