修复bug
This commit is contained in:
@@ -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')
|
||||
})
|
||||
|
||||
// 显示提示信息
|
||||
|
||||
Reference in New Issue
Block a user