refactor: ♻️ 更换本地缓存的 token 变量名

This commit is contained in:
hxr
2024-03-24 15:18:45 +08:00
parent 8f842ec602
commit 023c585c95
4 changed files with 9 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ const service = axios.create({
// 请求拦截器
service.interceptors.request.use(
(config: InternalAxiosRequestConfig) => {
const accessToken = localStorage.getItem("token");
const accessToken = localStorage.getItem("accessToken");
if (accessToken) {
config.headers.Authorization = accessToken;
}