diff --git a/src/views/Ranking/GamesKing/index.vue b/src/views/Ranking/GamesKing/index.vue index 945f98b..632bd65 100644 --- a/src/views/Ranking/GamesKing/index.vue +++ b/src/views/Ranking/GamesKing/index.vue @@ -906,7 +906,7 @@ - +
@@ -957,8 +957,8 @@ user-select: none; touch-action: manipulation; " - @click="closedPopup" - @touchend="closedPopup" + @click.stop.prevent="closedPopup" + @touchend.stop.prevent="closedPopup" > { const pageBackHidden = computed(() => { return maskLayerShow.value || !checkStatus.value }) +const POPUP_CLOSE_CLICK_GUARD_MS = 400 +const lastPopupClosedAt = ref(0) const handlePageBack = () => { + console.log('点击退出页面') + + if (Date.now() - lastPopupClosedAt.value < POPUP_CLOSE_CLICK_GUARD_MS) return if (pageBackHidden.value) return console.log('home back') closePage() @@ -1075,6 +1080,9 @@ const openPopup = (type) => { // 关闭弹窗 const closedPopup = () => { + if (!maskLayerShow.value) return + + lastPopupClosedAt.value = Date.now() console.log('点击关闭弹窗') // 此时打开的是每日弹窗,设置为已看过