Commit eb68402a by howie

'弹窗广告组件'

parent 5710a0b3
...@@ -23,19 +23,24 @@ Component({ ...@@ -23,19 +23,24 @@ Component({
}, },
ready() { ready() {
let routes = getCurrentPages()
let page = routes[routes.length - 1].route
let userInfo = wx.getStorageSync("loginUserInfo") let userInfo = wx.getStorageSync("loginUserInfo")
console.log("用户信息",userInfo); console.log("用户信息",userInfo);
if(this.data.datas.componentData.pushPeople == '1') { 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) { if(userInfo.tagInfoResponseDTOS) {
try{ let length = userInfo.tagInfoResponseDTOS.length
userInfo.tagInfoResponseDTOS.forEach(item => { for (let i = 0; i < length; i++) {
if(this.data.datas.componentData.pushDesignee.includes(item.id)) { if(this.data.datas.componentData.pushDesignee.includes(userInfo.tagInfoResponseDTOS[i].id)){
this.init() this.init()
throw Error() break;
}
} }
})
}catch(e) {
console.log(e);
} }
} }
} }
...@@ -91,6 +96,9 @@ Component({ ...@@ -91,6 +96,9 @@ Component({
}, },
// 判断何时定时关闭 // 判断何时定时关闭
autoOff() { 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 ( if (
this.data.datas.componentData.columnNum > 0 && this.data.datas.componentData.columnNum > 0 &&
this.data.datas.componentData.autoOff 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