Browse Source

订单日志

蒋科 2 months ago
parent
commit
925a2a600f
2 changed files with 11 additions and 11 deletions
  1. 3 3
      src/utils/request.js
  2. 8 8
      src/views/manage-log/data-export.vue

+ 3 - 3
src/utils/request.js

@@ -2,11 +2,11 @@ import axios from 'axios'
 import { Message } from 'element-ui'
 import store from '@/store'
 import { tansParams } from '@/utils/zk'
-const href='http://'+window.location.hostname+'/api'
+// const href='http://'+window.location.hostname+'/api'
 const service = axios.create({
   // baseURL: httpurl.devServer.proxy['/api'].target+'/api',
-  // baseURL:process.env.VUE_APP_BASE_API,
-  baseURL:href,
+  baseURL:process.env.VUE_APP_BASE_API,
+  // baseURL:href,
   timeout: 5000
 })
 // request interceptor

+ 8 - 8
src/views/manage-log/data-export.vue

@@ -314,7 +314,7 @@ export default {
     //下载文件
     async handleDownFile(url, fileName) {
       this.showTotip = true;
-      const execlUrl = process.env.VUE_APP_BASE_API + "/excel/" + url;
+      const execlUrl ="/excel/" + url;
       const fileDownName = fileName + "_" + new Date().getTime();
       console.log(execlUrl, fileDownName);
       const resUrl = await this.RecordFile(execlUrl, fileDownName);
@@ -327,13 +327,6 @@ export default {
         data,
       });
     },
-    //删除数据导出列表
-    deleteExportData(id) {
-      return request({
-        url: `/export/delete/${id}`,
-        method: "post",
-      });
-    },
     RecordFile(Fileurl, fileName) {
       //接口方法
       return request({
@@ -371,6 +364,13 @@ export default {
         }
       });
     },
+    //删除数据导出列表
+    deleteExportData(id) {
+      return request({
+        url: `/export/delete/${id}`,
+        method: "post",
+      });
+    },
   },
 };
 </script>