修复店务独立域名白屏

This commit is contained in:
2026-07-14 17:02:11 +08:00
parent a9e12516df
commit 9059b7a30f
3 changed files with 16 additions and 3 deletions
+4 -3
View File
@@ -245,13 +245,14 @@ MinIO 三副本对象存储所需表结构已经并入 `scripts/sql/init/JayuClo
#### 访问路径
`JY-Salon-Front` 是店务移动端 Web 模块,生产访问路径固定为:
`JY-Salon-Front` 是店务移动端 Web 模块,生产主入口为店务独立域名,兼容路径为根域名子路径:
```text
https://salon.yunail.art/
https://yunail.art/jy-salon-front/
```
Vite `base` 固定为 `/jy-salon-front/`,不能部署到域名根路径,否则静态资源路径会不匹配。
Vite `base` 固定为 `/jy-salon-front/`。即使店务独立域名首页从 `/` 访问,Nginx 也必须保留 `/jy-salon-front/` 静态资源前缀映射,否则 JS、CSS 和图标资源会 404 并导致白屏。
#### 构建产物
@@ -769,7 +770,7 @@ $env:NACOS_USERNAME='nacos'
- 静态资源发布目录:`/opt/jy-artist-frontend/releases/<timestamp>/dist`。
- 当前生效入口:`/opt/jy-artist-frontend/current`,由发布流程切换到最新 release。
- 设计师网页端入口:`https://yunail.art/`,Nginx 根目录指向 `/opt/jy-artist-frontend/current`,SPA 兜底到 `/index.html`。
- 店务网页端入口:`https://salon.yunail.art/`,Nginx 根目录指向 `/opt/jy-artist-frontend/current/jy-salon-front`,SPA 兜底到 `/index.html`。
- 店务网页端入口:`https://salon.yunail.art/`,Nginx 根目录指向 `/opt/jy-artist-frontend/current/jy-salon-front`,SPA 兜底到 `/index.html`;同时必须配置 `location ^~ /jy-salon-front/`,以 `/opt/jy-artist-frontend/current` 为根目录映射带前缀的店务静态资源。
- 后端健康检查:`/health/check` 必须反向代理到网关 upstream `jayu_cloud_gateway`,不能落入前端 SPA 兜底。
- API 代理:`/api/` 和 `/admin/api/` 均代理到 `jayu_cloud_gateway`。
- 当前证书状态:`/etc/letsencrypt/live/yunail.art/fullchain.pem` 为 DNS-01 新签发证书,SAN 覆盖 `yunail.art`、`www.yunail.art`、`salon.yunail.art`,有效期至 2026-10-07 06:14:28 UTC。