fix: 更改token字段名
This commit is contained in:
@@ -4,7 +4,7 @@ import { storageKey } from '@/utils/constants'
|
|||||||
axios.interceptors.request.use(config => {
|
axios.interceptors.request.use(config => {
|
||||||
const token = localStorage.getItem(storageKey.token)
|
const token = localStorage.getItem(storageKey.token)
|
||||||
if (token) {
|
if (token) {
|
||||||
config.headers.Authorization = token // 请求头token
|
config.headers['Cn-Authorization'] = token // 请求头token
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user