From 26fd010413610e7f9e8630df2e32d2731159c4e6 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Thu, 24 Apr 2025 14:46:09 +0800 Subject: [PATCH] fix --- subPackages/ticketBooking/detail.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/subPackages/ticketBooking/detail.vue b/subPackages/ticketBooking/detail.vue index 30d7ca0..5fc20de 100644 --- a/subPackages/ticketBooking/detail.vue +++ b/subPackages/ticketBooking/detail.vue @@ -290,8 +290,18 @@ }, '/api/goods/getPriceCalendarListBySpecifications').then(res => { this.allSeldDate = res.data || [] this.seldDateIndex = this.allSeldDate.findIndex(item => item.store != 0) - this.getTimeStock(this.allSeldDate[this.seldDateIndex].date) - this.openPop() + + if (this.seldDateIndex>=0) { + this.getTimeStock(this.allSeldDate[this.seldDateIndex].date) + this.openPop() + } else { + uni.showToast({ + title:"库存不足", + icon:"none" + }) + } + + }) }, // 获取规格分时库存