Browse Source

修复脉象绘制 3D 跨域 (https://wx.hzliuzhi.com/mz/hybrid/)

cc12458 3 months ago
parent
commit
98dd62c661
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/components/AnalysisPulseComponent.vue

+ 4 - 1
src/components/AnalysisPulseComponent.vue

@@ -23,10 +23,13 @@ const parseUrl = (value?: string) => {
   const [url, query = ''] = (value ?? report.value?.url)?.split('report.html') ?? [];
   const params = getURLSearchParamsByUrl(query);
   if (url && params.has('appId') && params.has('access_session')) {
+    const replace /* 绘制 3D 跨域 */ = () => [
+      `https://wx.hzliuzhi.com/mz/hybrid/`,
+    ].includes(url) ? 'https://hybrid.reborn-tech.com/' : url;
     return {
       appId: params.get('appId')!!,
       token: params.get('access_session')!!,
-      url: `${url}report.html#/`,
+      url: `${replace()}report.html#/`,
     };
   }
 };