11wqe1 vor 6 Tagen
Ursprung
Commit
8abf71f7ef

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/css/app.d567cfee.css


+ 1 - 1
dist/index.html

@@ -36,7 +36,7 @@
         width: 100%;
         background: #e6eaf0;
         font-family: '黑体';
-      }</style><script defer="defer" src="/js/chunk-vendors.ae4e118c.js"></script><script defer="defer" src="/js/app.af672bb5.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.b56be574.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but pblAdminTable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html><script>function stopSafari() {
+      }</style><script defer="defer" src="/js/chunk-vendors.ae4e118c.js"></script><script defer="defer" src="/js/app.50e49f05.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.d567cfee.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but pblAdminTable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/js/app.50e49f05.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/js/app.50e49f05.js.map


+ 50 - 72
src/views/login/loginPage.vue

@@ -550,11 +550,13 @@ export default {
 
 			// 荔园平台登录账号进行判断
 			if (this.allowOrgList.findIndex((i) => i.area) != -1) {
-				// 暂时多余的一步,还是取荔园校区数组
+				// 能到这里就是有账户而且取到后缀了
+
+				// 暂时多余的一步,还是取荔园校区数组(新)
 				let _index = this.allowOrgList.findIndex((i) => i.area);
 				let _list = this.allowOrgList[_index].list;
 				if (
-					!_list.includes(this.OrgOptions[0].id)
+					!_list.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)
 				) {
 					this.loading = false;
 					// 账号不可登录,请使用您的专属网址
@@ -565,10 +567,11 @@ export default {
 				// 	!_list.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)
 				// ) {
 				// 	this.loading = false;
-				// 账号不可登录,请使用您的专属网址
+				// // 账号不可登录,请使用您的专属网址
 				// 	return this.$message.error(this.lang.Accountcannot);
 				// }
 			} else {
+				// 这个是组织号登录时与账号登录只有一个时
 				// 非荔园登录时
 				// 取荔园校区list
 				let mergedList = this.allowOrgList.reduce((acc, curr) => {
@@ -579,48 +582,20 @@ export default {
 
 				// 这一步是为了判断登录时,账户是否在组织下有账户问题(但现在获取账户时那部分已经被隐藏,多账号返回数字,这行代码没用了)
 				// if (this.OrgOptions.find((i) => i.Uorg == this.org)) {
-				if (mergedList.includes(this.OrgOptions[0].id)) {
+				// console.log('555',this.OrgOptions.find((i) => i.Uorg == this.org).id);
+				if (this.org && this.OrgOptions.find((i) => i.Uorg == this.org) && mergedList.includes(this.OrgOptions.find((i) => i.Uorg == this.org).id)) {
+					this.loading = false;
+					// 账号不可登录,请使用您的专属网址
+					return this.$message.error(this.lang.Accountcannot);
+				}
+				
+				if (!this.org && this.OrgOptions.find((i) => mergedList.includes(i.id)) && this.OrgOptions.find((i) => mergedList.includes(i.id)).id) {
 					this.loading = false;
 					// 账号不可登录,请使用您的专属网址
 					return this.$message.error(this.lang.Accountcannot);
 				}
-
-				// } else {
-				// 	if (regEmail.test(str)) {
-				// 		if (this.OrgOptions.find((i) => i.Uorg == str)) {
-				// 			if (
-				// 				mergedList.includes(
-				// 					this.OrgOptions.find((i) => i.Uorg == str).id
-				// 				)
-				// 			) {
-				// 				this.loading = false;
-				// 				// 账号不可登录,请使用您的专属网址
-				// 				return this.$message.error(this.lang.Accountcannot);
-				// 			}
-				// 		}
-				// 	} else {
-				// 		this.loading = false;
-				// 		// 还未在此组织下创建账号,请先创建
-				// 		return this.$message.error(this.lang.accountnotcreated);
-				// 	}
-				// }
 			}
 
-			// let str = this.account.replace(/(^\s*)|(\s*$)/g, "");
-			// 组织号登录时,没有获取到后缀也没有手动填后缀(上面已经写过了)
-			// if (!this.org && !regEmail.test(str)) {
-			// 	// if (this.allowOrgList.findIndex((i) => i.area) != -1) {
-			// 	// 	// 请在账号后添加组织后缀(账号@组织号.com 如:123456@cocorobo.com)
-			// 		this.$message.error(this.lang.addsuffix);
-			// 	// } 
-			// 	// else {
-			// 	// 	// 该账号须使用“组织号登陆”
-			// 	// 	this.$message.error(this.lang.accountmustOrg);
-			// 	// 	this.loginType = "orgL";
-			// 	// }
-			// 	this.loading = false;
-			// 	return;
-			// }
 
 			let orgValue = this.org ? "@" + this.org : "@cocorobo.cc";
 			let email = "";
@@ -798,24 +773,6 @@ export default {
 					.post(API_CONFIG.baseUrl, params)
 					.then((res) => {
 						console.log("res", res);
-						// 组织号登陆时不清空(this.org只有组织号赋值,还有登陆时ajax_liYuanAcc赋值,所以非组织号登录时要清空,让他在下面赋值)
-						// if (this.loginType != "orgL") {
-						// 	this.org = "";
-						// }
-						// this.OrgOptions = [];
-
-						// let getList = res.data[0];
-
-						// if (this.allowOrgList.findIndex((i) => i.area) != -1) {
-						// 	let _index = this.allowOrgList.findIndex((i) => i.area);
-						// 	let _list = this.allowOrgList[_index].list;
-						// 	getList = getList.filter((i) => _list.includes(i.id));
-						// } else {
-						// 	let mergedList = this.allowOrgList.reduce((acc, curr) => {
-						// 		return [...acc, ...curr.list];
-						// 	}, []);
-						// 	getList = getList.filter((i) => !mergedList.includes(i.id));
-						// }
 
 						this.OrgOptions = res.data[0];
 
@@ -839,22 +796,33 @@ export default {
 							// 多账号时
 							// liyuan走这里
 							if (this.allowOrgList.findIndex((i) => i.area) != -1) {
-								// 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);
-								// 	this.loading = false
-								// 	return this.$message.error(
-								// 		this.lang.Accountcannot
-								// 	);
-								// }
+								// 有多个账号,但没有荔园的,就说明使用错网址了
+								if (this.OrgOptions[0].liyuannum == 0) {
+									this.$message.error(
+										// 账号不可登录,请使用您的专属网址
+										this.lang.Accountcannot
+									);
+									return resolve(2);
+								}
+
+								// 那这里就必有荔园账户了 
+								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);
+									this.loading = false
+									this.$message.error(
+										this.lang.Accountcannot
+									);
+									return resolve(2);
+								}
 								
-								this.$message.error(this.lang.liyuanAccMore);
-								return resolve(2);
+								// this.$message.error(this.lang.liyuanAccMore);
 							} else {
 								// admin走这里
 								// let mergedList = this.allowOrgList.reduce((acc, curr) => {
@@ -871,6 +839,14 @@ export default {
 								// 		this.lang.Accountcannot
 								// 	);
 								// }
+								// if (this.OrgOptions[0].liyuannum != 0) {
+								// 	this.$message.error(
+								// 		// 账号不可登录,请使用您的专属网址
+								// 		this.lang.Accountcannot
+								// 	);
+								// 	return resolve(2);
+								// }
+
 								// 该账号须使用“组织号登陆”
 								this.$message.error(this.lang.accountmustOrg);
 								this.loginType = "orgL";
@@ -956,6 +932,7 @@ export default {
 						let _index = this.allowOrgList.findIndex((i) => i.area);
 						let _list = this.allowOrgList[_index].list;
 						if (!_list.includes(this.OrgOptions[0].id)) {
+							// 账号不可登录,请使用您的专属网址
 							this.$message.error(this.lang.Accountcannot);
 							this.wechatLogin();
 							await loginOut();
@@ -975,6 +952,7 @@ export default {
 						if (
 							mergedList.includes(this.OrgOptions[0].id)
 						) {
+							// 账号不可登录,请使用您的专属网址
 							this.$message.error(this.lang.Accountcannot);
 							this.wechatLogin();
 							await loginOut();

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.