配置化平台品牌名称
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
Page({})
|
||||
const { BRAND_CONFIG } = require('../../utils/config')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
appName: BRAND_CONFIG.appName
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<view class="page no-tab about-page">
|
||||
<view class="brand-card card">
|
||||
<view class="logo">指</view>
|
||||
<text class="name">指尖管理师</text>
|
||||
<text class="name">{{appName}}</text>
|
||||
<text class="desc">专为美甲店店长设计的预约排班日历子系统</text>
|
||||
</view>
|
||||
<view class="card about-list">
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<view class="page no-tab auth-page">
|
||||
<view class="brand">
|
||||
<view class="logo">指</view>
|
||||
<text class="brand-name">指尖管理师</text>
|
||||
<text class="brand-name">{{appName}}</text>
|
||||
<text class="brand-sub">美甲店预约排班管理</text>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -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)) || '店长端'
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</view>
|
||||
<view class="field">
|
||||
<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>
|
||||
|
||||
|
||||
@@ -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 }) },
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user