diff --git a/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/config/BrandProperties.java b/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/config/BrandProperties.java new file mode 100644 index 00000000..d44177dd --- /dev/null +++ b/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/config/BrandProperties.java @@ -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 = "指尖管理师注册店铺"; +} diff --git a/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/modules/integration/service/impl/MessageHubClientServiceImpl.java b/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/modules/integration/service/impl/MessageHubClientServiceImpl.java index bccc19e6..d428d31c 100644 --- a/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/modules/integration/service/impl/MessageHubClientServiceImpl.java +++ b/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/modules/integration/service/impl/MessageHubClientServiceImpl.java @@ -1,6 +1,7 @@ package com.xiaowang.fingertipdesigner.core.modules.integration.service.impl; 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.service.MessageHubClientService; 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. */ private final MessageHubPushConfigService messageHubPushConfigService; + /** + * 平台品牌文案配置。 + */ + private final BrandProperties brandProperties; @Value("${messagehub.client.sms-queue:smsQueue}") /** @@ -154,7 +159,7 @@ public class MessageHubClientServiceImpl implements MessageHubClientService { } Map templateParams = new HashMap<>(); - templateParams.put("name", "FingertipDesigner"); + templateParams.put("name", brandProperties.getMessageTemplateName()); templateParams.put("code", code); templateParams.put("min", "5"); templateParams.put("minutes", "5"); diff --git a/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/modules/user/service/impl/UserServiceImpl.java b/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/modules/user/service/impl/UserServiceImpl.java index 90d93fc0..d6088343 100644 --- a/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/modules/user/service/impl/UserServiceImpl.java +++ b/FD-Core/src/main/java/com/xiaowang/fingertipdesigner/core/modules/user/service/impl/UserServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.modules.artist.dto.*; import com.xiaowang.fingertipdesigner.core.modules.auth.dto.*; @@ -170,6 +171,7 @@ public class UserServiceImpl extends ServiceImpl implements * Variable `userInviteCodeMapper`: Spring-injected collaborator used by this class to finish database access, validation, or downstream calls. */ 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. */ @@ -1548,7 +1550,7 @@ public class UserServiceImpl extends ServiceImpl implements ShopDO shop = new ShopDO(); shop.setShopName(shopName); - shop.setDescription("指尖管理师注册店铺"); + shop.setDescription(brandProperties.getManagerRegisterShopDescription()); shop.setBusinessHours("10:00-22:00"); shop.setStatus(1); shop.setAuthorizationStartDate(LocalDateTime.now().minusDays(1).toLocalDate()); diff --git a/FD-Core/src/main/resources/application.yaml b/FD-Core/src/main/resources/application.yaml index 6eeb352d..ee810935 100644 --- a/FD-Core/src/main/resources/application.yaml +++ b/FD-Core/src/main/resources/application.yaml @@ -26,6 +26,9 @@ mybatis: map-underscore-to-camel-case: true fingertip-designer: + brand: + message-template-name: ${PLATFORM_MESSAGE_TEMPLATE_NAME:FingertipDesigner} + manager-register-shop-description: ${PLATFORM_MANAGER_REGISTER_SHOP_DESCRIPTION:指尖管理师注册店铺} security: jwt: issuer: fingertip-designer diff --git a/FD-Frontend/.env.development b/FD-Frontend/.env.development index 7a420f00..0d2962f0 100644 --- a/FD-Frontend/.env.development +++ b/FD-Frontend/.env.development @@ -1,3 +1,8 @@ VITE_API_BASE_URL=/api VITE_ADMIN_API_BASE_URL=/admin/api 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 diff --git a/FD-Frontend/.env.production b/FD-Frontend/.env.production index 962a7182..ddefe686 100644 --- a/FD-Frontend/.env.production +++ b/FD-Frontend/.env.production @@ -1,2 +1,7 @@ VITE_API_BASE_URL=https://yunail.art/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 diff --git a/FD-Frontend/index.html b/FD-Frontend/index.html index c4dbc801..3d2544be 100644 --- a/FD-Frontend/index.html +++ b/FD-Frontend/index.html @@ -4,7 +4,7 @@ - Fingertip Designer 指尖设计师 + %VITE_APP_TITLE%
diff --git a/FD-Frontend/src/config/brand.ts b/FD-Frontend/src/config/brand.ts new file mode 100644 index 00000000..ba05a0a4 --- /dev/null +++ b/FD-Frontend/src/config/brand.ts @@ -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') +} diff --git a/FD-Frontend/src/main.ts b/FD-Frontend/src/main.ts index fa5a3b62..46f98f7b 100644 --- a/FD-Frontend/src/main.ts +++ b/FD-Frontend/src/main.ts @@ -5,6 +5,9 @@ import './styles/admin-mobile.css' import './style.css' import App from './App.vue' 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. diff --git a/FD-Frontend/src/views/AuthView.vue b/FD-Frontend/src/views/AuthView.vue index b732bd98..7f7c68eb 100644 --- a/FD-Frontend/src/views/AuthView.vue +++ b/FD-Frontend/src/views/AuthView.vue @@ -4,13 +4,13 @@ - 指尖设计师 + {{ BRAND_CONFIG.appName }}
-
-

