前端配置迁至 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
+45
View File
@@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
if (PHP_SAPI !== 'cli') {
fwrite(STDERR, "CLI only\n");
exit(1);
}
require dirname(__DIR__) . '/src/bootstrap.php';
use Soon\Api\Core\Config;
use Soon\Api\Services\SoonModelService;
$configured = rtrim((string)Config::get('storage.models_dir', ''), '/\\');
$local = SOON_SERVER_ROOT . '/soonModels';
fwrite(STDOUT, "configured models_dir: {$configured}\n");
fwrite(STDOUT, " is_dir=" . (@is_dir($configured) ? 'yes' : 'no') . ' readable=' . (@is_readable($configured) ? 'yes' : 'no') . "\n");
fwrite(STDOUT, "backend soonModels: {$local}\n");
fwrite(STDOUT, " is_dir=" . (@is_dir($local) ? 'yes' : 'no') . ' readable=' . (@is_readable($local) ? 'yes' : 'no') . "\n");
$roots = SoonModelService::roots();
fwrite(STDOUT, 'scan roots: ' . (count($roots) ? implode(', ', $roots) : '(none)') . "\n");
foreach ($roots as $root) {
$entries = @scandir($root) ?: [];
$soon = array_values(array_filter($entries, static fn(string $e): bool => str_ends_with(strtolower($e), '.soon')));
fwrite(STDOUT, " {$root} => " . count($soon) . " .soon\n");
foreach ($soon as $f) {
fwrite(STDOUT, " - {$f}\n");
}
}
$items = SoonModelService::list();
fwrite(STDOUT, 'API items: ' . count($items) . "\n");
foreach ($items as $item) {
fwrite(STDOUT, ' - ' . ($item['name'] ?? '') . ' (' . ($item['file'] ?? '') . ")\n");
}
if ($configured !== '' && !@is_readable($configured)) {
fwrite(STDOUT, "\nHint: PHP 读不到 configured 目录。把 .soon 复制到后端 {$local},或在宝塔后端站点防跨站放行:{$configured}\n");
}
exit(count($items) > 0 ? 0 : 1);