|
@@ -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)
|