first
This commit is contained in:
130
docs/deploy/deploy-plan.md
Normal file
130
docs/deploy/deploy-plan.md
Normal file
@@ -0,0 +1,130 @@
|
||||
# 安心验部署说明
|
||||
|
||||
## 1. 项目结构
|
||||
|
||||
- `server-api`
|
||||
技术栈:PHP 8 + webman + MySQL + Redis
|
||||
- `user-app`
|
||||
技术栈:uni-app + Vue 3 + TypeScript
|
||||
产物:
|
||||
- H5
|
||||
- 微信小程序
|
||||
- `admin-web`
|
||||
技术栈:Vue 3 + Vite + TypeScript + Element Plus
|
||||
|
||||
## 2. 当前已确认域名
|
||||
|
||||
- 用户端 H5:`m.anxinjianyan.com`
|
||||
- 后端 API:`api.anxinjianyan.com`
|
||||
- 管理后台:`admin.anxinjianyan.com`
|
||||
|
||||
说明:
|
||||
|
||||
- H5 页面根地址会用于生成报告页、验真页、扫码跳转链接
|
||||
- API 域名会用于 H5、后台、小程序请求
|
||||
|
||||
## 3. 本地常用命令
|
||||
|
||||
### 后端
|
||||
|
||||
```bash
|
||||
cd /Users/wushumin/www/biyou/anxinyan/server-api
|
||||
php start.php start -d
|
||||
php start.php reload -d
|
||||
php tools/smoke_check.php
|
||||
php tools/release_audit.php
|
||||
```
|
||||
|
||||
### 用户端 H5
|
||||
|
||||
```bash
|
||||
cd /Users/wushumin/www/biyou/anxinyan/user-app
|
||||
npm run dev:h5
|
||||
npm run type-check
|
||||
npm run build:h5
|
||||
```
|
||||
|
||||
### 管理后台
|
||||
|
||||
```bash
|
||||
cd /Users/wushumin/www/biyou/anxinyan/admin-web
|
||||
npm run build
|
||||
```
|
||||
|
||||
### 小程序配置同步
|
||||
|
||||
```bash
|
||||
cd /Users/wushumin/www/biyou/anxinyan/user-app
|
||||
npm run sync:mp-config
|
||||
npm run build:mp-weixin
|
||||
```
|
||||
|
||||
## 4. 部署顺序建议
|
||||
|
||||
1. 导入数据库结构与种子数据
|
||||
2. 执行 schema 升级脚本
|
||||
3. 配置后端 `.env`
|
||||
4. 在后台完成系统配置
|
||||
5. 构建并部署 `admin-web`
|
||||
6. 构建并部署 `user-app` H5
|
||||
7. 同步小程序 AppID 并构建小程序包
|
||||
8. 跑 `smoke_check.php`
|
||||
9. 执行人工履约链路验收
|
||||
|
||||
## 5. 当前必须执行的 schema 升级
|
||||
|
||||
已存在脚本:
|
||||
|
||||
- `php tools/schema_upgrade_warehouses.php`
|
||||
- `php tools/schema_upgrade_order_shipping_targets.php`
|
||||
- `php tools/schema_upgrade_order_return_flow.php`
|
||||
- `php tools/schema_upgrade_manual_reports.php`
|
||||
- `php tools/schema_upgrade_user_login_sms.php`
|
||||
|
||||
建议在正式环境按上述顺序执行一次。
|
||||
|
||||
## 6. 后台必须配置的分组
|
||||
|
||||
- 小程序配置
|
||||
- H5 配置
|
||||
- 短信配置
|
||||
- 微信支付 / 商户平台配置
|
||||
|
||||
其中:
|
||||
|
||||
- H5 根地址必须指向正式域名
|
||||
- 小程序 AppID 必须同步到 `manifest.json`
|
||||
- 支付证书和商户密钥必须在后台上传或保存
|
||||
|
||||
## 7. 部署后必须验证的主链路
|
||||
|
||||
- 用户下单
|
||||
- 用户提交寄送运单
|
||||
- 后台标记鉴定中心签收
|
||||
- 后台发起补料
|
||||
- 用户补料
|
||||
- 后台发布报告
|
||||
- 用户确认寄回地址
|
||||
- 后台登记回寄运单
|
||||
- 后台标记用户签收
|
||||
- 用户报告验真
|
||||
|
||||
## 8. 当前状态
|
||||
|
||||
当前代码库已经具备:
|
||||
|
||||
- 用户端主流程
|
||||
- 后台订单履约主流程
|
||||
- 多仓库 / 改派仓库
|
||||
- 补料任务
|
||||
- 报告发布与验真
|
||||
- 寄回地址确认
|
||||
- 回寄运单登记
|
||||
- 用户签收闭环
|
||||
|
||||
剩余工作更偏向:
|
||||
|
||||
- 正式环境配置
|
||||
- 测试数据清理
|
||||
- 人工验收
|
||||
- 上线前口径确认
|
||||
Reference in New Issue
Block a user