修复小程序门店有效期展示

This commit is contained in:
2026-10-27 16:59:27 +08:00
parent cf789b90b2
commit ba118c514a
4 changed files with 87 additions and 4 deletions
@@ -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()