소스 검색

修改连接

lex 2 년 전
부모
커밋
0b32609e0f
1개의 변경된 파일4개의 추가작업 그리고 7개의 파일을 삭제
  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
 }