Browse Source

修改链接

lex 10 months ago
parent
commit
4b395df08b
3 changed files with 8 additions and 11 deletions
  1. 6 9
      src/helpers/validate.ts
  2. 1 1
      src/main.ts
  3. 1 1
      vite.config.ts

+ 6 - 9
src/helpers/validate.ts

@@ -1,19 +1,16 @@
 // 学员地址
 export function vaildStudentUrl() {
-  const url = window.location.href;
+  const url = window.location.hostname;
   let returnUrl = '';
-  if (/online/.test(url)) {
-    //线上
-    returnUrl = 'https://mstuonline.dayaedu.com';
-  } else if (/dev/.test(url)) {
+  if (/dev/.test(url)) {
     // dev 环境
-    returnUrl = 'http://mstudev.dayaedu.com';
+    returnUrl = 'https://dev.gym.lexiaoya.cn/mdaya';
   } else if (/test/.test(url)) {
     // dev 环境
-    returnUrl = 'http://mstutest.dayaedu.com';
+    returnUrl = 'https://test.gym.lexiaoya.cn/mdaya';
   } else {
-    // 默认dev环境
-    returnUrl = 'http://mstudev.dayaedu.com';
+    // 默认线上环境
+    returnUrl = 'https://gym.lexiaoya.cn/mdaya';
   }
   return returnUrl;
 }

+ 1 - 1
src/main.ts

@@ -34,7 +34,7 @@ postMessage({ api: 'getNavHeight' }, (res: any) => {
 
 const url = window.location.href;
 const urlIsTeacher =
-  /mteaonline.dayaedu.com/.test(url) || /mteatest.dayaedu.com/.test(url)
+  /gym.lexiaoya.cn\/mteacher/.test(url) || /test.gym.lexiaoya.cn\/mteacher/.test(url)
     ? true
     : false;
 // const paymentType = (window as any).paymentType; // 浏览器设置

+ 1 - 1
vite.config.ts

@@ -14,7 +14,7 @@ function resolve(dir: string) {
 }
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
-const proxyUrl = 'https://test.dayaedu.com';
+const proxyUrl = 'https://test.gym.lexiaoya.cn';
 export default defineConfig({
   base: './',
   plugins: [