前端配置迁至 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user