lex 1 year ago
parent
commit
397c13c0a7
1 changed files with 4 additions and 5 deletions
  1. 4 5
      src/helpers/utils.ts

+ 4 - 5
src/helpers/utils.ts

@@ -5,15 +5,14 @@ import qs from 'query-string';
 export function vaildMusicScoreUrl() {
   const url: string = window.location.href;
   let returnUrl = '';
-  if (/kt.colexiu.com/.test(url)) {
-    returnUrl = 'https://mec.colexiu.com';
-  } else if (/test/.test(url)) {
-    // dev 环境
+  if (/test/.test(url) || /localhost/.test(url)) {
+    // test 环境
     returnUrl = 'https://test.kt.colexiu.com';
   } else if (/dev/.test(url)) {
     returnUrl = 'https://dev.kt.colexiu.com';
+  } else if (/kt.colexiu.com/.test(url)) {
+    returnUrl = 'https://mec.colexiu.com';
   } else {
-    // 默认dev环境
     returnUrl = 'https://mec.colexiu.com';
   }
   return returnUrl;