指尖设计师

+
+

{{ BRAND_CONFIG.appName }}

{{ activeTab === 'login' ? '登录后继续预约与收藏' : '填写信息完成账号注册' }}

@@ -447,6 +447,7 @@ import { ACCOUNT_REGEX, ACCOUNT_RULE_MESSAGE, sanitizeAccountInput } from '@/uti import { runWithGlobalLoading } from '@/utils/action-loading' import { notifyShopThemeChanged } from '@/utils/shop-theme' import { renderRichContent } from '@/utils/rich-content' +import { BRAND_CONFIG } from '@/config/brand' import { userApi, type AvailabilityCheckResponse, diff --git a/FD-Frontend/src/views/HelpView.vue b/FD-Frontend/src/views/HelpView.vue index 214368c5..3e503e01 100644 --- a/FD-Frontend/src/views/HelpView.vue +++ b/FD-Frontend/src/views/HelpView.vue @@ -4,6 +4,7 @@ import { useRouter } from 'vue-router' import { LeftOutlined } from '@ant-design/icons-vue' import { message } from 'ant-design-vue' import { userApi, type ContactInfoVO } from '@/api/user' +import { BRAND_CONFIG } from '@/config/brand' const router = useRouter() const loading = ref(false) @@ -36,7 +37,7 @@ onMounted(loadContact)
- 指尖设计师客服 + {{ BRAND_CONFIG.appName }}客服

帮助与客服

订单、预约、售后和账号问题都可以从这里继续处理。

diff --git a/FD-Frontend/src/views/NotFoundView.vue b/FD-Frontend/src/views/NotFoundView.vue index 2d6d9d8b..90090591 100644 --- a/FD-Frontend/src/views/NotFoundView.vue +++ b/FD-Frontend/src/views/NotFoundView.vue @@ -4,12 +4,12 @@ - 指尖设计师 + {{ BRAND_CONFIG.appName }}
- 指尖设计师 + {{ BRAND_CONFIG.appName }}
404

这页去做护理了

您访问的页面不存在或已被删除,我们带您回到首页继续浏览作品。

@@ -29,6 +29,7 @@ import { ref, onMounted, onUnmounted } from 'vue' import { useRouter } from 'vue-router' 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. diff --git a/FD-Frontend/src/views/ProfileView.vue b/FD-Frontend/src/views/ProfileView.vue index e1ad98f0..37eb972e 100644 --- a/FD-Frontend/src/views/ProfileView.vue +++ b/FD-Frontend/src/views/ProfileView.vue @@ -3,7 +3,7 @@
- 指尖设计师 + {{ BRAND_CONFIG.appName }}

个人中心

Welcome back -

{{ userInfo.nickname || '指尖设计师用户' }}

+

{{ userInfo.nickname || `${BRAND_CONFIG.appName}用户` }}

{{ userInfo.signature }}

