Fix:5527 【管理后台】媒体管理-弹窗海报,在填写使用指南板块链接时每次从其他板块切换至首页均重复弹出弹窗
This commit is contained in:
+23
-2
@@ -916,6 +916,18 @@ export default {
|
||||
}
|
||||
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 = {}) {
|
||||
const drawEntranceConfig = data.drawEntranceConfig || {}
|
||||
this.$set(this, 'drawEntranceConfig', drawEntranceConfig)
|
||||
@@ -932,10 +944,19 @@ export default {
|
||||
(data.lotteryCanDraw || false)
|
||||
)
|
||||
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() {
|
||||
if (!this.isDrawPosterVisible && this.canShowOldPoster) {
|
||||
if (!this.isDrawPosterVisible && this.canShowOldPoster && !this.hasShownOldUserPopupInSession()) {
|
||||
this.markOldUserPopupShownInSession()
|
||||
this.isOldUser = true
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user