将门店有效期展示移至店铺设置
This commit is contained in:
@@ -14,9 +14,7 @@ Page({
|
||||
timer: null,
|
||||
smsExpanded: false,
|
||||
unbindMode: false,
|
||||
closureRequest: null,
|
||||
businessExpireDateText: '',
|
||||
businessExpiryStatusText: ''
|
||||
closureRequest: null
|
||||
},
|
||||
|
||||
onShow() { this.loadProfile(); this.loadClosureRequest() },
|
||||
@@ -64,15 +62,7 @@ Page({
|
||||
this.setData({ loading: true })
|
||||
try {
|
||||
const profile = await profileCache.getProfile(options)
|
||||
const businessExpireDateText = profile.shopBusinessExpireTime ? String(profile.shopBusinessExpireTime).slice(0, 10) : '未设置'
|
||||
const remainingDays = profile.shopBusinessRemainingDays
|
||||
const hasRemainingDays = remainingDays !== null && remainingDays !== undefined && remainingDays !== '' && Number.isFinite(Number(remainingDays))
|
||||
const businessExpiryStatusText = profile.shopBusinessExpired
|
||||
? '已过期,暂不能新增预约'
|
||||
: hasRemainingDays
|
||||
? `剩余 ${remainingDays} 天`
|
||||
: '有效期未设置'
|
||||
this.setData({ profile, businessExpireDateText, businessExpiryStatusText, 'smsForm.phone': profile.phone || '' })
|
||||
this.setData({ profile, 'smsForm.phone': profile.phone || '' })
|
||||
const app = getApp()
|
||||
const session = auth.getSession()
|
||||
app.setSession({ ...session, userInfo: { ...(session.userInfo || {}), ...profile } })
|
||||
|
||||
Reference in New Issue
Block a user