瀏覽代碼

修改hk网址

11wqe1 2 周之前
父節點
當前提交
dc10582a70
共有 3 個文件被更改,包括 23 次插入7 次删除
  1. 4 4
      src/api/user.js
  2. 0 1
      src/config/env.development.js
  3. 19 2
      src/views/login/loginPage.vue

+ 4 - 4
src/api/user.js

@@ -1,10 +1,10 @@
 // axios
 import axios from '@/common/axios.config'
-import { baseApi,cocoApi } from '@/config'
+import { baseApi } from '@/config'
 
 // 用户信息 post 方法
 export function eduGet() {
-	return axios.get(cocoApi+"getcookieuserid");
+	return axios.get("//beta.api.cocorobo.cn/api/getcookieuserid");
 }
 // 获取组织
 export function GetSuffix(data) {
@@ -12,7 +12,7 @@ export function GetSuffix(data) {
 }
 
 export function eduLogout() {
-  return axios.post(cocoApi+'logout')
+  return axios.post('//beta.api.cocorobo.cn/api/logout')
 }
 export function eduGetUserinfo(rk) {
   return axios.get(`//api.edu.cocorobo.cn/edu/admin/userinfo/userinfoById/${rk}`)
@@ -20,7 +20,7 @@ export function eduGetUserinfo(rk) {
 
 // 退出登录
 export function loginOut(data) {
-  return axios.post(cocoApi+'logout',data)
+  return axios.post('//beta.api.cocorobo.cn/api/logout',data)
 }
 
 export function getUser(data) {

+ 0 - 1
src/config/env.development.js

@@ -6,7 +6,6 @@ module.exports = {
   baseApi: 'https://pbl.cocorobo.cn/api/pbl/', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
   // baseApi: '/', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
   // baseApi: 'http://localhost:7003/api/pbl/', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
-  cocoApi: parent?.location?.href.includes('hk') ? "https://cloud.api.cocorobo.hk/api/" : "//beta.api.cocorobo.cn/api/", // 判断使用接口网址
   APPID: 'xxx',
   APPSECRET: 'xxx',
   $cdn: 'https://imgs.solui.cn'

+ 19 - 2
src/views/login/loginPage.vue

@@ -526,6 +526,9 @@ export default {
 				let mergedList = this.allowOrgList.reduce((acc, curr) => {
 					return [...acc, ...curr.list];
 				}, []);
+				let str = this.account.replace(/(^\s*)|(\s*$)/g, "");
+				console.log('regEmail.test(str)',!regEmail.test(str),this.org);
+				
 				if (this.OrgOptions.find((i) => i.Uorg == this.org)) {
 					if (
 						mergedList.includes(
@@ -536,8 +539,22 @@ export default {
 						return this.$message.error(this.lang.Accountcannot);
 					}
 				} else {
-					this.loading = false;
-					return this.$message.error(this.lang.accountnotcreated);
+					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);
+					}
+
 				}
 			}