This commit is contained in:
@@ -7,7 +7,7 @@ import type { RequestOptions, ErrorMessageMode } from '@/types/api'
|
||||
const axiosInstance = axios.create({
|
||||
timeout: 15000, // 请求超时时间(毫秒)
|
||||
baseURL: import.meta.env.MODE === 'development' ? '' : import.meta.env.VITE_API_URL, // API地址:开发环境使用代理,生产环境使用完整URL
|
||||
withCredentials: true, // 异步请求携带cookie
|
||||
withCredentials: false, // 异步请求携带cookie
|
||||
transformRequest: [
|
||||
(data, headers) => {
|
||||
// 如果是 FormData,不进行转换
|
||||
|
||||
Reference in New Issue
Block a user