fix: 更改token字段名

This commit is contained in:
chenjinsong
2022-06-24 15:09:20 +08:00
parent 16315a4276
commit 2aec509f41

View File

@@ -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
}, },