跳转登录时先登入组织再获取用户信息
This commit is contained in:
parent
2aadaaf100
commit
e3d8637ffe
@ -203,9 +203,18 @@ export default {
|
||||
if (orgList.length < 2) {
|
||||
if (orgList.length === 1) {
|
||||
orgId = orgList[0].orgId;
|
||||
selectOrgnization(orgId);
|
||||
selectOrgnization(orgId).then(() => { // 先登入组织,再跳转路由(跳转路由会获取用户信息,可能拿不到组织信息)
|
||||
this.handleLoginSucessRoute();
|
||||
}).catch(err => {
|
||||
this.loading = false;
|
||||
this.tipsMsg = `登入组织失败!,${err.message}`;
|
||||
setTimeout(() => {
|
||||
this.tipsMsg = '';
|
||||
}, 5000);
|
||||
});
|
||||
} else {
|
||||
this.handleLoginSucessRoute();
|
||||
}
|
||||
this.handleLoginSucessRoute();
|
||||
} else {
|
||||
this.$emit('showOrgList', orgList);
|
||||
}
|
||||
@ -216,8 +225,17 @@ export default {
|
||||
},
|
||||
// 选择组织
|
||||
selectOrg(orgId) {
|
||||
this.handleLoginSucessRoute();
|
||||
selectOrgnization(orgId);
|
||||
// this.handleLoginSucessRoute();
|
||||
// selectOrgnization(orgId);
|
||||
selectOrgnization(orgId).then(() => { // 先登入组织,再跳转路由(跳转路由会获取用户信息,可能拿不到组织信息)
|
||||
this.handleLoginSucessRoute();
|
||||
}).catch(err => {
|
||||
this.loading = false;
|
||||
this.tipsMsg = `登入组织失败!,${err.message}`;
|
||||
setTimeout(() => {
|
||||
this.tipsMsg = '';
|
||||
}, 5000);
|
||||
});
|
||||
},
|
||||
// 跳转路由
|
||||
handleLoginSucessRoute() {
|
||||
|
Loading…
Reference in New Issue
Block a user