统一甲屿云命名体系
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
# JY-Salon-Front 移动端发布配置说明
|
||||
|
||||
更新时间:2026-06-29
|
||||
|
||||
## 访问路径
|
||||
|
||||
`JY-Salon-Front` 是店务移动端 Web 模块,生产访问路径固定为:
|
||||
|
||||
```text
|
||||
https://yunail.art/jy-salon-front/
|
||||
```
|
||||
|
||||
Vite `base` 固定为 `/jy-salon-front/`,不能部署到域名根路径,否则静态资源路径会不匹配。
|
||||
|
||||
## 构建产物
|
||||
|
||||
`JY-Salon-Front` 独立执行:
|
||||
|
||||
```text
|
||||
npm ci
|
||||
npm run build
|
||||
```
|
||||
|
||||
构建产物目录为:
|
||||
|
||||
```text
|
||||
JY-Salon-Front/dist
|
||||
```
|
||||
|
||||
`scripts/package-release.ps1` 会先构建 `JY-Artist-Frontend`,再构建 `JY-Salon-Front`,发布包内包含:
|
||||
|
||||
```text
|
||||
frontend/dist
|
||||
frontend/jy-artist-dist
|
||||
frontend/dist/jy-salon-front
|
||||
frontend/jy-salon-front-dist
|
||||
```
|
||||
|
||||
其中 `frontend/dist/jy-salon-front` 用于与现有 Web 前端一起部署,`frontend/jy-artist-dist` 和 `frontend/jy-salon-front-dist` 用于人工核查和独立备份。
|
||||
|
||||
## 生产部署目录
|
||||
|
||||
`scripts/deploy-jayu-cloud-production.ps1` 会把 `JY-Artist-Frontend/dist` 与 `JY-Salon-Front/dist` 合并为同一个 Web tar 包:
|
||||
|
||||
```text
|
||||
dist/
|
||||
dist/jy-salon-front/
|
||||
```
|
||||
|
||||
远端 Web 发布目录沿用:
|
||||
|
||||
```text
|
||||
/opt/jy-artist-frontend
|
||||
```
|
||||
|
||||
脚本解压后仍使用现有软链:
|
||||
|
||||
```text
|
||||
/opt/jy-artist-frontend/current -> releases/{timestamp}/dist
|
||||
```
|
||||
|
||||
因此 `/jy-salon-front/` 实际对应:
|
||||
|
||||
```text
|
||||
/opt/jy-artist-frontend/current/jy-salon-front/
|
||||
```
|
||||
|
||||
## 接口与鉴权
|
||||
|
||||
移动端 Web 复用现有后端接口,不新增后端配置:
|
||||
|
||||
```text
|
||||
/admin/api
|
||||
/api
|
||||
```
|
||||
|
||||
请求签名、设备 ID、本地会话和鉴权刷新逻辑由 `JY-Salon-Front/src/api` 与 `JY-Salon-Front/src/utils/request-signature.ts` 维护。
|
||||
|
||||
## 回滚注意事项
|
||||
|
||||
回滚 Web 版本时,回滚单位是整个 Web `current` 软链;`JY-Artist-Frontend` 与 `JY-Salon-Front` 会一起回到上一个 Web 发布版本。
|
||||
|
||||
如只需临时下线移动端,可以在当前 Web 目录中移除 `jy-salon-front` 子目录,但下一次发布会重新生成。
|
||||
|
||||
## 验证方式
|
||||
|
||||
发布前至少执行:
|
||||
|
||||
```text
|
||||
cd JY-Salon-Front
|
||||
npm ci
|
||||
npm run test:unit
|
||||
npm run build
|
||||
```
|
||||
|
||||
生产发布脚本的公开冒烟会检查:
|
||||
|
||||
```text
|
||||
GET https://yunail.art/health/check
|
||||
GET https://yunail.art/api/shop/list
|
||||
GET https://yunail.art/jy-salon-front/
|
||||
```
|
||||
Reference in New Issue
Block a user