@@ -275,6 +275,7 @@ import { buildDraftStorageKey, clearDraftRecord, loadDraftRecord, saveDraftRecor import { DEFAULT_AVATAR } from '@/constants' import { runWithGlobalLoading } from '@/utils/action-loading' 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. diff --git a/FD-Frontend/src/views/admin/AdminLayout.vue b/FD-Frontend/src/views/admin/AdminLayout.vue index 8ba20b0d..ff9c3e64 100644 --- a/FD-Frontend/src/views/admin/AdminLayout.vue +++ b/FD-Frontend/src/views/admin/AdminLayout.vue @@ -17,8 +17,8 @@ :collapsed-width="80" > - + @@ -61,6 +61,7 @@ import { message } from 'ant-design-vue' */ import { adminLegalAgreementApi, type LegalAgreementAdminVO } from '@/api/admin' 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. diff --git a/FD-Frontend/src/views/admin/ShopsView.vue b/FD-Frontend/src/views/admin/ShopsView.vue index 4517bcc4..6fb932f7 100644 --- a/FD-Frontend/src/views/admin/ShopsView.vue +++ b/FD-Frontend/src/views/admin/ShopsView.vue @@ -431,7 +431,7 @@
- Fingertip Designer + {{ BRAND_CONFIG.appNameEn }} 店铺前台预览

按钮、标签和柔和渐变都会围绕主色延展。

@@ -638,6 +638,7 @@ import { useAdminViewport } from '@/composables/useAdminViewport' import AdminMobileCardList from '@/components/admin/AdminMobileCardList.vue' import AdminMobileFab from '@/components/admin/AdminMobileFab.vue' import AdminResponsiveModal from '@/components/admin/AdminResponsiveModal.vue' +import { BRAND_CONFIG } from '@/config/brand' const { hasPermission, loadUserPermissions } = usePermission() const { isMobile } = useAdminViewport() diff --git a/FD-WeChat-Fronted/pages/help/index.js b/FD-WeChat-Fronted/pages/help/index.js index 203196d8..c266d5dd 100644 --- a/FD-WeChat-Fronted/pages/help/index.js +++ b/FD-WeChat-Fronted/pages/help/index.js @@ -1,11 +1,13 @@ const userApi = require('../../api/user') const navigation = require('../../utils/navigation') const theme = require('../../utils/theme') +const { BRAND_CONFIG } = require('../../utils/config') Page({ data: Object.assign(theme.pageThemeData(getApp().globalData.shopTheme), { loading: false, - contact: null + contact: null, + brandSupportName: `${BRAND_CONFIG.appNameEn} Support` }), onShow() { diff --git a/FD-WeChat-Fronted/pages/help/index.wxml b/FD-WeChat-Fronted/pages/help/index.wxml index b0a1a006..457dfa80 100644 --- a/FD-WeChat-Fronted/pages/help/index.wxml +++ b/FD-WeChat-Fronted/pages/help/index.wxml @@ -3,7 +3,7 @@ - Fingertip Designer Support + {{brandSupportName}} 帮助与客服 订单、预约、售后和账号问题都可以从这里继续处理 diff --git a/FD-WeChat-Fronted/pages/home/index.js b/FD-WeChat-Fronted/pages/home/index.js index 6d0bfea9..c8e3d893 100644 --- a/FD-WeChat-Fronted/pages/home/index.js +++ b/FD-WeChat-Fronted/pages/home/index.js @@ -15,7 +15,7 @@ const navigation = require('../../utils/navigation') const cache = require('../../utils/cache') const { buildProductCards } = require('../../utils/product') 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 { createKeyboardSafeData, attachKeyboardSafe, @@ -59,7 +59,8 @@ Page({ isLoggedIn: false, userInfo: null, navTitle: '游客模式', - greeting: '欢迎来到 Fingertip Designer 指尖设计师', + greeting: `欢迎来到 ${BRAND_CONFIG.appTitle}`, + guestBrandName: `${BRAND_CONFIG.appNameEn} 小程序`, displayName: '先看看门店和作品', searchKeyword: '', bannerImages: [], diff --git a/FD-WeChat-Fronted/pages/home/index.wxml b/FD-WeChat-Fronted/pages/home/index.wxml index d4727761..06c54738 100644 --- a/FD-WeChat-Fronted/pages/home/index.wxml +++ b/FD-WeChat-Fronted/pages/home/index.wxml @@ -5,7 +5,7 @@ - {{isLoggedIn ? greeting : 'FingertipDesigner 小程序'}} + {{isLoggedIn ? greeting : guestBrandName}} {{displayName}} 先选喜欢的作品。 diff --git a/FD-WeChat-Fronted/pages/product-detail/index.js b/FD-WeChat-Fronted/pages/product-detail/index.js index 316c3904..2e8185d6 100644 --- a/FD-WeChat-Fronted/pages/product-detail/index.js +++ b/FD-WeChat-Fronted/pages/product-detail/index.js @@ -49,7 +49,7 @@ const navigation = require('../../utils/navigation') */ const theme = require('../../utils/theme') 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 { runWithLoading } = require('../../utils/loading') const { saveBuyNowContext } = require('../../utils/buy-now') @@ -319,7 +319,7 @@ Page({ onShareAppMessage() { const product = this.data.product || {} return { - title: product.displayTitle || 'Fingertip Designer 美甲款式', + title: product.displayTitle || `${BRAND_CONFIG.appNameEn} 美甲款式`, path: `/pages/product-detail/index?id=${product.id || this.data.productId}`, imageUrl: this.data.productImages[0] || DEFAULT_PRODUCT_IMAGE } diff --git a/FD-WeChat-Fronted/utils/config.js b/FD-WeChat-Fronted/utils/config.js index e5e78ae2..583ac410 100644 --- a/FD-WeChat-Fronted/utils/config.js +++ b/FD-WeChat-Fronted/utils/config.js @@ -156,6 +156,11 @@ const API_DOMAIN = ensureHttps( : normalizeDomain(DOMAIN_MAP[ENV_VERSION], DOMAIN_MAP.release), ENV_VERSION ) +const BRAND_CONFIG = { + appName: String(localOverride.appName || '指尖设计师'), + appNameEn: String(localOverride.appNameEn || 'Fingertip Designer'), + appTitle: String(localOverride.appTitle || 'Fingertip Designer 指尖设计师') +} module.exports = { ENV_VERSION, @@ -163,6 +168,7 @@ module.exports = { IS_DEVTOOLS, DEVELOP_TARGET, API_DOMAIN, + BRAND_CONFIG, API_BASE_URL: `${API_DOMAIN}/api`, IS_DEV_ENV: ENV_VERSION === 'develop', REQUEST_TIMEOUT: Number(localOverride.requestTimeout || 10000), diff --git a/FD-WeChat-Fronted/utils/config.local.example.js b/FD-WeChat-Fronted/utils/config.local.example.js index 4633d2c4..31a7d16d 100644 --- a/FD-WeChat-Fronted/utils/config.local.example.js +++ b/FD-WeChat-Fronted/utils/config.local.example.js @@ -1,5 +1,8 @@ module.exports = { developTarget: 'local', + appName: '指尖设计师', + appNameEn: 'Fingertip Designer', + appTitle: 'Fingertip Designer 指尖设计师', requestTimeout: 10000, enableRequestSigning: true, domains: { diff --git a/FM-Wechat-Fronted/app.js b/FM-Wechat-Fronted/app.js index 1b81623e..37611fe5 100644 --- a/FM-Wechat-Fronted/app.js +++ b/FM-Wechat-Fronted/app.js @@ -1,9 +1,10 @@ const auth = require('./utils/auth') +const { BRAND_CONFIG } = require('./utils/config') App({ globalData: { - appName: '指尖管理师', - shopName: 'Fingertip Designer', + appName: BRAND_CONFIG.appName, + shopName: BRAND_CONFIG.defaultShopName, userInfo: null }, diff --git a/FM-Wechat-Fronted/pages/about/index.js b/FM-Wechat-Fronted/pages/about/index.js index ba768046..4cfbfd03 100644 --- a/FM-Wechat-Fronted/pages/about/index.js +++ b/FM-Wechat-Fronted/pages/about/index.js @@ -1 +1,7 @@ -Page({}) +const { BRAND_CONFIG } = require('../../utils/config') + +Page({ + data: { + appName: BRAND_CONFIG.appName + } +}) diff --git a/FM-Wechat-Fronted/pages/about/index.wxml b/FM-Wechat-Fronted/pages/about/index.wxml index eb2f3bb8..7f1ee53a 100644 --- a/FM-Wechat-Fronted/pages/about/index.wxml +++ b/FM-Wechat-Fronted/pages/about/index.wxml @@ -1,7 +1,7 @@ - 指尖管理师 + {{appName}} 专为美甲店店长设计的预约排班日历子系统 diff --git a/FM-Wechat-Fronted/pages/login/index.js b/FM-Wechat-Fronted/pages/login/index.js index 0e1bf002..50a5cba5 100644 --- a/FM-Wechat-Fronted/pages/login/index.js +++ b/FM-Wechat-Fronted/pages/login/index.js @@ -1,4 +1,5 @@ const authApi = require('../../api/auth') +const { BRAND_CONFIG } = require('../../utils/config') const PHONE_REGEX = /^1[3-9]\d{9}$/ @@ -33,7 +34,8 @@ Page({ countdown: 0, countdownTimer: null, agreementAccepted: false, - agreements: [] + agreements: [], + appName: BRAND_CONFIG.appName }, onInput(event) { diff --git a/FM-Wechat-Fronted/pages/login/index.wxml b/FM-Wechat-Fronted/pages/login/index.wxml index 51d1a8bc..c4709ddd 100644 --- a/FM-Wechat-Fronted/pages/login/index.wxml +++ b/FM-Wechat-Fronted/pages/login/index.wxml @@ -1,7 +1,7 @@ - 指尖管理师 + {{appName}} 美甲店预约排班管理 diff --git a/FM-Wechat-Fronted/pages/profile/index.js b/FM-Wechat-Fronted/pages/profile/index.js index e95d1f64..affd0172 100644 --- a/FM-Wechat-Fronted/pages/profile/index.js +++ b/FM-Wechat-Fronted/pages/profile/index.js @@ -1,6 +1,8 @@ +const { BRAND_CONFIG } = require('../../utils/config') + Page({ data: { - shopName: 'Fingertip Designer', + shopName: BRAND_CONFIG.defaultShopName, phone: '店长端', menus: [ { title: '店铺设置', url: '/pages/shop-settings/index' }, @@ -13,7 +15,7 @@ Page({ onShow() { const app = getApp() 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)) || '店长端' }) }, diff --git a/FM-Wechat-Fronted/pages/register/index.js b/FM-Wechat-Fronted/pages/register/index.js index 4105e1df..bd7d4e11 100644 --- a/FM-Wechat-Fronted/pages/register/index.js +++ b/FM-Wechat-Fronted/pages/register/index.js @@ -1,4 +1,5 @@ const authApi = require('../../api/auth') +const { BRAND_CONFIG } = require('../../utils/config') Page({ data: { @@ -9,6 +10,7 @@ Page({ confirmPassword: '', shopName: '' }, + registerShopPlaceholder: BRAND_CONFIG.registerShopPlaceholder, loading: false, codeLoading: false, countdown: 0, diff --git a/FM-Wechat-Fronted/pages/register/index.wxml b/FM-Wechat-Fronted/pages/register/index.wxml index 29cc747d..a9e67f71 100644 --- a/FM-Wechat-Fronted/pages/register/index.wxml +++ b/FM-Wechat-Fronted/pages/register/index.wxml @@ -21,7 +21,7 @@ 店铺名称 - + diff --git a/FM-Wechat-Fronted/pages/shop-settings/index.js b/FM-Wechat-Fronted/pages/shop-settings/index.js index e702e87b..fae02673 100644 --- a/FM-Wechat-Fronted/pages/shop-settings/index.js +++ b/FM-Wechat-Fronted/pages/shop-settings/index.js @@ -1,6 +1,8 @@ +const { BRAND_CONFIG } = require('../../utils/config') + Page({ 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 }) }, onStartChange(event) { this.setData({ 'form.startTime': event.detail.value }) }, diff --git a/FM-Wechat-Fronted/utils/config.js b/FM-Wechat-Fronted/utils/config.js index 3f52e256..a35b4ef7 100644 --- a/FM-Wechat-Fronted/utils/config.js +++ b/FM-Wechat-Fronted/utils/config.js @@ -137,6 +137,13 @@ const DEVELOP_TARGET = Object.prototype.hasOwnProperty.call(localOverride, 'deve ? String(localOverride.developTarget) : DEFAULT_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 = { ENV_VERSION, @@ -144,6 +151,7 @@ module.exports = { IS_DEVTOOLS, DEVELOP_TARGET, BASE_DOMAIN, + BRAND_CONFIG, API_DOMAIN: `${BASE_DOMAIN}/api`, ADMIN_API_BASE_URL: `${BASE_DOMAIN}/api/admin`, REQUEST_TIMEOUT: normalizeRequestTimeout(localOverride.requestTimeout), diff --git a/FM-Wechat-Fronted/utils/config.local.example.js b/FM-Wechat-Fronted/utils/config.local.example.js index 4633d2c4..fb8172ef 100644 --- a/FM-Wechat-Fronted/utils/config.local.example.js +++ b/FM-Wechat-Fronted/utils/config.local.example.js @@ -2,6 +2,12 @@ module.exports = { developTarget: 'local', requestTimeout: 10000, enableRequestSigning: true, + brand: { + appName: '指尖管理师', + productName: 'Fingertip Designer', + defaultShopName: 'Fingertip Designer', + registerShopPlaceholder: '例如:Fingertip Designer' + }, domains: { local: 'http://127.0.0.1:80', tunnel: 'https://yunail.art',