Pārlūkot izejas kodu

修改荔园登录判断

11wqe1 1 dienu atpakaļ
vecāks
revīzija
58f5942840
1 mainītis faili ar 9 papildinājumiem un 5 dzēšanām
  1. 9 5
      src/views/login/loginPage.vue

+ 9 - 5
src/views/login/loginPage.vue

@@ -483,13 +483,17 @@ export default {
 							// liyuan走这里
 							if(this.allowOrgList.findIndex((i) => i.area) != -1){
 								console.log('1111');
-								
-								let _index = this.allowOrgList.findIndex((i) => i.area);
-								let _list = this.allowOrgList[_index].list;
-								this.org = this.OrgOptions.filter(i=>_list.includes(i.id))[0].Uorg;
+								try {
+									let _index = this.allowOrgList.findIndex((i) => i.area);
+									let _list = this.allowOrgList[_index].list;
+									this.org = this.OrgOptions.filter(i=>_list.includes(i.id))[0].Uorg;
+								} catch (error) {
+									console.log(error);
+									return this.$message.error("账号不可登录,请使用您的专属网址");
+								}
 							}else{
 							// 	// admin走这里
-							// 	console.log('2222');
+								console.log('2222');
 								this.$message.error("该账号须使用“组织号登陆”");
 								this.loginType = 'orgL'
 							// 	let mergedList = this.allowOrgList.reduce((acc, curr) => {