Files
JayuCloud/scripts/四端品牌展示名称配置说明_20260702.md
T

23 lines
1.9 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.
# 四端品牌展示名称配置说明
更新时间:2026-07-02
## 背景
前端与两个小程序中存在应用名、产品名、默认门店名和登录页副标题等展示文案硬编码。为支持后续品牌名称一键替换,本次将四端运行时展示名称集中到各自配置入口。
## 配置入口
- 店务 Web:`JY-Salon-Front/src/config/brand.ts` 统一读取 `VITE_APP_NAME`、`VITE_APP_TAGLINE`、`VITE_ABOUT_NAME`、`VITE_DEFAULT_SHOP_NAME`、`VITE_REGISTER_SHOP_PLACEHOLDER` 等环境变量;开发与生产默认值分别写在 `.env.development` 和 `.env.production`。
- 用户 Web:`JY-Artist-Frontend/src/config/brand.ts` 统一读取 `VITE_APP_NAME`、`VITE_APP_NAME_EN`、`VITE_APP_TITLE`、`VITE_ADMIN_APP_NAME` 和 `VITE_APP_SHORT_NAME`。
- 店务小程序:`JY-Salon-WeChat/utils/config.js` 的 `BRAND_CONFIG` 管理 `appName`、`appTagline`、`productName`、`defaultShopName` 和 `registerShopPlaceholder`;本地覆盖写在 `utils/config.local.js`,模板见 `utils/config.local.example.js`。
- 用户小程序:`JY-Artist-WeChat/utils/config.js` 的 `BRAND_CONFIG` 管理 `appName`、`appNameEn`、`appTitle` 和 `defaultUserName`;本地覆盖写在 `utils/config.local.js`,模板见 `utils/config.local.example.js`。
## 影响范围
本次只调整运行时展示名称相关配置和页面引用,不调整 API 域名、图片域名、默认密码、业务角色名称和数据库配置。微信小程序的 `app.json` 和 `project.config.json` 是静态元数据,不能直接引用 `utils/config.js`,因此运行时页面展示以 `BRAND_CONFIG` 为准。
## 验证方式
修改品牌配置后,分别运行对应端构建或语法检查,确认页面可正常读取配置。店务 Web 和用户 Web 应运行 `npm run build`;小程序端应至少用 Node 加载 `utils/config.js`,确认 `BRAND_CONFIG` 能正确导出。