# 生产环境一键编译部署(Windows PowerShell) $ErrorActionPreference = "Stop" $root = Split-Path -Parent $MyInvocation.MyCommand.Path Write-Host ">> 编译会员端..." -ForegroundColor Cyan Set-Location (Join-Path $root "frontend") npm run build Write-Host ">> 编译管理后台..." -ForegroundColor Cyan Set-Location (Join-Path $root "frontend-admin") npm run build Write-Host ">> 部署静态资源到 backend/public ..." -ForegroundColor Cyan Set-Location $root node scripts/deploy-static.js Write-Host "" Write-Host "完成!请将 Web 服务器根目录指向 backend/public" -ForegroundColor Green Write-Host " 会员端: /" -ForegroundColor Green Write-Host " 管理后台: /admin/" -ForegroundColor Green