877fd278c26dfbb56e6adb01061c575c4a100690
统一门户 JSON 契约:新增 GET /templates/{id},模板/云文件/保存/打开走虚拟 key;
layer 保存弹层替代 prompt,本地 .soon 已登录后台 POST 登记;修复保存静默失败与 design2 全宽布局。
Co-authored-by: Cursor <cursoragent@cursor.com>
SoonDesign
卡片/光盘设计工具:Electron 桌面端 + Web 端 + PHP 后端。
目录
| 目录 | 说明 |
|---|---|
| frontend-electron/ | 桌面程序 |
| frontend-web/ | Web 前端 |
| backend-web/ | PHP API |
| docker/ | 本地 Docker 编排(非生产部署) |
本地开发
docker\sync-config.ps1 :: 同步 local.js 与 backend local.php(改端口后必跑)
scripts\start.bat :: 启动
scripts\start.bat stop :: 停止(保留数据库)
scripts\start.bat reset :: 停止并清空数据库卷
生产环境编辑 frontend-web/config/local.js(从 config/local.js.example 复制);全量更新 frontend 时不要覆盖该文件。本地开发由 docker/sync-config.ps1 生成 local.js。
| 服务 | 默认地址 |
|---|---|
| Web | http://localhost:8100/pages/index.web.html |
| Admin 登录 | http://localhost:8100/pages/admin/login.html |
| Admin 后台 | http://localhost:8100/pages/admin/index.html |
| Electron 静态 | http://localhost:8101/pages/index.html |
| API | http://localhost:8102/health |
端口在 docker/.env 修改(默认 8100/8101/8102)。测试管理员:admin@local.test / admin123(仅 role=admin 可进入管理后台)。
管理后台模块:概览、用户(详情/启停)、订单筛选、套餐、系统设置、审计日志、支付密钥上传。
桌面窗口(可选):cd frontend-electron && npm install && npm start
生产部署
- Web 根目录:
frontend-web/ - PHP 根目录:
backend-web/public/ - 数据库:导入
backend-web/schema.sql - 后端:
backend-web/config/local.php.example→local.php - 前端 API:
frontend-web/config/local.js(生产配置,勿覆盖)
支付与 notify 说明见 docs/PAYMENT.md。列表分页契约见 docs/API-PAGINATION.md。
frontend-electron/js/design1-back.js、design2-back.js 等为历史参考快照,页面勿引用;功能对齐请以当前 frontend-web / frontend-electron 为准。
Description
Languages
JavaScript
84.1%
HTML
6.7%
PHP
5.2%
CSS
3.7%
PowerShell
0.2%