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`]
if(userInfo.tagInfoResponseDTOS) { console.log("当前页面弹过",thisPageIsPushed);
try{ if(!thisPageIsPushed) {
userInfo.tagInfoResponseDTOS.forEach(item => { if(this.data.datas.componentData.pushPeople == '0') {
if(this.data.datas.componentData.pushDesignee.includes(item.id)) { 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() 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