Commit b395da78 authored by wildfirecode's avatar wildfirecode

1

parent 212eb24e
......@@ -7,13 +7,13 @@ import wait from "../../libs/new_tc/wait";
export default class AdSmallComp extends ComponentBase {
start(data?) {
this.visible=false;
this.visible = false;
let result;
// this.touchEnabled = this.touchChildren = false;
super.start(data);
NetManager.ins.hc_advert(() => {
const { data } = DataManager.ins.getData('hc_advert');
let { popupAdvert } = data;
let { popupAdvert } = data;
if (popupAdvert == null)
popupAdvert = { enable: false, advertList: [] }
this.visible = popupAdvert.enable;
......@@ -28,10 +28,10 @@ export default class AdSmallComp extends ComponentBase {
});
this['img'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(data.logid)
if (data.logid)
NetManager.ins.clickLog(getlogItem(data.logid));
wait(50).then(()=>{
window.location.href = result.url;
wait(50).then(() => {
if (result.url != 0) window.location.href = result.url;
});
}, this);
}
......
......@@ -519,7 +519,8 @@ export default class MapScene extends Scene {
this['adBtn'].source = result.img;
this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(32));
window.location.href = result.url;
if(result.url!=0)
window.location.href = result.url;
}, this);
}
}
......
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