Fix:5527 【管理后台】媒体管理-弹窗海报,在填写使用指南板块链接时每次从其他板块切换至首页均重复弹出弹窗

This commit is contained in:
linxi
2026-08-22 11:05:27 +08:00
parent 876e15b655
commit f1e063aab9
+23 -2
View File
@@ -916,6 +916,18 @@ export default {
} }
app.globalData.homeDrawPosterShownInSession = true app.globalData.homeDrawPosterShownInSession = true
}, },
hasShownOldUserPopupInSession() {
const app = getApp && getApp()
return Boolean(app && app.globalData && app.globalData.homeOldUserPopupShownInSession)
},
markOldUserPopupShownInSession() {
const app = getApp && getApp()
if (!app) return
if (!app.globalData) {
app.globalData = {}
}
app.globalData.homeOldUserPopupShownInSession = true
},
initPosterPopupState(data = {}) { initPosterPopupState(data = {}) {
const drawEntranceConfig = data.drawEntranceConfig || {} const drawEntranceConfig = data.drawEntranceConfig || {}
this.$set(this, 'drawEntranceConfig', drawEntranceConfig) this.$set(this, 'drawEntranceConfig', drawEntranceConfig)
@@ -932,10 +944,19 @@ export default {
(data.lotteryCanDraw || false) (data.lotteryCanDraw || false)
) )
this.isDrawPosterVisible = shouldShowDrawPoster this.isDrawPosterVisible = shouldShowDrawPoster
this.isOldUser = !shouldShowDrawPoster && !hasShownDrawPosterInSession && this.canShowOldPoster const shouldShowOldUserPopup =
!shouldShowDrawPoster &&
!hasShownDrawPosterInSession &&
this.canShowOldPoster &&
!this.hasShownOldUserPopupInSession()
if (shouldShowOldUserPopup) {
this.markOldUserPopupShownInSession()
}
this.isOldUser = shouldShowOldUserPopup
}, },
showNextPoster() { showNextPoster() {
if (!this.isDrawPosterVisible && this.canShowOldPoster) { if (!this.isDrawPosterVisible && this.canShowOldPoster && !this.hasShownOldUserPopupInSession()) {
this.markOldUserPopupShownInSession()
this.isOldUser = true this.isOldUser = true
} }
}, },