diff --git a/.env.development b/.env.development index 304410c..9816cd8 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ # 开发环境配置 -VITE_API_BASE_URL=/api -VITE_UPLOAD_BASE_URL=/api/upload \ No newline at end of file +VITE_API_BASE_URL=https://minio.zrbjr.com/ +VITE_UPLOAD_BASE_URL=https://minio.zrbjr.com/api/upload \ No newline at end of file diff --git a/src/config/index.js b/src/config/index.js index b6bcb07..950dd8c 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,7 +1,7 @@ // 环境配置 const config = { development: { - baseURL: 'https://minio.zrbjr.com/', + baseURL: import.meta.env.VITE_API_BASE_URL || 'https://minio.zrbjr.com/', uploadURL: import.meta.env.VITE_UPLOAD_BASE_URL || 'http://localhost:3000/api/upload' }, production: {