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

用户id获取

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