修复bug

This commit is contained in:
zhouyanli
2026-08-13 17:42:59 +08:00
parent 32765cc004
commit 9e8f5d6acc
11 changed files with 42 additions and 50 deletions

View File

@@ -178,7 +178,7 @@
</button>
<!-- 活动实况页显示添加实况按钮 -->
<button class="action-btn add-status-btn" v-if="hasSigned && !isActivityEnded && activeTab === 'status'" @click="liveClick">添加实况</button>
<button class="action-btn add-status-btn" v-if="hasSigned && isActivityStarted && !isActivityEnded && activeTab === 'status'" @click="liveClick">添加实况</button>
</view>
<!-- 报名确认模态框 -->
@@ -251,6 +251,12 @@ const isActivityEnded = computed(() => {
return false
})
// 判断活动是否已开始(开始时间已到)
const isActivityStarted = computed(() => {
if (!activityConent.value.startTime) return false
return moment().isSameOrAfter(moment(activityConent.value.startTime))
})
@@ -277,9 +283,9 @@ onLoad((option) =>{
}
// 3. 监听实况列表刷新事件
// uni.$on('refreshLiveList', () => {
// getLiveActivityList()
// })
uni.$on('refreshLiveList', () => {
getLiveActivityList()
})
})
// 获取列表详情
@@ -449,7 +455,7 @@ const liveClick = () =>{
// ---------
onUnload(() => {
// uni.$off('refreshLiveList')
uni.$off('refreshLiveList')
})
// 显示提示信息