This commit is contained in:
dhr
2025-09-23 20:36:47 +08:00
parent fc3abeb4c0
commit 80cca114a9
19 changed files with 5107 additions and 1195 deletions

View File

@ -23,12 +23,18 @@ export const globalHeaders = () => {
};
};
// 设置默认请求头
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
axios.defaults.headers['Accept'] = 'application/json, text/plain, */*';
axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
// 创建 axios 实例
const service = axios.create({
baseURL: import.meta.env.VITE_APP_BASE_API,
timeout: 50000
timeout: 50000,
headers: {
'Content-Type': 'application/json;charset=utf-8',
'Accept': 'application/json, text/plain, */*'
}
});
// 请求拦截器