Files
digital-psychology/apps/admin-h5/README.md
T
jackyu66gitandCursor 7ab9add5dd
ci / h5 (push) Canceled after 0s
ci / api (push) Canceled after 0s
ci / ess-docs (push) Canceled after 0s
feat(ops): ECR-007 行为分析与 ECR-008 内容运营后台
落地埋点 ingest/数据看板、首页宫格 CMS 与测评上下架;含账号引导、问答流式与免责声明去重,以及 review P1 审计同事务修复。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 02:26:16 +08:00

58 lines
1.6 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.
# admin-h5
运营后台(内容库、订单、会员)。**Phase A(ECR-006**:登录 · 用户 · 订单 · 会员授予 · 审计。
```bash
# 根目录
npm install
npm run dev:admin
# http://localhost:5174/
```
生产路径:`https://jackyu66.com/psy/admin/`(静态 `:8003` + 共用 `/psy/api/` → Go `:8080`)。
## Nginx(需 root 编辑并 reload
`jackyu66.com` 的 HTTPS server 里,**放在** `location /psy/` **之前**增加:
```nginx
# 运营后台静态(user systemd: yuxingu-admin → 127.0.0.1:8003
location /psy/admin/ {
proxy_pass http://127.0.0.1:8003/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# 问答 SSE:关闭缓冲(建议一并改现有 /psy/api/)
location /psy/api/ {
proxy_pass http://127.0.0.1:8080/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "";
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 120s;
}
```
然后:
```bash
sudo nginx -t && sudo systemctl reload nginx
```
本机已可用(无需 sudo):
```bash
npm run build:admin
systemctl --user enable --now yuxingu-admin.service
# 校验:curl -sS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8003/
```
默认管理员:见 `apps/api/config.example.yaml``admin.bootstrap_*`(仅空库种子)。