管理端登录报错修复

This commit is contained in:
2025-10-31 13:57:49 +08:00
parent e69e9920fe
commit cafbae4324
4 changed files with 54 additions and 16 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
# 生产环境配置
VITE_APP_TITLE=情绪博物馆管理后台
# 生产环境需要配置实际的后端服务器地址
VITE_APP_BASE_API=http://localhost:19089/api
# 生产环境使用相对路径,通过nginx代理到后端服务
VITE_APP_BASE_API=/api
+7 -3
View File
@@ -14,9 +14,13 @@ if ! command -v npm &> /dev/null; then
exit 1
fi
# 执行构建(无论dist目录是否存在,都必须构建)
echo "📦 开始构建管理后台项目..."
if npm run build; then
# 清理旧的构建文件
echo "🧹 清理旧的构建文件..."
rm -rf dist
# 执行构建(使用生产环境配置)
echo "📦 开始构建管理后台项目(生产环境)..."
if NODE_ENV=production npm run build; then
echo "✅ 管理后台项目构建成功"
else
echo "❌ 管理后台项目构建失败,请检查代码"