Commit c8c30e69 authored by 罗成兵's avatar 罗成兵

用户id获取

parent 2dcc8b96
......@@ -39,7 +39,7 @@ export default {
if (path != '/') {
return;
}
vm.getUserByToken(result);
vm.getUserByToken(result,false);
};
},
mounted() {
......@@ -58,7 +58,7 @@ export default {
domain: window.location.href
};
this.initUserInfo(userInfo,true);
this.getUserByToken(userInfo);
this.getUserByToken(userInfo,true);
} else {
let query = this.$route.query;
let userInfo = {
......@@ -80,15 +80,15 @@ export default {
this.msg = "账号获取失败!"
return;
}
this.getUserByToken(userInfo)
this.getUserByToken(userInfo,true)
}
}
},
getUserByToken(userInfo) {
getUserByToken(userInfo,isPc) {
getUserByToken(userInfo.token).then(res => {
if (res.code == 'SUCCESS') {
userInfo.userId = res.data
this.initUserInfo(userInfo,false);
this.initUserInfo(userInfo,isPc);
this.showMsg();
} else {
this.msg = "用户id获取失败!"
......
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