Commit eb68402a by howie

'弹窗广告组件'

parent 5710a0b3
......@@ -23,19 +23,24 @@ Component({
},
ready() {
let routes = getCurrentPages()
let page = routes[routes.length - 1].route
let userInfo = wx.getStorageSync("loginUserInfo")
console.log("用户信息",userInfo);
if(this.data.datas.componentData.pushPeople == '1') {
if(userInfo.tagInfoResponseDTOS) {
try{
userInfo.tagInfoResponseDTOS.forEach(item => {
if(this.data.datas.componentData.pushDesignee.includes(item.id)) {
let thisPageIsPushed = app.globalData[`${app.globalData.shopInfo.shopCode}_${page}_${this.data.datas.id}_thisPageIsPushed`]
console.log("当前页面弹过",thisPageIsPushed);
if(!thisPageIsPushed) {
if(this.data.datas.componentData.pushPeople == '0') {
this.init()
}else if(this.data.datas.componentData.pushPeople == '1') {
if(userInfo.tagInfoResponseDTOS) {
let length = userInfo.tagInfoResponseDTOS.length
for (let i = 0; i < length; i++) {
if(this.data.datas.componentData.pushDesignee.includes(userInfo.tagInfoResponseDTOS[i].id)){
this.init()
throw Error()
break;
}
})
}catch(e) {
console.log(e);
}
}
}
}
......@@ -91,6 +96,9 @@ Component({
},
// 判断何时定时关闭
autoOff() {
let routes = getCurrentPages()
let page = routes[routes.length - 1].route
app.globalData[`${app.globalData.shopInfo.shopCode}_${page}_${this.data.datas.id}_thisPageIsPushed`] = true
if (
this.data.datas.componentData.columnNum > 0 &&
this.data.datas.componentData.autoOff
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment