fix: 请求地址,localStorage(key)优化

This commit is contained in:
@changcode
2022-04-14 15:52:07 +08:00
parent 58e2d233d6
commit 2cc23bf1a9
24 changed files with 147 additions and 92 deletions

View File

@@ -2,7 +2,7 @@ import axios from 'axios'
import { storageKey } from '@/utils/constants'
axios.interceptors.request.use(config => {
const token = localStorage.getItem('cn-token')
const token = localStorage.getItem(storageKey.token)
if (token) {
config.headers.Authorization = token // 请求头token
}