Browse Source

修改过期账号登录与随机码文案

11wqe1 3 weeks ago
parent
commit
c99a9a18c1
4 changed files with 81 additions and 81 deletions
  1. 4 4
      src/lang/cn.json
  2. 4 4
      src/lang/en.json
  3. 4 4
      src/lang/hk.json
  4. 69 69
      src/views/login/loginPage.vue

+ 4 - 4
src/lang/cn.json

@@ -11,7 +11,7 @@
 	"Accpaslogin": "账号密码登录",
 	"WeChatLogin": "微信登录",
 	"OrgIDLogin": "组织号登录",
-	"randomcode": "随机码",
+	"randomcode": "课程识别码",
 	"Rancodelogin": "随机码登录",
 	"OrganizationNumber": "组织号",
 	"enterorgnumber": "请输入组织号",
@@ -43,9 +43,9 @@
 	"Bindingfailed": "绑定失败",
 	"Accnotfound": "未查询到账号,请检查是否填写错误或还未创建账号",
 	"choosecampus": "请选择校区",
-	"enterrandomcode": "请输入随机码",
-	"codecorrectly": "请正确填写随机码",
-	"codenotexist": "不存在此随机码",
+	"enterrandomcode": "请输入课程识别码",
+	"codecorrectly": "请正确填写课程识别码",
+	"codenotexist": "不存在此课程识别码",
 	"tip": "提示",
 	"loginaccount": "确定登录*的账号吗?",
 	"scancodeagain": "扫码登录失败请重新扫码",

+ 4 - 4
src/lang/en.json

@@ -11,7 +11,7 @@
   "Accpaslogin": "Account password login",
   "WeChatLogin": "WeChat login",
   "OrgIDLogin": "Organization ID login",
-  "randomcode": "Random code",
+  "randomcode": "Course identification code",
   "Rancodelogin": "Random code login",
   "OrganizationNumber": "Organization ID",
   "enterorgnumber": "Please enter organization ID",
@@ -43,9 +43,9 @@
   "Bindingfailed": "Binding failed",
   "Accnotfound": "Account not found. Please check if entered incorrectly or account not created yet",
   "choosecampus": "Please select campus",
-  "enterrandomcode": "Please enter random code",
-  "codecorrectly": "Please enter random code correctly",
-  "codenotexist": "This random code does not exist",
+  "enterrandomcode": "Please enter the course identification code",
+  "codecorrectly": "Please fill in the course identification code correctly",
+  "codenotexist": "This course identification code does not exist",
   "tip": "Tip",
   "loginaccount": "Confirm login to account *?",
   "scancodeagain": "Scan login failed. Please scan again",

+ 4 - 4
src/lang/hk.json

@@ -11,7 +11,7 @@
   "Accpaslogin": "賬號密碼登錄",
   "WeChatLogin": "微信登錄",
   "OrgIDLogin": "組織號登錄",
-  "randomcode": "隨機碼",
+  "randomcode": "課程識別碼",
   "Rancodelogin": "隨機碼登錄",
   "OrganizationNumber": "組織號",
   "enterorgnumber": "請輸入組織號",
@@ -43,9 +43,9 @@
   "Bindingfailed": "綁定失敗",
   "Accnotfound": "未查詢到賬號,請檢查是否填寫錯誤或還未創建賬號",
   "choosecampus": "請選擇校區",
-  "enterrandomcode": "請輸入隨機碼",
-  "codecorrectly": "請正確填寫隨機碼",
-  "codenotexist": "不存在此隨機碼",
+  "enterrandomcode": "請輸入課程識別碼",
+  "codecorrectly": "請正確填寫課程識別碼",
+  "codenotexist": "不存在此課程識別碼",
   "tip": "提示",
   "loginaccount": "確定登錄*的賬號嗎?",
   "scancodeagain": "掃碼登錄失敗請重新掃碼",

+ 69 - 69
src/views/login/loginPage.vue

@@ -198,7 +198,7 @@
 									<div v-else>
 										<input
 											type="text"
-											:placeholder="lang.enterorgnumber"
+											:placeholder="lang.Pleaseenter"
 											v-model.trim="SuffixData"
 											@input="getrandomcodeSuffix"
 										/>
