Kaynağa Gözat

修改地址

lex 1 yıl önce
ebeveyn
işleme
d260895ef2
1 değiştirilmiş dosya ile 4 ekleme ve 7 silme
  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;
 }