Browse Source

Merge branch 'iteration-20240530-http'

lex 1 năm trước cách đây
mục cha
commit
332c92a5e9
2 tập tin đã thay đổi với 6 bổ sung8 xóa
  1. 4 7
      src/helpers/utils.ts
  2. 2 1
      src/views/train-statistics/train-detail.tsx

+ 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;
 }

+ 2 - 1
src/views/train-statistics/train-detail.tsx

@@ -163,7 +163,8 @@ export default defineComponent({
         postMessage({
           api: 'openWebView',
           content: {
-            url: location.origin + `/accompany?school=1/#/report/${item.id}`,
+            url:
+              location.origin + `/accompany-web/?school=1/#/report/${item.id}`,
             orientation: 1,
             isHideTitle: true,
             statusBarTextColor: false,