修复小程序门店有效期展示
This commit is contained in:
@@ -65,10 +65,12 @@ Page({
|
||||
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
|
||||
? '已过期,暂不能新增预约'
|
||||
: Number.isFinite(Number(profile.shopBusinessRemainingDays))
|
||||
? `剩余 ${profile.shopBusinessRemainingDays} 天`
|
||||
: hasRemainingDays
|
||||
? `剩余 ${remainingDays} 天`
|
||||
: '有效期未设置'
|
||||
this.setData({ profile, businessExpireDateText, businessExpiryStatusText, 'smsForm.phone': profile.phone || '' })
|
||||
const app = getApp()
|
||||
|
||||
Reference in New Issue
Block a user