前端配置迁至 config/local.js,完善支付、模板库与部署脚本

- 页面直接引用 local.js 设置 SOON_DEPLOY_CONFIG,移除 deploy-config
- Docker sync-config 生成 local.js;更新 README 与 agent-core 说明
- 模板库自动扫描 .soon;新增后端部署/种子/排查脚本
- 完善支付配置、订阅弹窗与后台支付管理页

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24kycj
2026-06-08 20:48:51 +08:00
parent 88c6ce8ccc
commit 152228d41f
47 changed files with 1448 additions and 486 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ services:
volumes:
- ../frontend-web:/var/www/web:ro
- ../frontend-electron:/var/www/electron:ro
- ./config/deploy-config.js:/var/www/web/assets/deploy-config.js:ro
- ./config/local.js:/var/www/web/config/local.js:ro
- ./nginx/frontend.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- api
+5 -4
View File
@@ -8,7 +8,7 @@ Get-Content $EnvFile -Encoding UTF8 | ForEach-Object {
}
$w, $e, $b = $ports.WEB_PORT, $ports.ELECTRON_PORT, $ports.BACKEND_PORT
$deployJs = @"
$localJs = @"
window.SOON_DEPLOY_CONFIG = {
api_v1_base: 'http://localhost:$b/api/v1',
api_admin_base: 'http://localhost:$b/api/admin',
@@ -63,8 +63,9 @@ return [
$dir = Join-Path $PSScriptRoot 'config'
New-Item -ItemType Directory -Force -Path $dir | Out-Null
$enc = [Text.UTF8Encoding]::new($false)
[IO.File]::WriteAllText((Join-Path $dir 'deploy-config.js'), $deployJs.Trim() + "`n", $enc)
[IO.File]::WriteAllText((Join-Path $dir 'local.js'), $localJs.Trim() + "`n", $enc)
[IO.File]::WriteAllText((Join-Path $dir 'local.php'), $localPhp.Trim() + "`n", $enc)
$webDeploy = Join-Path $Root 'frontend-web\assets\deploy-config.js'
[IO.File]::WriteAllText($webDeploy, $deployJs.Trim() + "`n", $enc)
$webLocal = Join-Path $Root 'frontend-web\config\local.js'
New-Item -ItemType Directory -Force -Path (Split-Path $webLocal -Parent) | Out-Null
[IO.File]::WriteAllText($webLocal, $localJs.Trim() + "`n", $enc)