!31 【轻量级 PR】新增全局请求头 clientid 适配后端 token 校验

Merge pull request !31 from MichelleChung/ts
This commit is contained in:
MichelleChung
2023-07-24 11:22:20 +00:00
committed by 疯狂的狮子Li
parent f801f4fb11
commit acbdfc4639
5 changed files with 9 additions and 1 deletions

View File

@ -16,6 +16,7 @@ let downloadLoadingInstance: LoadingInstance;
export const isRelogin = { show: false };
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
// 创建 axios 实例
const service = axios.create({
baseURL: import.meta.env.VITE_APP_BASE_API,