From e10f112fa075441b1799fb6c0b61f95ece70d9c7 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期二, 15 八月 2023 13:53:34 +0800 Subject: [PATCH] fix 修复 使用 localStorage 返回值为null问题 --- src/utils/request.ts | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index 4ade2f4..ed67713 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -16,10 +16,10 @@ export const isRelogin = { show: false }; export const globalHeaders = () => { return { - Authorization: "Bearer " + getToken(), + Authorization: 'Bearer ' + getToken(), clientid: import.meta.env.VITE_APP_CLIENT_ID - } -} + }; +}; axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'; axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID; -- Gitblit v1.9.3