0922
This commit is contained in:
@ -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, */*'
|
||||
}
|
||||
});
|
||||
|
||||
// 请求拦截器
|
||||
|
||||
Reference in New Issue
Block a user