This commit is contained in:
eric
2026-03-16 09:32:35 -05:00
parent c54c236d1b
commit 14b0cd2429
21 changed files with 1058 additions and 706 deletions

View File

@@ -13,9 +13,11 @@
### 前端 (salon)
- `PAYMENT_API_URL`: payjsapi 公网地址,**生产环境必填**(如 `https://api.example.com`),否则会连不上 payjsapi 导致「服务不可用」
- `ROOT_DOMAIN`: 根域名,未设 PAYMENT_API_URL 时用于推导 `https://api.${ROOT_DOMAIN}`,默认 `hackrobot.cn`
- `PAYJSAPI_PORT`: 开发时 payjsapi 端口,默认 `8007`
- `PAYMENT_API_URL`: salonapi 公网地址,**生产环境必填**(如 `https://api.nomadyt.com`
- `ROOT_DOMAIN`: 根域名,未设 PAYMENT_API_URL 时用于推导 `https://api.${ROOT_DOMAIN}`,默认 `nomadyt.com`
- `NEXT_PUBLIC_SITE_URL`: 前端站点地址,线上 `https://nomadyt.com`
- `PAYJSAPI_PORT`: 开发时 salonapi 端口,默认 `8007`
- `ZPAY_PID` / `ZPAY_KEY``XORPAY_AID` / `XORPAY_SECRET`:支付平台凭证,与 salonapi 一致。用于 pay/status 兜底直接查询,**本地无回调时依赖此检测支付**
- `NEXT_PUBLIC_POCKETBASE_URL` / `POCKETBASE_URL`: PocketBase 地址
- `POCKETBASE_EMAIL` / `POCKETBASE_PASSWORD`: PocketBase 管理员账号(用于 join API 写 solanRed
@@ -27,8 +29,8 @@
## 启动
```bash
# 1. 启动 payjsapi
cd C:\project\payjsapi
# 1. 启动 salonapi后端端口 8007
cd C:\project\salonapi
python run.py
# 2. 启动 salon 前端
@@ -39,6 +41,15 @@ npm run dev
访问 http://localhost:3002
## 本地支付测试
PC 扫码支付后自动检测逻辑(参考 nomadvip
1. 优先 salonapi `/salon/order_status`
2. 失败时 **直接向 zpay/xorpay 查询** 兜底(不依赖回调)
3. 检测到 paid 后调用 complete-order → 跳转报名成功页
若仍无反应:点击「支付完成?点此手动检查」;确认 ZPAY_PID/KEY、XORPAY_AID/SECRET 与 salonapi 一致
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.