前端配置迁至 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
@@ -6,6 +6,8 @@ namespace Soon\Api\Admin\Controllers;
use Soon\Api\Core\Db;
use Soon\Api\Core\Json;
use Soon\Api\Services\AuditService;
use Soon\Api\Services\PaymentConfig;
use Soon\Api\Services\SettingsConfigLoader;
final class SettingsController
{
@@ -30,6 +32,9 @@ final class SettingsController
);
$stmt->execute(['k' => $key, 'v' => $value, 'ts' => date('Y-m-d H:i:s')]);
AuditService::log($adminId, 'settings.set', 'setting:' . $key, ['value' => $value]);
if (in_array($key, SettingsConfigLoader::PAYMENT_KEYS, true)) {
PaymentConfig::reloadRuntime();
}
Json::ok(['key' => $key]);
}
@@ -63,6 +68,9 @@ final class SettingsController
Json::fail('bad_request', '无有效配置项', 400);
}
AuditService::log($adminId, 'settings.set_batch', 'settings', ['keys' => $saved]);
if (array_intersect($saved, SettingsConfigLoader::PAYMENT_KEYS) !== []) {
PaymentConfig::reloadRuntime();
}
Json::ok(['keys' => $saved]);
}
}