From d00304ec9c4c4b703d00ebb47a8719ed21ba5ce8 Mon Sep 17 00:00:00 2001
From: gqt <3217233537@qq.com>
Date: Wed, 15 Jul 2026 13:57:57 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A2=E5=9C=BA=E9=A1=B5=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E6=A0=87=E7=AD=BE=E6=98=BE=E7=A4=BA=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?=20+=20=E7=BA=A6=E8=AF=BE=E9=A1=B5=E5=88=97=E8=A1=A8=E5=88=B7?=
=?UTF-8?q?=E6=96=B0=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- private/index.vue: 时间标签改为单时间+竖线样式,第一行加 margin-top 防止被表头遮挡
- courses/index.vue: 修复切换Tab/日期列表不刷新问题(竞态条件+不清空旧数据+无错误处理)
- .env: 冰场馆URL修正
---
miniprogram/.env | 2 +-
.../src/pages/comprehensive/courses/index.vue | 24 ++++++++++++--
.../src/pages/comprehensive/private/index.vue | 31 ++++++++++++++-----
3 files changed, 46 insertions(+), 11 deletions(-)
diff --git a/miniprogram/.env b/miniprogram/.env
index e405b71..7fda9c6 100644
--- a/miniprogram/.env
+++ b/miniprogram/.env
@@ -1,2 +1,2 @@
VITE_ICE_API_BASE_URL=https://venue.test.chatgqt.top
-VITE_COMPREHENSIVE_API_BASE_URL=https://8002.frp.chatgqt.top
\ No newline at end of file
+VITE_COMPREHENSIVE_API_BASE_URL=https://venue2.test.chatgqt.top
\ No newline at end of file
diff --git a/miniprogram/src/pages/comprehensive/courses/index.vue b/miniprogram/src/pages/comprehensive/courses/index.vue
index f99555b..859b448 100644
--- a/miniprogram/src/pages/comprehensive/courses/index.vue
+++ b/miniprogram/src/pages/comprehensive/courses/index.vue
@@ -118,6 +118,7 @@ const pageSize = 20
const total = ref(0)
const isLoading = ref(false)
const isLoadingMore = ref(false)
+let loadRequestId = 0
const ticketProduct = ref(null)
const ticketQty = ref(1)
@@ -143,6 +144,7 @@ const dateOptions = computed(() => {
const hasMore = computed(() => sessions.value.length < total.value)
const switchTab = (tab) => {
+ if (activeTab.value === tab) return
activeTab.value = tab
if (tab === 'tickets') {
loadTicketProduct()
@@ -153,15 +155,22 @@ const switchTab = (tab) => {
}
const onDateSelect = (date) => {
+ if (selectedDate.value === date) return
selectedDate.value = date
loadSessions(true)
}
const loadSessions = async (reset) => {
- if (activeTab.value === 'membership' && !session.isLoggedIn) return
+ if (activeTab.value === 'membership' && !session.isLoggedIn) {
+ sessions.value = []
+ total.value = 0
+ return
+ }
+ const requestId = ++loadRequestId
if (reset) {
page.value = 1
isLoading.value = true
+ sessions.value = []
} else {
isLoadingMore.value = true
}
@@ -172,11 +181,20 @@ const loadSessions = async (reset) => {
} else {
data = await courseApi.getSessions({ page: page.value, pageSize, date: selectedDate.value })
}
+ if (requestId !== loadRequestId) return
sessions.value = reset ? data.items : [...sessions.value, ...data.items]
total.value = data.total
+ } catch {
+ if (requestId !== loadRequestId) return
+ if (reset) {
+ sessions.value = []
+ total.value = 0
+ }
} finally {
- isLoading.value = false
- isLoadingMore.value = false
+ if (requestId === loadRequestId) {
+ isLoading.value = false
+ isLoadingMore.value = false
+ }
}
}
diff --git a/miniprogram/src/pages/comprehensive/private/index.vue b/miniprogram/src/pages/comprehensive/private/index.vue
index a9a69c5..243b474 100644
--- a/miniprogram/src/pages/comprehensive/private/index.vue
+++ b/miniprogram/src/pages/comprehensive/private/index.vue
@@ -50,8 +50,11 @@
v-for="(slot, si) in grid.time_slots"
:key="si"
class="grid-row"
+ :class="{ 'grid-row-first': si === 0 }"
>
- {{ slot.start }}
+
+ {{ slot.start }}
+