Merge remote-tracking branch 'origin/master'

This commit is contained in:
2025-09-03 10:32:38 +08:00
2 changed files with 4 additions and 4 deletions

View File

@@ -1,3 +1,3 @@
# 开发环境配置
VITE_API_BASE_URL=/api
VITE_UPLOAD_BASE_URL=/api/upload
VITE_API_BASE_URL=https://minio.zrbjr.com/
VITE_UPLOAD_BASE_URL=https://minio.zrbjr.com/api/upload

View File

@@ -1,7 +1,7 @@
// 环境配置
const config = {
development: {
baseURL: 'http://localhost:3000',
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: {
@@ -36,7 +36,7 @@ export const getImageUrl = (imagePath) => {
const cleanBaseURL = baseURL.replace(/\/$/, '')
const cleanImagePath = imagePath.startsWith('/') ? imagePath : `/${imagePath}`
const fullUrl = `${cleanBaseURL}${cleanImagePath}`
console.log('Development environment, returning:', fullUrl)
// console.log('Development environment, returning:', fullUrl)
return fullUrl
}