bill 1 year ago
parent
commit
2d1c5bb8a7
4 changed files with 15 additions and 9 deletions
  1. 9 5
      src/app/mirror/store/script.ts
  2. 1 2
      src/request/config.ts
  3. 3 0
      src/view/vrmodel/sceneDownload.vue
  4. 2 2
      vite.config.ts

+ 9 - 5
src/app/mirror/store/script.ts

@@ -59,15 +59,19 @@ export enum FirePaggingRoute {
 }
 
 export const getCaseScriptInfo = async (caseId) => {
-  let res = await axios.get(getCaseScriptInfoUrl, { params:{caseId, ingoreRes: true} });
+  let res = await axios.get(getCaseScriptInfoUrl, {
+    params: { caseId, ingoreRes: true },
+  });
   console.log(res);
-  if(res && res.code === 0) {
+  if (res && res.code === 0) {
     return res.data;
-  }else{ 
+  } else {
     // window.location.href = '/'
     throw "用户未登录";
   }
-}
+};
 
 export const CaseScriptSaveOrUpdate = async (fire: Omit<Fire, "id">) =>
-  axios.post(getCaseScriptSaveOrUpdateUrl, fire, {params: {ingoreRes: true}});
+  axios.post(getCaseScriptSaveOrUpdateUrl, fire, {
+    params: { ingoreRes: true },
+  });

+ 1 - 2
src/request/config.ts

@@ -54,8 +54,7 @@ export const fileUrls = [
   insertCaseFile,
   saveCaseFileInfo,
   cameraVersionUpload,
-  cameraVersionAppUpload
-
+  cameraVersionAppUpload,
 ];
 // 需要限定卫GET请求方式的url
 export const GetUrls = [getRoleList, getCompanyList];

+ 3 - 0
src/view/vrmodel/sceneDownload.vue

@@ -96,6 +96,9 @@ const download = () => {
     ElMessage.error("下载链接未生成,请稍等!");
     throw "下载链接未生成,请稍等!";
   } else {
+    if (!downloadURL.value.startsWith("/")) {
+      downloadURL.value = "/" + downloadURL.value;
+    }
     return saveAs(downloadURL.value, filename.value);
   }
 };

+ 2 - 2
vite.config.ts

@@ -46,13 +46,13 @@ export default defineConfig({
     proxy: {
       "/api": {
         secure: false,
-        target: dev ? "https://192.168.0.25:14000" : "mix3d.4dkankan.com",
+        target: dev ? "https://192.168.0.25" : "mix3d.4dkankan.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(new RegExp(`^/api`), ""),
       },
       "/fusion-xj": {
         secure: false,
-        target: dev ? "https://192.168.0.25:14000" : "mix3d.4dkankan.com",
+        target: dev ? "https://192.168.0.25" : "mix3d.4dkankan.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(new RegExp(`^/api`), "/fusion-xj"),
       },