跳转登录时先登入组织再获取用户信息

This commit is contained in:
dong 2023-03-23 10:09:03 +08:00
parent 2aadaaf100
commit e3d8637ffe

View File

@ -203,9 +203,18 @@ export default {
if (orgList.length < 2) { if (orgList.length < 2) {
if (orgList.length === 1) { if (orgList.length === 1) {
orgId = orgList[0].orgId; orgId = orgList[0].orgId;
selectOrgnization(orgId); selectOrgnization(orgId).then(() => { //
}
this.handleLoginSucessRoute(); this.handleLoginSucessRoute();
}).catch(err => {
this.loading = false;
this.tipsMsg = `登入组织失败!,${err.message}`;
setTimeout(() => {
this.tipsMsg = '';
}, 5000);
});
} else {
this.handleLoginSucessRoute();
}
} else { } else {
this.$emit('showOrgList', orgList); this.$emit('showOrgList', orgList);
} }
@ -216,8 +225,17 @@ export default {
}, },
// //
selectOrg(orgId) { selectOrg(orgId) {
// this.handleLoginSucessRoute();
// selectOrgnization(orgId);
selectOrgnization(orgId).then(() => { //
this.handleLoginSucessRoute(); this.handleLoginSucessRoute();
selectOrgnization(orgId); }).catch(err => {
this.loading = false;
this.tipsMsg = `登入组织失败!,${err.message}`;
setTimeout(() => {
this.tipsMsg = '';
}, 5000);
});
}, },
// //
handleLoginSucessRoute() { handleLoginSucessRoute() {