配置化平台品牌名称
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="page-shell" style="{{themeVars}}">
|
||||
<view class="page-content">
|
||||
<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-desc">订单、预约、售后和账号问题都可以从这里继续处理</text>
|
||||
</view>
|
||||
|
||||
@@ -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: [],
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="page-shell home-page {{keyboardVisible ? 'keyboard-active' : ''}}">
|
||||
<view class="page-content">
|
||||
<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-desc">先选喜欢的作品。</text>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
module.exports = {
|
||||
developTarget: 'local',
|
||||
appName: '指尖设计师',
|
||||
appNameEn: 'Fingertip Designer',
|
||||
appTitle: 'Fingertip Designer 指尖设计师',
|
||||
requestTimeout: 10000,
|
||||
enableRequestSigning: true,
|
||||
domains: {
|
||||
|
||||
Reference in New Issue
Block a user