We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2863f18 commit 7a6939eCopy full SHA for 7a6939e
web/src/utils/request.js
@@ -36,11 +36,11 @@ service.interceptors.request.use(
36
}
37
const token = store.getters['user/token']
38
const user = store.getters['user/userInfo']
39
- config.data = JSON.stringify(config.data)
40
config.headers = {
41
'Content-Type': 'application/json',
42
'x-token': token,
43
- 'x-user-id': user.ID
+ 'x-user-id': user.ID,
+ ...config.headers
44
45
return config
46
},
@@ -70,7 +70,7 @@ service.interceptors.response.use(
70
} else {
71
ElMessage({
72
showClose: true,
73
- message: response.data.msg||decodeURI(response.headers.msg),
+ message: response.data.msg || decodeURI(response.headers.msg),
74
type: 'error'
75
})
76
if (response.data.data && response.data.data.reload) {
0 commit comments