Pārlūkot izejas kodu

Merge branch 'iteration-20240603-bug' into jenkins

lex 1 gadu atpakaļ
vecāks
revīzija
215491c899
2 mainītis faili ar 36 papildinājumiem un 36 dzēšanām
  1. 1 1
      public/version.json
  2. 35 35
      src/utils/urlUtils.ts

+ 1 - 1
public/version.json

@@ -1 +1 @@
-{"version":1717552067344}
+{ "version": 1717552067344 }

+ 35 - 35
src/utils/urlUtils.ts

@@ -1,35 +1,35 @@
-export function vaildUrl() {
-  const url: string = window.location.href;
-  let returnUrl = '';
-  if (/test/.test(url)) {
-    // dev 环境
-    returnUrl = 'https://test.kt.colexiu.com';
-  } else if (/dev/.test(url)) {
-    returnUrl = 'https://dev.kt.colexiu.com';
-  } else if (/localhost/.test(url)) {
-    //   //本地环境
-    returnUrl = 'https://test.kt.colexiu.com';
-  } else {
-    // 默认dev环境
-    returnUrl = 'https://kt.colexiu.com';
-  }
-  return returnUrl;
-}
-
-export function vaildMusicScoreUrl() {
-  const url: string = window.location.href;
-  let returnUrl = '';
-
-  if (/test/.test(url)) {
-    // dev 环境
-    returnUrl = 'https://test.kt.colexiu.com';
-  } else if (/dev/.test(url)) {
-    returnUrl = 'https://dev.kt.colexiu.com';
-  } else if (/localhost/.test(url)) {
-    //   //本地环境
-    returnUrl = 'https://test.kt.colexiu.com';
-  } else {
-    returnUrl = 'https://mec.colexiu.com';
-  }
-  return returnUrl;
-}
+export function vaildUrl() {
+  const url: string = window.location.hostname;
+  let returnUrl = '';
+  if (/test/.test(url)) {
+    // dev 环境
+    returnUrl = 'https://test.kt.colexiu.com';
+  } else if (/dev/.test(url)) {
+    returnUrl = 'https://dev.kt.colexiu.com';
+  } else if (/localhost/.test(url)) {
+    //   //本地环境
+    returnUrl = 'https://test.kt.colexiu.com';
+  } else {
+    // 默认dev环境
+    returnUrl = 'https://kt.colexiu.com';
+  }
+  return returnUrl;
+}
+
+export function vaildMusicScoreUrl() {
+  const url: string = window.location.hostname;
+  let returnUrl = '';
+
+  if (/test/.test(url)) {
+    // dev 环境
+    returnUrl = 'https://test.kt.colexiu.com';
+  } else if (/dev/.test(url)) {
+    returnUrl = 'https://dev.kt.colexiu.com';
+  } else if (/localhost/.test(url)) {
+    //   //本地环境
+    returnUrl = 'https://test.kt.colexiu.com';
+  } else {
+    returnUrl = 'https://mec.colexiu.com';
+  }
+  return returnUrl;
+}