Files
SoonDesign/README.md
T
24kycj ce76bb8018 fix(web): 修复 .soon/模板加载、旧文件兼容与另存为离开提示
- 删除 design1 ui 遗留代码,修复加载竞态与新建不弹保存提示
- cloud-files 归一化旧版 .soon,IndexedDB 写入完成后再跳转设计页
- 模板/本地 .soon 首次保存须另存为,离开前统一确认
- 发版缓存 bust(version.js、soon-cache.js)及宝塔 Nginx 配置文档

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 00:30:20 +08:00

50 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SoonDesign
卡片/光盘设计工具:Electron 桌面端 + Web 端 + PHP 后端。
## 目录
| 目录 | 说明 |
|---|---|
| [frontend-electron/](frontend-electron/) | 桌面程序 |
| [frontend-web/](frontend-web/) | Web 前端 |
| [backend-web/](backend-web/) | PHP API(含 `database/schema.sql` |
| [docker/](docker/) | 本地 Docker 编排(非生产部署) |
## 本地开发
需 [Docker Desktop](https://www.docker.com/products/docker-desktop/)。本地只需运行:
```bat
scripts\start.bat
```
脚本会自动:同步 `local.js` / `local.php`、启动 Docker 容器、等待 API。改 `docker/.env` 端口后重新运行即可。停止:`docker compose -p soondesign -f docker/docker-compose.yml down`
| 服务 | 默认地址 |
|------|----------|
| 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` 目录执行 `mysql ... < database/schema.sql`;已有库 `php scripts/migrate-schema.php`
- 后端:`backend-web/config/local.php.example``local.php`
- 前端 API`frontend-web/config/local.js`(生产配置,勿覆盖)
- Web 静态缓存:`scripts/write-web-version.ps1` 会随 `start.bat` 自动写入 `config/version.js`;线上 Nginx 请对齐 [docker/nginx/frontend.conf](docker/nginx/frontend.conf)HTML/JS 禁强缓存)
支付与 notify 说明见 [docs/PAYMENT.md](docs/PAYMENT.md)。列表分页契约见 [docs/API-PAGINATION.md](docs/API-PAGINATION.md)。
`frontend-electron/js/design1-back.js``design2-back.js` 等为历史参考快照,页面勿引用;功能对齐请以当前 `frontend-web` / `frontend-electron` 为准。