fix(biji): 修复图片上传和预览相关问题

-优化图片预览接口返回信息,提高错误处理的可读性- 在图片上传时添加基础 URL,确保正确的图片路径
- 更新 Vite 配置,修复开发环境的代理设置
This commit is contained in:
2025-08-14 16:55:56 +08:00
parent 49eba5ee96
commit fd3e2a450f
4 changed files with 10 additions and 8 deletions

View File

@@ -6,9 +6,8 @@ import path from 'path'
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
return {
// base: env.VITE_BASE_URL,
base: env.VITE_BASE_URL,
plugins: [vue()],
base: './',
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
@@ -17,7 +16,7 @@ export default defineConfig(({ mode }) => {
server: {
proxy: {
'/api': {
target: 'http://localhost:8084',
target: 'http://127.0.0.1:8084',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '')
}