diff --git a/src/packages/user/pages/reserve/index.vue b/src/packages/user/pages/reserve/index.vue
index cfbd5f5..a74b16c 100644
--- a/src/packages/user/pages/reserve/index.vue
+++ b/src/packages/user/pages/reserve/index.vue
@@ -32,7 +32,7 @@
>
{{ d.week }}
{{ d.label }}
- 不可约
+ {{ d.expired ? '已过预约时间' : '不可约' }}
无限库存
可预约
余{{ d.stock }}位
@@ -155,6 +155,8 @@ interface DateOption {
cards: CardOption[]
disabled?: boolean
reason?: string
+ // xuchao: 已过预约截止时间(后端置灰补显的日期,不可点)
+ expired?: boolean
}
const scenic = ref({ name: '', address: '', hours: '', image: '' })
@@ -269,7 +271,8 @@ onLoad(async (query: any) => {
userIdCard.value = res.userIdCard || ''
bookingNotice.value = Array.isArray(res.bookingNotice) ? res.bookingNotice.map((n: any) => (typeof n === 'string' ? n : n?.content || n?.text || '')).join('
') : (res.bookingNotice || '')
cardModelName.value = res.cardModelName || ''
- appointmentDays.value = (res.dates || []).length
+ // xuchao: 近N日提示不含过截止置灰补显的日期
+ appointmentDays.value = (res.dates || []).filter((d: any) => !d.expired).length
reserveParams.value = {
scenicId: parseInt(resourceId),
channel: 'Channel_SZH',
@@ -287,6 +290,7 @@ onLoad(async (query: any) => {
cards: d.cards || [],
disabled: d.disabled,
reason: d.reason,
+ expired: d.expired,
}))
const firstAvailable = dateOptions.value.find(d => d.stock == null || d.stock > 0)
if (firstAvailable) selectedDate.value = firstAvailable.key
diff --git a/src/packages/user/pages/reserve/list.vue b/src/packages/user/pages/reserve/list.vue
index 0a82036..e9cbf82 100644
--- a/src/packages/user/pages/reserve/list.vue
+++ b/src/packages/user/pages/reserve/list.vue
@@ -244,9 +244,6 @@ let countdownTimer: ReturnType | null = null
onUnmounted(() => {
clearTimer()
- // #ifdef MP-WEIXIN
- wx.offUserCaptureScreen()
- // #endif
})
const records = ref([])
@@ -308,15 +305,6 @@ async function fetchRecords(append = false) {
}
onLoad(() => {
- // #ifdef MP-WEIXIN
- wx.setVisualEffectOnCapture({ visualEffect: 'hidden' })
- wx.onUserCaptureScreen(() => {
- uni.showToast({ title: '该页面截图无效,请不要截图', icon: 'none' })
- if (currentRecord.value) {
- fetchCode(currentRecord.value)
- }
- })
- // #endif
fetchRecords()
})
diff --git a/src/packages/user/pages/reserve/success.vue b/src/packages/user/pages/reserve/success.vue
index eb026d9..5b80929 100644
--- a/src/packages/user/pages/reserve/success.vue
+++ b/src/packages/user/pages/reserve/success.vue
@@ -106,21 +106,9 @@ let countdownTimer: ReturnType | null = null
onUnmounted(() => {
clearTimer()
- // #ifdef MP-WEIXIN
- wx.offUserCaptureScreen()
- // #endif
})
onLoad(async (query: any) => {
- // #ifdef MP-WEIXIN
- wx.setVisualEffectOnCapture({ visualEffect: 'hidden' })
- wx.onUserCaptureScreen(() => {
- uni.showToast({ title: '该页面截图无效,请不要截图', icon: 'none' })
- if (codePopup.value) {
- fetchCode()
- }
- })
- // #endif
const appointId = query?.appointId
if (!appointId) return
const phone = (uni.getStorageSync('phone') as string) || ''