From b6f30a838f8c1a91052e7b0c1f11eb720d0ca63d Mon Sep 17 00:00:00 2001 From: cat-shark Date: Sat, 20 Jun 2026 10:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9C=AC=E5=9C=B0=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E8=AF=B4=E6=98=8E=E5=92=8C=E5=BF=BD=E7=95=A5=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + README-CLEAN.md | 42 +++++++++++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c5b09d0..c8b87cd 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ database.db src/lang/source-use.json /data +/local-auth-data/ /_delete .vscode diff --git a/README-CLEAN.md b/README-CLEAN.md index 448fb82..6eb85c0 100644 --- a/README-CLEAN.md +++ b/README-CLEAN.md @@ -2,7 +2,7 @@ 这是从原目录整理出的独立副本,后续开发、启动和构建请在本目录执行。 -## 启动 +## 启动应用 ```bat start-local.bat @@ -14,14 +14,46 @@ start-local.bat npm.cmd run start:local ``` +默认会同时启动本地认证服务、Vite 和 Electron。 + +- 认证服务:`http://127.0.0.1:3302` +- 应用认证 API:`http://127.0.0.1:3302/api` +- 管理后台:`http://127.0.0.1:3302/admin/` +- 默认账号:`13800138000` +- 默认密码:`123456` + +## 单独启动认证/管理服务 + +```bat +npm.cmd run auth:local +``` + +管理后台是从遗失代码中恢复的原版纯静态页面,源码位于 `admin-panel/`;服务端代码位于 `server/local-auth/`。当前为了本地测试,认证服务会顺带托管 `admin-panel/`,之后可以把 `admin-panel/` 单独部署到任意静态站点。 + +独立部署后台时,默认请求同域 `/api`。如果后台和认证服务不在同一个域名,可以通过 `api` 参数指定认证服务地址: + +```text +https://admin.example.com/?api=https://auth.example.com +``` + +本地测试也可以这样写: + +```text +http://127.0.0.1:3302/admin/?api=http://127.0.0.1:3302 +``` + ## 自检 ```bat npm.cmd run start:check ``` -## 说明 +## 系统 API Key 配置 -- 默认开发端口已改为 `3354`,避免和原目录的 `3344` 服务冲突。 -- 已排除旧目录中的构建产物、日志、缓存、用户数据和 Git 信息。 -- `node_modules` 是实拷贝,不是软链接;同时排除了旧 Electron 目录中误混入的巨大运行数据。 +进入 `http://127.0.0.1:3302/admin/` 后,在“系统配置”里填写: + +- `aliyun_bailian_api_key`:QwenTTS / DashScope API Key +- `aliyun_bailian_base_url`:默认 `https://dashscope.aliyuncs.com/compatible-mode/v1` +- 其他 OSS、RunningHub、火山引擎、云美颜配置也可以在这里维护 + +这些配置会通过 `/api/system/config/public` 提供给本地应用作为兜底配置。