物料-采购件入库页面功能实现
This commit is contained in:
@ -3,9 +3,9 @@ import { ElMessage } from 'element-plus'
|
||||
|
||||
// 1. 创建 axios 实例
|
||||
const service = axios.create({
|
||||
// 这里的 '/api' 配合 vite.config.ts 的 proxy 使用
|
||||
baseURL: '/api/v1',
|
||||
timeout: 5000 // 请求超时时间
|
||||
// 【修改这里】不要写死 '/api/v1',改为读取环境变量
|
||||
baseURL: import.meta.env.VITE_API_BASE_URL,
|
||||
timeout: 5000
|
||||
})
|
||||
|
||||
// 2. 请求拦截器 (可以在这里加 Token)
|
||||
|
||||
Reference in New Issue
Block a user