lex před 1 rokem
rodič
revize
d260895ef2
1 změnil soubory, kde provedl 4 přidání a 7 odebrání
  1. 4 7
      src/helpers/utils.ts

+ 4 - 7
src/helpers/utils.ts

@@ -136,20 +136,17 @@ export const toChinesNum = (num: any) => {
 
 // 教务地址
 export function vaildTeachingUrl() {
-  let url = window.location.href;
+  let url = window.location.hostname;
   let returnUrl = '';
-  if (/online/.test(url)) {
-    //线上
-    returnUrl = 'https://gym.lexiaoya.cn';
-  } else if (/dev/.test(url)) {
+  if (/dev/.test(url)) {
     // dev 环境
     returnUrl = 'http://dev.gym.lexiaoya.cn';
   } else if (/test/.test(url)) {
     // dev 环境
     returnUrl = 'http://test.gym.lexiaoya.cn';
   } else {
-    // 默认dev环境
-    returnUrl = 'http://test.gym.lexiaoya.cn';
+    // 默认线上环境
+    returnUrl = 'https://gym.lexiaoya.cn';
   }
   return returnUrl;
 }