配置化平台品牌名称

This commit is contained in:
2026-06-24 22:13:00 +08:00
parent eda109cb62
commit 61b8cc6d23
34 changed files with 139 additions and 32 deletions
@@ -0,0 +1,24 @@
package com.xiaowang.fingertipdesigner.core.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* 平台品牌文案配置。
*/
@Data
@Configuration
@ConfigurationProperties(prefix = "fingertip-designer.brand")
public class BrandProperties {
/**
* 短信模板中的平台名称。
*/
private String messageTemplateName = "FingertipDesigner";
/**
* 管理师注册店铺的默认描述。
*/
private String managerRegisterShopDescription = "指尖管理师注册店铺";
}
@@ -1,6 +1,7 @@
package com.xiaowang.fingertipdesigner.core.modules.integration.service.impl; package com.xiaowang.fingertipdesigner.core.modules.integration.service.impl;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.xiaowang.fingertipdesigner.core.config.BrandProperties;
import com.xiaowang.fingertipdesigner.core.modules.integration.entity.MessageHubPushConfigDO; import com.xiaowang.fingertipdesigner.core.modules.integration.entity.MessageHubPushConfigDO;
import com.xiaowang.fingertipdesigner.core.modules.integration.service.MessageHubClientService; import com.xiaowang.fingertipdesigner.core.modules.integration.service.MessageHubClientService;
import com.xiaowang.fingertipdesigner.core.modules.integration.service.MessageHubPushConfigService; import com.xiaowang.fingertipdesigner.core.modules.integration.service.MessageHubPushConfigService;
@@ -47,6 +48,10 @@ public class MessageHubClientServiceImpl implements MessageHubClientService {
* Variable `messageHubPushConfigService`: Spring-injected collaborator used by this class to finish database access, validation, or downstream calls. * Variable `messageHubPushConfigService`: Spring-injected collaborator used by this class to finish database access, validation, or downstream calls.
*/ */
private final MessageHubPushConfigService messageHubPushConfigService; private final MessageHubPushConfigService messageHubPushConfigService;
/**
* 平台品牌文案配置。
*/
private final BrandProperties brandProperties;
@Value("${messagehub.client.sms-queue:smsQueue}") @Value("${messagehub.client.sms-queue:smsQueue}")
/** /**
@@ -154,7 +159,7 @@ public class MessageHubClientServiceImpl implements MessageHubClientService {
} }
Map<String, Object> templateParams = new HashMap<>(); Map<String, Object> templateParams = new HashMap<>();
templateParams.put("name", "FingertipDesigner"); templateParams.put("name", brandProperties.getMessageTemplateName());
templateParams.put("code", code); templateParams.put("code", code);
templateParams.put("min", "5"); templateParams.put("min", "5");
templateParams.put("minutes", "5"); templateParams.put("minutes", "5");
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaowang.fingertipdesigner.core.config.BrandProperties;
import com.xiaowang.fingertipdesigner.core.common.dto.*; import com.xiaowang.fingertipdesigner.core.common.dto.*;
import com.xiaowang.fingertipdesigner.core.modules.artist.dto.*; import com.xiaowang.fingertipdesigner.core.modules.artist.dto.*;
import com.xiaowang.fingertipdesigner.core.modules.auth.dto.*; import com.xiaowang.fingertipdesigner.core.modules.auth.dto.*;
@@ -170,6 +171,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserDO> implements
* Variable `userInviteCodeMapper`: Spring-injected collaborator used by this class to finish database access, validation, or downstream calls. * Variable `userInviteCodeMapper`: Spring-injected collaborator used by this class to finish database access, validation, or downstream calls.
*/ */
private final UserInviteCodeMapper userInviteCodeMapper; private final UserInviteCodeMapper userInviteCodeMapper;
private final BrandProperties brandProperties;
/** /**
* Variable `userShopRoleMapper`: Spring-injected collaborator used by this class to finish database access, validation, or downstream calls. * Variable `userShopRoleMapper`: Spring-injected collaborator used by this class to finish database access, validation, or downstream calls.
*/ */
@@ -1548,7 +1550,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserDO> implements
ShopDO shop = new ShopDO(); ShopDO shop = new ShopDO();
shop.setShopName(shopName); shop.setShopName(shopName);
shop.setDescription("指尖管理师注册店铺"); shop.setDescription(brandProperties.getManagerRegisterShopDescription());
shop.setBusinessHours("10:00-22:00"); shop.setBusinessHours("10:00-22:00");
shop.setStatus(1); shop.setStatus(1);
shop.setAuthorizationStartDate(LocalDateTime.now().minusDays(1).toLocalDate()); shop.setAuthorizationStartDate(LocalDateTime.now().minusDays(1).toLocalDate());
@@ -26,6 +26,9 @@ mybatis:
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
fingertip-designer: fingertip-designer:
brand:
message-template-name: ${PLATFORM_MESSAGE_TEMPLATE_NAME:FingertipDesigner}
manager-register-shop-description: ${PLATFORM_MANAGER_REGISTER_SHOP_DESCRIPTION:指尖管理师注册店铺}
security: security:
jwt: jwt:
issuer: fingertip-designer issuer: fingertip-designer
+5
View File
@@ -1,3 +1,8 @@
VITE_API_BASE_URL=/api VITE_API_BASE_URL=/api
VITE_ADMIN_API_BASE_URL=/admin/api VITE_ADMIN_API_BASE_URL=/admin/api
VITE_DEV_PROXY_TARGET=http://127.0.0.1:80 VITE_DEV_PROXY_TARGET=http://127.0.0.1:80
VITE_APP_NAME=指尖设计师
VITE_APP_NAME_EN=Fingertip Designer
VITE_APP_TITLE=Fingertip Designer 指尖设计师
VITE_ADMIN_APP_NAME=指尖设计师管理台
VITE_APP_SHORT_NAME=YN
+5
View File
@@ -1,2 +1,7 @@
VITE_API_BASE_URL=https://yunail.art/api VITE_API_BASE_URL=https://yunail.art/api
VITE_ADMIN_API_BASE_URL=https://yunail.art/admin/api VITE_ADMIN_API_BASE_URL=https://yunail.art/admin/api
VITE_APP_NAME=指尖设计师
VITE_APP_NAME_EN=Fingertip Designer
VITE_APP_TITLE=Fingertip Designer 指尖设计师
VITE_ADMIN_APP_NAME=指尖设计师管理台
VITE_APP_SHORT_NAME=YN
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/fingertip-designer-icon.svg" /> <link rel="icon" type="image/svg+xml" href="/fingertip-designer-icon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fingertip Designer 指尖设计师</title> <title>%VITE_APP_TITLE%</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
+12
View File
@@ -0,0 +1,12 @@
function normalizeBrandValue(value: string | undefined, fallbackValue: string): string {
const target = String(value || fallbackValue).trim()
return target || fallbackValue
}
export const BRAND_CONFIG = {
appName: normalizeBrandValue(import.meta.env.VITE_APP_NAME, '指尖设计师'),
appNameEn: normalizeBrandValue(import.meta.env.VITE_APP_NAME_EN, 'Fingertip Designer'),
appTitle: normalizeBrandValue(import.meta.env.VITE_APP_TITLE, 'Fingertip Designer 指尖设计师'),
adminAppName: normalizeBrandValue(import.meta.env.VITE_ADMIN_APP_NAME, '指尖设计师管理台'),
appShortName: normalizeBrandValue(import.meta.env.VITE_APP_SHORT_NAME, 'YN')
}
+3
View File
@@ -5,6 +5,9 @@ import './styles/admin-mobile.css'
import './style.css' import './style.css'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import { BRAND_CONFIG } from './config/brand'
document.title = BRAND_CONFIG.appTitle
/** /**
* Purpose: app supports main.ts by holding or executing the app page or API role. * Purpose: app supports main.ts by holding or executing the app page or API role.
+4 -3
View File
@@ -4,13 +4,13 @@
<button class="auth-back-button" type="button" aria-label="返回" @click="handleBackClick"> <button class="auth-back-button" type="button" aria-label="返回" @click="handleBackClick">
<LeftOutlined /> <LeftOutlined />
</button> </button>
<strong>指尖设计师</strong> <strong>{{ BRAND_CONFIG.appName }}</strong>
<span class="auth-topbar-spacer" aria-hidden="true"></span> <span class="auth-topbar-spacer" aria-hidden="true"></span>
</header> </header>
<main class="auth-page"> <main class="auth-page">
<section class="brand-stage" aria-label="指尖设计师"> <section class="brand-stage" :aria-label="BRAND_CONFIG.appName">
<p class="brand-name">指尖设计师</p> <p class="brand-name">{{ BRAND_CONFIG.appName }}</p>
<p class="brand-copy">{{ activeTab === 'login' ? '登录后继续预约与收藏' : '填写信息完成账号注册' }}</p> <p class="brand-copy">{{ activeTab === 'login' ? '登录后继续预约与收藏' : '填写信息完成账号注册' }}</p>
</section> </section>
@@ -447,6 +447,7 @@ import { ACCOUNT_REGEX, ACCOUNT_RULE_MESSAGE, sanitizeAccountInput } from '@/uti
import { runWithGlobalLoading } from '@/utils/action-loading' import { runWithGlobalLoading } from '@/utils/action-loading'
import { notifyShopThemeChanged } from '@/utils/shop-theme' import { notifyShopThemeChanged } from '@/utils/shop-theme'
import { renderRichContent } from '@/utils/rich-content' import { renderRichContent } from '@/utils/rich-content'
import { BRAND_CONFIG } from '@/config/brand'
import { import {
userApi, userApi,
type AvailabilityCheckResponse, type AvailabilityCheckResponse,
+2 -1
View File
@@ -4,6 +4,7 @@ import { useRouter } from 'vue-router'
import { LeftOutlined } from '@ant-design/icons-vue' import { LeftOutlined } from '@ant-design/icons-vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { userApi, type ContactInfoVO } from '@/api/user' import { userApi, type ContactInfoVO } from '@/api/user'
import { BRAND_CONFIG } from '@/config/brand'
const router = useRouter() const router = useRouter()
const loading = ref(false) const loading = ref(false)
@@ -36,7 +37,7 @@ onMounted(loadContact)
<main class="content"> <main class="content">
<section class="hero-card"> <section class="hero-card">
<span>指尖设计师客服</span> <span>{{ BRAND_CONFIG.appName }}客服</span>
<h2>帮助与客服</h2> <h2>帮助与客服</h2>
<p>订单、预约、售后和账号问题都可以从这里继续处理。</p> <p>订单、预约、售后和账号问题都可以从这里继续处理。</p>
</section> </section>
+3 -2
View File
@@ -4,12 +4,12 @@
<button class="not-found-back" type="button" aria-label="返回" @click="handleBackClick"> <button class="not-found-back" type="button" aria-label="返回" @click="handleBackClick">
<LeftOutlined /> <LeftOutlined />
</button> </button>
<strong>指尖设计师</strong> <strong>{{ BRAND_CONFIG.appName }}</strong>
<span class="not-found-topbar-spacer" aria-hidden="true"></span> <span class="not-found-topbar-spacer" aria-hidden="true"></span>
</header> </header>
<div class="not-found-content"> <div class="not-found-content">
<span class="not-found-kicker">指尖设计师</span> <span class="not-found-kicker">{{ BRAND_CONFIG.appName }}</span>
<div class="error-code">404</div> <div class="error-code">404</div>
<h1>这页去做护理了</h1> <h1>这页去做护理了</h1>
<p>您访问的页面不存在或已被删除,我们带您回到首页继续浏览作品。</p> <p>您访问的页面不存在或已被删除,我们带您回到首页继续浏览作品。</p>
@@ -29,6 +29,7 @@
import { ref, onMounted, onUnmounted } from 'vue' import { ref, onMounted, onUnmounted } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { LeftOutlined } from '@ant-design/icons-vue' import { LeftOutlined } from '@ant-design/icons-vue'
import { BRAND_CONFIG } from '@/config/brand'
/** /**
* Purpose: router supports NotFoundView.vue by holding or executing the router page or API role. * Purpose: router supports NotFoundView.vue by holding or executing the router page or API role.
+3 -2
View File
@@ -3,7 +3,7 @@
<header class="profile-hero"> <header class="profile-hero">
<div class="profile-topbar"> <div class="profile-topbar">
<div class="profile-title-copy"> <div class="profile-title-copy">
<span class="profile-kicker">指尖设计师</span> <span class="profile-kicker">{{ BRAND_CONFIG.appName }}</span>
<h1>个人中心</h1> <h1>个人中心</h1>
</div> </div>
<button class="profile-icon-button" type="button" aria-label="打开设置" @click="handleSettingsClick"> <button class="profile-icon-button" type="button" aria-label="打开设置" @click="handleSettingsClick">
@@ -19,7 +19,7 @@
</div> </div>
<div class="welcome-copy"> <div class="welcome-copy">
<span class="welcome-label">Welcome back</span> <span class="welcome-label">Welcome back</span>
<h2 class="username">{{ userInfo.nickname || '指尖设计师用户' }}</h2> <h2 class="username">{{ userInfo.nickname || `${BRAND_CONFIG.appName}用户` }}</h2>
<p class="account">{{ userInfo.account || '登录后解锁预约礼遇' }}</p> <p class="account">{{ userInfo.account || '登录后解锁预约礼遇' }}</p>
<p v-if="userInfo.signature" class="signature">{{ userInfo.signature }}</p> <p v-if="userInfo.signature" class="signature">{{ userInfo.signature }}</p>
</div> </div>
@@ -275,6 +275,7 @@ import { buildDraftStorageKey, clearDraftRecord, loadDraftRecord, saveDraftRecor
import { DEFAULT_AVATAR } from '@/constants' import { DEFAULT_AVATAR } from '@/constants'
import { runWithGlobalLoading } from '@/utils/action-loading' import { runWithGlobalLoading } from '@/utils/action-loading'
import { notifyShopThemeChanged } from '@/utils/shop-theme' import { notifyShopThemeChanged } from '@/utils/shop-theme'
import { BRAND_CONFIG } from '@/config/brand'
/** /**
* Purpose: router supports ProfileView.vue by holding or executing the router page or API role. * Purpose: router supports ProfileView.vue by holding or executing the router page or API role.
+3 -2
View File
@@ -17,8 +17,8 @@
:collapsed-width="80" :collapsed-width="80"
> >
<div class="logo"> <div class="logo">
<h1 v-if="!collapsed">指尖设计师管理台</h1> <h1 v-if="!collapsed">{{ BRAND_CONFIG.adminAppName }}</h1>
<h1 v-else>YN</h1> <h1 v-else>{{ BRAND_CONFIG.appShortName }}</h1>
</div> </div>
<a-menu <a-menu
:selectedKeys="selectedKeys" :selectedKeys="selectedKeys"
@@ -232,6 +232,7 @@ import { runWithGlobalLoading } from '@/utils/action-loading'
import { notifyShopThemeChanged } from '@/utils/shop-theme' import { notifyShopThemeChanged } from '@/utils/shop-theme'
import { useAdminViewport } from '@/composables/useAdminViewport' import { useAdminViewport } from '@/composables/useAdminViewport'
import { adminNavigationItems, findAdminNavigationItemByPath, type AdminNavIconKey } from '@/config/admin-navigation' import { adminNavigationItems, findAdminNavigationItemByPath, type AdminNavIconKey } from '@/config/admin-navigation'
import { BRAND_CONFIG } from '@/config/brand'
import { import {
getAdminCurrentShopName, getAdminCurrentShopName,
getAdminRoleLabel, getAdminRoleLabel,
@@ -39,7 +39,7 @@
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="标题"> <a-form-item label="标题">
<a-input v-model:value="form.title" placeholder="例如:Fingertip Designer 用户协议" /> <a-input v-model:value="form.title" :placeholder="`例如:${BRAND_CONFIG.appNameEn} 用户协议`" />
</a-form-item> </a-form-item>
<a-form-item label="版本"> <a-form-item label="版本">
<a-input v-model:value="form.version" placeholder="例如:2026-05-18" /> <a-input v-model:value="form.version" placeholder="例如:2026-05-18" />
@@ -61,6 +61,7 @@ import { message } from 'ant-design-vue'
*/ */
import { adminLegalAgreementApi, type LegalAgreementAdminVO } from '@/api/admin' import { adminLegalAgreementApi, type LegalAgreementAdminVO } from '@/api/admin'
import type { IdType } from '@/utils/id' import type { IdType } from '@/utils/id'
import { BRAND_CONFIG } from '@/config/brand'
/** /**
* Purpose: loading supports LegalAgreementsView.vue by holding or executing the loading page or API role. * Purpose: loading supports LegalAgreementsView.vue by holding or executing the loading page or API role.
+2 -1
View File
@@ -431,7 +431,7 @@
</a-form-item> </a-form-item>
<div class="theme-preview" :style="themePreviewStyle"> <div class="theme-preview" :style="themePreviewStyle">
<div> <div>
<span class="theme-preview__eyebrow" :style="{ color: themePreview.primaryColor }">Fingertip Designer</span> <span class="theme-preview__eyebrow" :style="{ color: themePreview.primaryColor }">{{ BRAND_CONFIG.appNameEn }}</span>
<strong>店铺前台预览</strong> <strong>店铺前台预览</strong>
<p>按钮、标签和柔和渐变都会围绕主色延展。</p> <p>按钮、标签和柔和渐变都会围绕主色延展。</p>
</div> </div>
@@ -638,6 +638,7 @@ import { useAdminViewport } from '@/composables/useAdminViewport'
import AdminMobileCardList from '@/components/admin/AdminMobileCardList.vue' import AdminMobileCardList from '@/components/admin/AdminMobileCardList.vue'
import AdminMobileFab from '@/components/admin/AdminMobileFab.vue' import AdminMobileFab from '@/components/admin/AdminMobileFab.vue'
import AdminResponsiveModal from '@/components/admin/AdminResponsiveModal.vue' import AdminResponsiveModal from '@/components/admin/AdminResponsiveModal.vue'
import { BRAND_CONFIG } from '@/config/brand'
const { hasPermission, loadUserPermissions } = usePermission() const { hasPermission, loadUserPermissions } = usePermission()
const { isMobile } = useAdminViewport() const { isMobile } = useAdminViewport()
+3 -1
View File
@@ -1,11 +1,13 @@
const userApi = require('../../api/user') const userApi = require('../../api/user')
const navigation = require('../../utils/navigation') const navigation = require('../../utils/navigation')
const theme = require('../../utils/theme') const theme = require('../../utils/theme')
const { BRAND_CONFIG } = require('../../utils/config')
Page({ Page({
data: Object.assign(theme.pageThemeData(getApp().globalData.shopTheme), { data: Object.assign(theme.pageThemeData(getApp().globalData.shopTheme), {
loading: false, loading: false,
contact: null contact: null,
brandSupportName: `${BRAND_CONFIG.appNameEn} Support`
}), }),
onShow() { onShow() {
+1 -1
View File
@@ -3,7 +3,7 @@
<view class="page-shell" style="{{themeVars}}"> <view class="page-shell" style="{{themeVars}}">
<view class="page-content"> <view class="page-content">
<view class="page-hero"> <view class="page-hero">
<text class="hero-kicker">Fingertip Designer Support</text> <text class="hero-kicker">{{brandSupportName}}</text>
<text class="hero-title">帮助与客服</text> <text class="hero-title">帮助与客服</text>
<text class="hero-desc">订单、预约、售后和账号问题都可以从这里继续处理</text> <text class="hero-desc">订单、预约、售后和账号问题都可以从这里继续处理</text>
</view> </view>
+3 -2
View File
@@ -15,7 +15,7 @@ const navigation = require('../../utils/navigation')
const cache = require('../../utils/cache') const cache = require('../../utils/cache')
const { buildProductCards } = require('../../utils/product') const { buildProductCards } = require('../../utils/product')
const { resolveImageList } = require('../../utils/file') const { resolveImageList } = require('../../utils/file')
const { DEFAULT_SHOP_IMAGE, CACHE_TTL } = require('../../utils/config') const { DEFAULT_SHOP_IMAGE, CACHE_TTL, BRAND_CONFIG } = require('../../utils/config')
const { const {
createKeyboardSafeData, createKeyboardSafeData,
attachKeyboardSafe, attachKeyboardSafe,
@@ -59,7 +59,8 @@ Page({
isLoggedIn: false, isLoggedIn: false,
userInfo: null, userInfo: null,
navTitle: '游客模式', navTitle: '游客模式',
greeting: '欢迎来到 Fingertip Designer 指尖设计师', greeting: `欢迎来到 ${BRAND_CONFIG.appTitle}`,
guestBrandName: `${BRAND_CONFIG.appNameEn} 小程序`,
displayName: '先看看门店和作品', displayName: '先看看门店和作品',
searchKeyword: '', searchKeyword: '',
bannerImages: [], bannerImages: [],
+1 -1
View File
@@ -5,7 +5,7 @@
<view class="page-shell home-page {{keyboardVisible ? 'keyboard-active' : ''}}"> <view class="page-shell home-page {{keyboardVisible ? 'keyboard-active' : ''}}">
<view class="page-content"> <view class="page-content">
<view class="page-hero home-hero"> <view class="page-hero home-hero">
<text class="hero-kicker">{{isLoggedIn ? greeting : 'FingertipDesigner 小程序'}}</text> <text class="hero-kicker">{{isLoggedIn ? greeting : guestBrandName}}</text>
<text class="hero-title">{{displayName}}</text> <text class="hero-title">{{displayName}}</text>
<text class="hero-desc">先选喜欢的作品。</text> <text class="hero-desc">先选喜欢的作品。</text>
@@ -49,7 +49,7 @@ const navigation = require('../../utils/navigation')
*/ */
const theme = require('../../utils/theme') const theme = require('../../utils/theme')
const { getSignedUrl, resolveImageList, previewImagesSafely } = require('../../utils/file') const { getSignedUrl, resolveImageList, previewImagesSafely } = require('../../utils/file')
const { DEFAULT_PRODUCT_IMAGE } = require('../../utils/config') const { DEFAULT_PRODUCT_IMAGE, BRAND_CONFIG } = require('../../utils/config')
const { formatPrice, getProductTitle, splitCsv } = require('../../utils/format') const { formatPrice, getProductTitle, splitCsv } = require('../../utils/format')
const { runWithLoading } = require('../../utils/loading') const { runWithLoading } = require('../../utils/loading')
const { saveBuyNowContext } = require('../../utils/buy-now') const { saveBuyNowContext } = require('../../utils/buy-now')
@@ -319,7 +319,7 @@ Page({
onShareAppMessage() { onShareAppMessage() {
const product = this.data.product || {} const product = this.data.product || {}
return { return {
title: product.displayTitle || 'Fingertip Designer 美甲款式', title: product.displayTitle || `${BRAND_CONFIG.appNameEn} 美甲款式`,
path: `/pages/product-detail/index?id=${product.id || this.data.productId}`, path: `/pages/product-detail/index?id=${product.id || this.data.productId}`,
imageUrl: this.data.productImages[0] || DEFAULT_PRODUCT_IMAGE imageUrl: this.data.productImages[0] || DEFAULT_PRODUCT_IMAGE
} }
+6
View File
@@ -156,6 +156,11 @@ const API_DOMAIN = ensureHttps(
: normalizeDomain(DOMAIN_MAP[ENV_VERSION], DOMAIN_MAP.release), : normalizeDomain(DOMAIN_MAP[ENV_VERSION], DOMAIN_MAP.release),
ENV_VERSION ENV_VERSION
) )
const BRAND_CONFIG = {
appName: String(localOverride.appName || '指尖设计师'),
appNameEn: String(localOverride.appNameEn || 'Fingertip Designer'),
appTitle: String(localOverride.appTitle || 'Fingertip Designer 指尖设计师')
}
module.exports = { module.exports = {
ENV_VERSION, ENV_VERSION,
@@ -163,6 +168,7 @@ module.exports = {
IS_DEVTOOLS, IS_DEVTOOLS,
DEVELOP_TARGET, DEVELOP_TARGET,
API_DOMAIN, API_DOMAIN,
BRAND_CONFIG,
API_BASE_URL: `${API_DOMAIN}/api`, API_BASE_URL: `${API_DOMAIN}/api`,
IS_DEV_ENV: ENV_VERSION === 'develop', IS_DEV_ENV: ENV_VERSION === 'develop',
REQUEST_TIMEOUT: Number(localOverride.requestTimeout || 10000), REQUEST_TIMEOUT: Number(localOverride.requestTimeout || 10000),
@@ -1,5 +1,8 @@
module.exports = { module.exports = {
developTarget: 'local', developTarget: 'local',
appName: '指尖设计师',
appNameEn: 'Fingertip Designer',
appTitle: 'Fingertip Designer 指尖设计师',
requestTimeout: 10000, requestTimeout: 10000,
enableRequestSigning: true, enableRequestSigning: true,
domains: { domains: {
+3 -2
View File
@@ -1,9 +1,10 @@
const auth = require('./utils/auth') const auth = require('./utils/auth')
const { BRAND_CONFIG } = require('./utils/config')
App({ App({
globalData: { globalData: {
appName: '指尖管理师', appName: BRAND_CONFIG.appName,
shopName: 'Fingertip Designer', shopName: BRAND_CONFIG.defaultShopName,
userInfo: null userInfo: null
}, },
+7 -1
View File
@@ -1 +1,7 @@
Page({}) const { BRAND_CONFIG } = require('../../utils/config')
Page({
data: {
appName: BRAND_CONFIG.appName
}
})
+1 -1
View File
@@ -1,7 +1,7 @@
<view class="page no-tab about-page"> <view class="page no-tab about-page">
<view class="brand-card card"> <view class="brand-card card">
<view class="logo">指</view> <view class="logo">指</view>
<text class="name">指尖管理师</text> <text class="name">{{appName}}</text>
<text class="desc">专为美甲店店长设计的预约排班日历子系统</text> <text class="desc">专为美甲店店长设计的预约排班日历子系统</text>
</view> </view>
<view class="card about-list"> <view class="card about-list">
+3 -1
View File
@@ -1,4 +1,5 @@
const authApi = require('../../api/auth') const authApi = require('../../api/auth')
const { BRAND_CONFIG } = require('../../utils/config')
const PHONE_REGEX = /^1[3-9]\d{9}$/ const PHONE_REGEX = /^1[3-9]\d{9}$/
@@ -33,7 +34,8 @@ Page({
countdown: 0, countdown: 0,
countdownTimer: null, countdownTimer: null,
agreementAccepted: false, agreementAccepted: false,
agreements: [] agreements: [],
appName: BRAND_CONFIG.appName
}, },
onInput(event) { onInput(event) {
+1 -1
View File
@@ -1,7 +1,7 @@
<view class="page no-tab auth-page"> <view class="page no-tab auth-page">
<view class="brand"> <view class="brand">
<view class="logo">指</view> <view class="logo">指</view>
<text class="brand-name">指尖管理师</text> <text class="brand-name">{{appName}}</text>
<text class="brand-sub">美甲店预约排班管理</text> <text class="brand-sub">美甲店预约排班管理</text>
</view> </view>
+4 -2
View File
@@ -1,6 +1,8 @@
const { BRAND_CONFIG } = require('../../utils/config')
Page({ Page({
data: { data: {
shopName: 'Fingertip Designer', shopName: BRAND_CONFIG.defaultShopName,
phone: '店长端', phone: '店长端',
menus: [ menus: [
{ title: '店铺设置', url: '/pages/shop-settings/index' }, { title: '店铺设置', url: '/pages/shop-settings/index' },
@@ -13,7 +15,7 @@ Page({
onShow() { onShow() {
const app = getApp() const app = getApp()
this.setData({ this.setData({
shopName: app.globalData.shopName || '指尖管理师', shopName: app.globalData.shopName || BRAND_CONFIG.appName,
phone: (app.globalData.userInfo && (app.globalData.userInfo.phone || app.globalData.userInfo.account)) || '店长端' phone: (app.globalData.userInfo && (app.globalData.userInfo.phone || app.globalData.userInfo.account)) || '店长端'
}) })
}, },
@@ -1,4 +1,5 @@
const authApi = require('../../api/auth') const authApi = require('../../api/auth')
const { BRAND_CONFIG } = require('../../utils/config')
Page({ Page({
data: { data: {
@@ -9,6 +10,7 @@ Page({
confirmPassword: '', confirmPassword: '',
shopName: '' shopName: ''
}, },
registerShopPlaceholder: BRAND_CONFIG.registerShopPlaceholder,
loading: false, loading: false,
codeLoading: false, codeLoading: false,
countdown: 0, countdown: 0,
+1 -1
View File
@@ -21,7 +21,7 @@
</view> </view>
<view class="field"> <view class="field">
<text class="field-label">店铺名称</text> <text class="field-label">店铺名称</text>
<input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" placeholder="例如:Fingertip Designer" /> <input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" placeholder="{{registerShopPlaceholder}}" />
</view> </view>
</view> </view>
@@ -1,6 +1,8 @@
const { BRAND_CONFIG } = require('../../utils/config')
Page({ Page({
data: { data: {
form: { shopName: 'Fingertip Designer', startTime: '10:00', endTime: '22:00', defaultDuration: 60, rule: '必须选择已有作品作为项目来源' } form: { shopName: BRAND_CONFIG.defaultShopName, startTime: '10:00', endTime: '22:00', defaultDuration: 60, rule: '必须选择已有作品作为项目来源' }
}, },
onInput(event) { this.setData({ [`form.${event.currentTarget.dataset.field}`]: event.detail.value }) }, onInput(event) { this.setData({ [`form.${event.currentTarget.dataset.field}`]: event.detail.value }) },
onStartChange(event) { this.setData({ 'form.startTime': event.detail.value }) }, onStartChange(event) { this.setData({ 'form.startTime': event.detail.value }) },
+8
View File
@@ -137,6 +137,13 @@ const DEVELOP_TARGET = Object.prototype.hasOwnProperty.call(localOverride, 'deve
? String(localOverride.developTarget) ? String(localOverride.developTarget)
: DEFAULT_DEVELOP_TARGET : DEFAULT_DEVELOP_TARGET
const BASE_DOMAIN = resolveDomain(DOMAIN_MAP, ENV_VERSION, DEVELOP_TARGET) const BASE_DOMAIN = resolveDomain(DOMAIN_MAP, ENV_VERSION, DEVELOP_TARGET)
const brandOverride = localOverride.brand || {}
const BRAND_CONFIG = {
appName: String(brandOverride.appName || '指尖管理师'),
productName: String(brandOverride.productName || 'Fingertip Designer'),
defaultShopName: String(brandOverride.defaultShopName || 'Fingertip Designer'),
registerShopPlaceholder: String(brandOverride.registerShopPlaceholder || '例如:Fingertip Designer')
}
module.exports = { module.exports = {
ENV_VERSION, ENV_VERSION,
@@ -144,6 +151,7 @@ module.exports = {
IS_DEVTOOLS, IS_DEVTOOLS,
DEVELOP_TARGET, DEVELOP_TARGET,
BASE_DOMAIN, BASE_DOMAIN,
BRAND_CONFIG,
API_DOMAIN: `${BASE_DOMAIN}/api`, API_DOMAIN: `${BASE_DOMAIN}/api`,
ADMIN_API_BASE_URL: `${BASE_DOMAIN}/api/admin`, ADMIN_API_BASE_URL: `${BASE_DOMAIN}/api/admin`,
REQUEST_TIMEOUT: normalizeRequestTimeout(localOverride.requestTimeout), REQUEST_TIMEOUT: normalizeRequestTimeout(localOverride.requestTimeout),
@@ -2,6 +2,12 @@ module.exports = {
developTarget: 'local', developTarget: 'local',
requestTimeout: 10000, requestTimeout: 10000,
enableRequestSigning: true, enableRequestSigning: true,
brand: {
appName: '指尖管理师',
productName: 'Fingertip Designer',
defaultShopName: 'Fingertip Designer',
registerShopPlaceholder: '例如:Fingertip Designer'
},
domains: { domains: {
local: 'http://127.0.0.1:80', local: 'http://127.0.0.1:80',
tunnel: 'https://yunail.art', tunnel: 'https://yunail.art',