lex před 2 roky
rodič
revize
0b32609e0f
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

@@ -128,25 +128,22 @@ export const dateFormat = (
 }
 
 export function vaildTeachingUrl() {
-  let url = window.location.href
+  const url = window.location.href
   let returnUrl = ''
   if (/dev/.test(url)) {
     //线上
     returnUrl = 'https://dev.colexiu.com'
-    return returnUrl
-  } else if (/colexiu/.test(url)) {
+  } else if (/ponline/.test(url)) {
+    returnUrl = 'https://ponline.colexiu.com'
+  } else if (/online/.test(url)) {
     // dev 环境
     returnUrl = 'https://online.colexiu.com'
-
-    return returnUrl
   } else if (/test/.test(url)) {
     // dev 环境
     returnUrl = 'https://dev.colexiu.com'
-    return returnUrl
   } else {
     // 默认dev环境
     returnUrl = 'https://dev.colexiu.com'
-    return returnUrl
   }
   return returnUrl
 }