11wqe1 1 week geleden
bovenliggende
commit
4f79c56e08

File diff suppressed because it is too large
+ 0 - 0
dist/css/app.961db2dd.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.713539e7.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.b7a85d14.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.6bc1e272.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.961db2dd.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) {

File diff suppressed because it is too large
+ 0 - 0
dist/js/app.6bc1e272.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.6bc1e272.js.map


+ 4 - 0
src/common/apiConfig.js

@@ -129,6 +129,10 @@ export const API_CONFIG = {
   ajax_liYuanOrg: {
     functionName: "select_liYuanOrg",
   },
+  //无后缀登录时查询是否是账户
+  ajax_liYuanAcc: {
+    functionName: "select_liYuanAcc",
+  },
   //随机码登录查询课程学生账户
   ajax_selectCourseByIc2: {
     functionName: "selectCourseByIc2",

+ 2 - 1
src/lang/cn.json

@@ -138,5 +138,6 @@
 	"Totalforms": "表单总量",
 	"Formrate": "表单回收率",
 	"Intelfrequency": "智能回答次数",
-	"backoldversion":"确定回到旧版吗?"
+	"backoldversion":"确定回到旧版吗?",
+	"liyuanAccMore":"校区账号多出,请联系管理员"
 }

+ 2 - 1
src/lang/en.json

@@ -138,5 +138,6 @@
   "Totalforms": "Total forms",
   "Formrate": "Form response rate",
   "Intelfrequency": "Intelligent response frequency",
-	"backoldversion":"Are you sure to go back to the old version?"
+	"backoldversion":"Are you sure to go back to the old version?",
+	"liyuanAccMore":"There are multiple campus accounts, please contact the administrator"
 }

+ 3 - 1
src/lang/hk.json

@@ -138,5 +138,7 @@
   "Totalforms": "表單總量",
   "Formrate": "表單回收率",
   "Intelfrequency": "智能回答次數",
-  "backoldversion":"確定回到舊版嗎?"
+  "backoldversion":"確定回到舊版嗎?",
+  "liyuanAccMore":"校区账号多出,请联系管理员"
+
 }

+ 2 - 1
src/mixins/mixin.js

@@ -7,7 +7,8 @@ export const myMixin = {
       return Object.keys(this.userinfo).length != 0 ? this.userinfo : this.userJson
     },
     prefixL(){
-        let liyuan = window.topU.location.href.includes("lyxx")
+      
+        let liyuan = window.topU ? window.topU.location.href.includes("lyxx") : window.parent ? window.parent.location.href.includes("lyxx") : '';
         // let liyuan = window.location.href.includes("lyxx")
         let newArr = ''
         if (liyuan) {

+ 1 - 0
src/views/HomeView.vue

@@ -346,6 +346,7 @@ export default {
 								message: this.lang.Exitsu,
 								type: "success",
 							});
+							this.loading = true;
 							await this.logout();
 							// this.$router.push("/login");
 						})

+ 51 - 59
src/views/login/loginPage.vue

@@ -74,7 +74,6 @@
 							<div class="fa_i_item">
 								<span>{{ lang.account }}</span>
 								<div>
-									<!-- @change="getOrgData" -->
 									<input
 										type="text"
 										:placeholder="lang.enteraccount"
@@ -470,16 +469,6 @@ export default {
 				this.orginfo = [];
 				this.org = "";
 			}
-			// let res = await getliyuanCode({ mode: this.SuffixData });
-			// console.log("res.data", res.data);
-
-			// if (res.data[0].length && this.SuffixData) {
-			// 	this.orginfo = res.data[0];
-			// 	this.org = this.orginfo[0].mail;
-			// } else {
-			// 	this.orginfo = [];
-			// 	this.org = "";
-			// }
 		},
 		async loginFn() {
 			if (this.loading) return;
@@ -496,10 +485,15 @@ export default {
 			this.loading = true;
 
 			// if (this.loginType != 'orgL') {
-			if ((await this.getOrgData()) == 2){
+			// 返回2说明要使用组织号登录 3荔园多账户
+			let ku = (await this.getOrgData()) == 2
+			if (ku == 2){
 				this.loading = false;
 				return (this.loginType = "orgL");
-			} 
+			} else if(ku == 3){
+				this.loading = false;
+				return 
+			}
 			// }
 			
 			if (this.account.length <= 0) {
@@ -748,7 +742,8 @@ export default {
 			return new Promise((resolve) => {
 				let params = [
 					{
-						functionName: API_CONFIG.ajax_liYuanOrg.functionName,
+						
+						functionName: API_CONFIG.ajax_liYuanAcc.functionName,
 						uname: this.account,
 					},
 				];
@@ -756,70 +751,66 @@ export default {
 					.post(API_CONFIG.baseUrl, params)
 					.then((res) => {
 						console.log("res", res);
-						// 组织号登陆时不清空
+						// 组织号登陆时不清空,非组织号登陆时清空
 						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 = getList;
-						if (this.OrgOptions.length == 0){
+						this.OrgOptions = res.data[0];
+						// 返回0时说明没有账户,提示为未创建账号
+						if (this.OrgOptions.num == 0){
 							this.loading = false
 							return this.$message.error(
 								this.lang.Accnotfound
 							);
 						}
-							
+						// 组织号登录时返回 1,就说明在使用组织号登录了,不用再赋值组织号了
 						if (this.loginType == "orgL") return resolve(1);
 
-						if (this.OrgOptions.length == 1) {
+						if (this.OrgOptions.num == 1) {
 							this.org = this.OrgOptions[0].Uorg;
-						} else if (this.OrgOptions.length > 0) {
+						} else if (this.OrgOptions.num > 0) {
 							// liyuan走这里
 							if (this.allowOrgList.findIndex((i) => i.area) != -1) {
-								// console.log('1111');
-								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
-									);
-								}
+
+								// // console.log('1111');
+								// 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
+								// 	);
+								// }
+								this.$message.error(this.lang.liyuanAccMore);
+								// return resolve(2);
 							} else {
 								// admin走这里
 
-								let mergedList = this.allowOrgList.reduce((acc, curr) => {
-									return [...acc, ...curr.list];
-								}, []);
+								// let mergedList = this.allowOrgList.reduce((acc, curr) => {
+								// 	return [...acc, ...curr.list];
+								// }, []);
+								// console.log('admin走这里',mergedList);
+								
 
-								if (
-									this.OrgOptions.filter((i) => !mergedList.includes(i.id))
-										.length == 1
-								){
+								// // 如果mergedList包含账号中的id说明他是荔园的账户需要使用荔园网址登录
+								// if (
+								// 	this.OrgOptions.filter((i) => !mergedList.includes(i.id))
+								// 		.length == 1
+								// ){
 									this.loading = false
-									return this.$message.error(
-										this.lang.Accountcannot
-									);
-								}
+								// 	return this.$message.error(
+								// 		this.lang.Accountcannot
+								// 	);
+								// }
+								// // 提示该账户要使用组织号登录
 								this.$message.error(this.lang.accountmustOrg);
 								this.loginType = "orgL";
 								return resolve(2);
@@ -916,7 +907,8 @@ export default {
 					// }
 
 					if (this.allowOrgList.findIndex((i) => i.area) != -1) {
-						let _index = this.allowOrgList.findIndex((i) => i.area);
+						// 查找数组中满足条件的第一个元素的索引 0
+						let _index = this.allowOrgList.findIndex((i) => i.area);				
 						let _list = this.allowOrgList[_index].list;
 						if (
 							this.OrgOptions.find((i) => i.Uorg == this.org) &&

Some files were not shown because too many files changed in this diff