Files
anxinyan/docs/deploy/release-checklist.md
2026-05-25 14:53:59 +08:00

70 lines
3.4 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.
# 安心验上线检查清单
## 1. 环境变量
- 替换 [server-api/.env.example](/Users/wushumin/www/biyou/anxinyan/server-api/.env.example) 中的数据库、Redis 等占位值
- 确认 `APP_ENV=production`
- 确认 `APP_DEBUG=false`
- 确认 [admin-web/.env.production](/Users/wushumin/www/biyou/anxinyan/admin-web/.env.production)、[user-app/.env.production](/Users/wushumin/www/biyou/anxinyan/user-app/.env.production) 与 [work-app/.env.production](/Users/wushumin/www/biyou/anxinyan/work-app/.env.production) 指向正式 API 域名 `https://api.anxinjianyan.com`,而不是 `localhost / 127.0.0.1 / example.com`
- 打包 APK、H5、小程序、后台前端等所有客户端发布产物时必须使用正式 API 域名 `https://api.anxinjianyan.com`
## 2. 后台系统配置
- 在后台 `系统配置` 中填写并保存:
- 小程序 `AppID / AppSecret / 原始ID`
- H5 `AppID / AppSecret / H5 页面根地址``OAuth 回调地址` 会由 H5 页面根地址自动生成
- 短信 `阿里云 AccessKey ID / AccessKey Secret / 短信签名 / 登录模板 Code / Region ID`
- 支付 `MchID / APIv3 Key / 商户证书序列号 / 商户私钥 / 平台证书序列号 / 支付回调地址`
- 严禁保留演示值:
- `wx1234567890test`
- `h5_app_demo`
- `1900000109`
- `demo_api_v3_key_1234567890`
## 3. 管理后台安全
- 修改默认超级管理员密码:
- `13800138000 / Admin@123456`
- 删除或停用测试管理员:
- `13800138001 / Test@123456`
- 按实际运营需要分配角色与权限
## 4. 业务数据清理
- 清理测试工单、测试订单、测试物流、测试消息
- 清理 `server-api/public/uploads/` 下测试图片和 PDF
- 确认用户昵称、地址等演示数据已替换或清空
## 5. 构建与回归
- 后端执行:
- `php tools/smoke_check.php`
- 前端执行:
- `cd user-app && npm run type-check`
- `cd user-app && npm run build:h5`
- `cd admin-web && npm run build`
- 核验关键链路:
- 用户端下单 -> 提交运单 -> 补资料 -> 报告 -> 验真
- 用户工单 -> 客服回复 -> 消息提醒
- 后台登录 -> 权限控制 -> 系统配置保存
## 6. 微信相关
- 在后台 `系统配置` 保存正式小程序 `AppID` 后,执行:
- `cd user-app && npm run sync:mp-config`
- 再执行:
- `cd user-app && npm run build:mp-weixin`
- 构建前确认 [user-app/src/manifest.json](/Users/wushumin/www/biyou/anxinyan/user-app/src/manifest.json) 中 `mp-weixin.appid` 已同步为正式值
- 确认后台 `H5 页面根地址` 指向正式 H5 域名,例如 `https://m.example.com`,用于生成扫码查看报告和验真页链接
- 后台 `H5 授权回调地址` 应自动显示为 `H5 页面根地址 + /#/pages/auth/login`
- H5 授权域名、支付域名、回调域名已在微信平台完成配置
- 微信支付商户平台证书与 APIv3 Key 已完成正式部署
## 7. 短信登录
- 在后台 `系统配置 -> 短信配置` 中填写阿里云短信参数
- 确认短信签名与登录模板已在阿里云短信服务中审核通过
- 确认登录模板包含 `code` 变量
- 正式环境下验证:
- 非微信浏览器 H5 可通过 `手机号 + 验证码` 登录
- 已设置密码的账号可通过 `手机号 + 密码` 登录
## 8. 发布前建议
- 先跑一遍 `tools/release_audit.php`
- 如需打包小程序,先跑一遍 `npm run sync:mp-config`
- 审核巡检输出中的 `FAIL / WARN`
- 完成替换后再做最终上线