许成详 6 years ago
parent
commit
09ecdab556
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      config/index.js
  2. 2
    2
      src/util/ajax.js

+ 2
- 2
config/index.js View File

@@ -12,9 +12,9 @@ module.exports = {
12 12
     proxyTable: {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15
-        // target: 'http://192.168.0.62:8080', //wf
15
+        target: 'http://192.168.0.62:8080', //wf
16 16
         // target: 'http://localhost:8080', 
17
-        target: 'http://192.168.0.11', //ys
17
+        // target: 'http://192.168.0.11', //ys
18 18
         // target: 'http://192.168.0.11', //ys
19 19
         // target: 'http://dev.ycjcjy.com/', //frp
20 20
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置

+ 2
- 2
src/util/ajax.js View File

@@ -5,7 +5,7 @@ import { Message } from 'element-ui'
5 5
 
6 6
 const token = function (headers) {
7 7
   let JWT
8
-  if (headers){
8
+  if (headers) {
9 9
     localStorage.setItem('JWT', headers.authorization)
10 10
     JWT = headers.authorization
11 11
   }
@@ -27,7 +27,7 @@ const Axios = axios.create({
27 27
 
28 28
 Axios.interceptors.request.use((config) => {
29 29
   config.headers.authorization = token()
30
-  config.urlData = {...config.urlData, org: 'MQ'}
30
+  config.urlData = { ...config.urlData, org: 'MQ' }
31 31
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
32 32
   let urlData = qs.stringify(config.urlData)
33 33
   let queryData = qs.stringify(config.queryData)