@@ -777,23 +777,23 @@ export default {
 						// 	this.$message.error(this.lang.Nologinpermission);
 						// 	return;
 						// }
-						// const currentDate = new Date();
-						// if (
-						// 	userjson.isLogin1 == 2 ||
-						// 	(userjson.isLogin1 &&
-						// 	userjson.isLogin1 != 1 &&
-						// 	userjson.isLogin1 != 2 &&
-						// 	new Date(userjson.isLogin1) < currentDate) ||
-						// 	userjson.isLogin2 == 2 ||
-						// 	(userjson.isLogin2 != 1 &&
-						// 	userjson.isLogin2 != 2 &&
-						// 	new Date(userjson.isLogin2) < currentDate) ||
-						// 	userjson.state != 1
-						// ) {
-						// 	this.loading = false;
-						// 	console.log('666');
-						// 	return;
-						// }
+						const currentDate = new Date();
+						if (
+							userjson.data[0][0].isLogin1 == 2 ||
+							(userjson.data[0][0].isLogin1 &&
+							userjson.data[0][0].isLogin1 != 1 &&
+							userjson.data[0][0].isLogin1 != 2 &&
+							new Date(userjson.data[0][0].isLogin1) < currentDate) ||
+							userjson.data[0][0].isLogin2 == 2 ||
+							(userjson.data[0][0].isLogin2 != 1 &&
+							userjson.data[0][0].isLogin2 != 2 &&
+							new Date(userjson.data[0][0].isLogin2) < currentDate) ||
+							userjson.data[0][0].state != 1
+						) {
+							this.loading = false;
+							console.log('666');
+							return;
+						}
 
 						console.log("userjson", userjson);
 						if (_data.active === 1) {
@@ -880,23 +880,23 @@ export default {
 						// 	return;
 						// }
 
-						// const currentDate = new Date();
-						// if (
-						// 	userjson.isLogin1 == 2 ||
-						// 	(userjson.isLogin1 &&
-						// 	userjson.isLogin1 != 1 &&
-						// 	userjson.isLogin1 != 2 &&
-						// 	new Date(userjson.isLogin1) < currentDate) ||
-						// 	userjson.isLogin2 == 2 ||
-						// 	(userjson.isLogin2 != 1 &&
-						// 	userjson.isLogin2 != 2 &&
-						// 	new Date(userjson.isLogin2) < currentDate) ||
-						// 	userjson.state != 1
-						// ) {
-						// 	console.log('666');
-						// 	this.loading = false;
-						// 	return;
-						// }
+						const currentDate = new Date();
+						if (
+							userjson.data[0][0].isLogin1 == 2 ||
+							(userjson.data[0][0].isLogin1 &&
+							userjson.data[0][0].isLogin1 != 1 &&
+							userjson.data[0][0].isLogin1 != 2 &&
+							new Date(userjson.data[0][0].isLogin1) < currentDate) ||
+							userjson.data[0][0].isLogin2 == 2 ||
+							(userjson.data[0][0].isLogin2 != 1 &&
+							userjson.data[0][0].isLogin2 != 2 &&
+							new Date(userjson.data[0][0].isLogin2) < currentDate) ||
+							userjson.data[0][0].state != 1
+						) {
+							console.log('666');
+							this.loading = false;
+							return;
+						}
 						console.log("userjson", userjson);
 						if (_data.active === 1) {
 							await this.$ajax.post(API_CONFIG.baseUrl2 + "UpdateOpenId", [
@@ -1233,23 +1233,23 @@ export default {
 					// 	this.$message.error(this.lang.Nologinpermission);
 					// 	return;
 					// }
-					// const currentDate = new Date();
-					// 	if (
-					// 		userjson.isLogin1 == 2 ||
-					// 		(userjson.isLogin1 &&
-					// 		userjson.isLogin1 != 1 &&
-					// 		userjson.isLogin1 != 2 &&
-					// 		new Date(userjson.isLogin1) < currentDate) ||
-					// 		userjson.isLogin2 == 2 ||
-					// 		(userjson.isLogin2 != 1 &&
-					// 		userjson.isLogin2 != 2 &&
-					// 		new Date(userjson.isLogin2) < currentDate) ||
-					// 		userjson.state != 1
-					// 	) {
-					// 		console.log('666');
-					// 		this.loading = false;
-					// 		return;
-					// 	} 
+					const currentDate = new Date();
+						if (
+							userjson.data[0][0].isLogin1 == 2 ||
+							(userjson.data[0][0].isLogin1 &&
+							userjson.data[0][0].isLogin1 != 1 &&
+							userjson.data[0][0].isLogin1 != 2 &&
+							new Date(userjson.data[0][0].isLogin1) < currentDate) ||
+							userjson.data[0][0].isLogin2 == 2 ||
+							(userjson.data[0][0].isLogin2 != 1 &&
+							userjson.data[0][0].isLogin2 != 2 &&
+							new Date(userjson.data[0][0].isLogin2) < currentDate) ||
+							userjson.data[0][0].state != 1
+						) {
+							console.log('666');
+							this.loading = false;
+							return;
+						} 
 
 					console.log("userjson", userjson);
 					if (_data.active === 1) {
@@ -1471,23 +1471,23 @@ export default {
 						let _data = res.data[0][0];
 						let userjson = await getUser({ userid: _data.userid });
 
-						// const currentDate = new Date();
-						// if (
-						// 	userjson.isLogin1 == 2 ||
-						// 	(userjson.isLogin1 &&
-						// 	userjson.isLogin1 != 1 &&
-						// 	userjson.isLogin1 != 2 &&
-						// 	new Date(userjson.isLogin1) < currentDate) ||
-						// 	userjson.isLogin2 == 2 ||
-						// 	(userjson.isLogin2 != 1 &&
-						// 	userjson.isLogin2 != 2 &&
-						// 	new Date(userjson.isLogin2) < currentDate) ||
-						// 	userjson.state != 1
-						// ) {
-						// 	console.log('666');
-						// 	this.loading = false;
-						// 	return;
-						// }
+						const currentDate = new Date();
+						if (
+							userjson.data[0][0].isLogin1 == 2 ||
+							(userjson.data[0][0].isLogin1 &&
+							userjson.data[0][0].isLogin1 != 1 &&
+							userjson.data[0][0].isLogin1 != 2 &&
+							new Date(userjson.data[0][0].isLogin1) < currentDate) ||
+							userjson.data[0][0].isLogin2 == 2 ||
+							(userjson.data[0][0].isLogin2 != 1 &&
+							userjson.data[0][0].isLogin2 != 2 &&
+							new Date(userjson.data[0][0].isLogin2) < currentDate) ||
+							userjson.data[0][0].state != 1
+						) {
+							console.log('666');
+							this.loading = false;
+							return;
+						}
 						console.log("userjson", userjson);
 						if (_data.active === 1) {
 							window.localStorage["identity"] = JSON.stringify(_data.identity);