浏览代码

修改配置文件IP

a1140836302 2 年之前
父节点
当前提交
d19445b0d2
共有 4 个文件被更改,包括 8 次插入15 次删除
  1. 2 2
      src/api/log.js
  2. 2 7
      src/utils/request.js
  3. 0 2
      src/views/equipment-monitoring/components/BatteryCharger.vue
  4. 4 4
      vue.config.js

+ 2 - 2
src/api/log.js

@@ -65,9 +65,9 @@ export function exportFile(data) {
   })
 }
 //删除数据导出列表
-export function deleteExportData(data) {
+export function deleteExportData(id) {
   return request({
-    url: '/export/delete/'+data,
+    url: `/export/delete/${id}`,
     method: 'post',
     data
   })

+ 2 - 7
src/utils/request.js

@@ -3,11 +3,9 @@ import { Message } from 'element-ui'
 import store from '@/store'
 import { tansParams } from '@/utils/zk'
 import httpurl from '../../vue.config'
-// create an axios instance
 const service = axios.create({
   baseURL: httpurl.devServer.proxy['/api'].target+'/api', // url = base url + request url
-  // withCredentials: true, // send cookies when cross-domain requests
-  timeout: 10000 // request timeout
+  timeout: 5000 // request timeout
 })
 
 // request interceptor
@@ -22,15 +20,12 @@ service.interceptors.request.use(
       config.url = url
     }
     if (store.getters.token) {
-      // let each request carry token
-      // ['X-Token'] is a custom headers key
-      // please modify it according to the actual situation
       config.headers['Authorization'] = store.getters.token
     }
     return config
   },
   error => {
-    console.log(error) // for debug
+    console.log(error)
     return Promise.reject(error)
   }
 )

+ 0 - 2
src/views/equipment-monitoring/components/BatteryCharger.vue

@@ -57,7 +57,6 @@
                     //充电操作
                     if(this.chgState === 0 || this.chgState === 3){
                         const res = await startCharge(params)
-                        console.log(res)
                         this.$message({
                           type: 'success',
                           message: res.msg,
@@ -66,7 +65,6 @@
                     //断电操作
                     else if(this.chgState === 2){
                         const res = await stopCharge(params)
-                        console.log(res)
                         this.$message({
                           type: 'success',
                           message: res.msg,

+ 4 - 4
vue.config.js

@@ -12,7 +12,7 @@ module.exports = {
   lintOnSave: false,
   productionSourceMap: false,
   devServer: {
-    host: '192.168.0.86',
+    host: 'localhost',
     port: 808,
     open: true,
     overlay: {
@@ -21,19 +21,19 @@ module.exports = {
     },
     proxy: {
       '/api': {
-        target: `https://5jp3670392.yicp.fun`,
+        target: `http://192.168.3.177:8080`,
         // target: `http://172.16.12.146:8080`,
         ws: true,
         changeOrigin: true,
       },
       '/ws': {
-         target: `ws://192.168.0.125:8080/ws`,
+         target: `ws://192.168.3.177:8080/ws`,
         // target: `ws://172.16.12.146:8080/ws`,
         ws: true,
         changeOrigin: true,
       },
       '/video':{
-        target: `ws://192.168.0.125:8082/`,
+        target: `ws://192.168.3.177:8082/`,
         // target: `ws://172.16.12.146:8080/ws`,
         ws: true,
         changeOrigin: true,