|
@@ -145,9 +145,9 @@ export default {
|
|
|
try {
|
|
|
const { info } = await this.getAdInfoFromRequest(codes)
|
|
|
this.info = info || {}
|
|
|
- const needShow = this.checkDialogShow()
|
|
|
- if (this.hasAdPic && needShow) {
|
|
|
- this.showDialog(needShow)
|
|
|
+ // p599需求更改为,有则展示,无广告图片则不展示,展示时机由服务端处理
|
|
|
+ if (this.hasAdPic) {
|
|
|
+ this.showDialog(true)
|
|
|
} else {
|
|
|
// 无广告位或者展示过了,可以初始化下一个广告位
|
|
|
this.initNextDialog()
|
|
@@ -170,19 +170,6 @@ export default {
|
|
|
console.warn(msg)
|
|
|
}
|
|
|
},
|
|
|
- checkDialogShow() {
|
|
|
- const { week } = this.dateInfo
|
|
|
- const { storageKey } = this
|
|
|
- let needShowDialog = false
|
|
|
- // 获取localStorage存的值
|
|
|
- const mark = localStorage.getItem(storageKey)
|
|
|
- if (mark && mark === String(week)) {
|
|
|
- // 说明今天弹窗出现过了,此时不在弹
|
|
|
- } else {
|
|
|
- needShowDialog = true
|
|
|
- }
|
|
|
- return needShowDialog
|
|
|
- },
|
|
|
async openAD() {
|
|
|
if (this.beforeOpen) {
|
|
|
const prevent = await this.beforeOpen()
|
|
@@ -212,10 +199,6 @@ export default {
|
|
|
this.$emit('initNext')
|
|
|
},
|
|
|
onDialogClose() {
|
|
|
- // 刷新localStorage的值
|
|
|
- const { week } = this.dateInfo
|
|
|
- const { storageKey } = this
|
|
|
- localStorage.setItem(storageKey, week)
|
|
|
this.initNextDialog()
|
|
|
}
|
|
|
}
|