Commit 8afe90e7 authored by wildfirecode's avatar wildfirecode

1

parent aa72728f
...@@ -3,16 +3,25 @@ import Panel from "../components/Panel"; ...@@ -3,16 +3,25 @@ import Panel from "../components/Panel";
import Loading from "../components/Loading"; import Loading from "../components/Loading";
import wait from "../../new_tc/wait"; import wait from "../../new_tc/wait";
export default class PanelCtrl { export default class PanelCtrl {
_panels:any[] _panels:any[]
showPanels(panels: any[]) { _callback:any;
showPanels(panels: any[],callback) {
this._panels=panels; this._panels=panels;
this._callback=callback;
if(panels.length<=0) {
this._callback();
this._callback=null;
}
if(this._panels.length <=0 ) return; if(this._panels.length <=0 ) return;
const panel = this._panels.shift(); const panel = this._panels.shift();
PanelCtrl.instance.show(panel); PanelCtrl.instance.show(panel);
} }
checkPanels(){ checkPanels(){
if(this._panels && this._panels.length <=0 ) {
this._panels=null;
if(this._callback)this._callback();
}
if(!this._panels || this._panels.length <=0 ) return; if(!this._panels || this._panels.length <=0 ) return;
wait(300); wait(300);
const panel = this._panels.shift(); const panel = this._panels.shift();
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="MapSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect id="rectbg" width="750" height="1206" x="2" y="-3"/> <e:Rect id="rectbg" width="750" height="1206"/>
<e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on" locked="true"> <e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on" locked="true">
<e:Group id="scrollGroup"> <e:Group id="scrollGroup">
</e:Group> </e:Group>
...@@ -140,6 +140,7 @@ ...@@ -140,6 +140,7 @@
<e:Image id="act2Btn" source="map2红包大作战_png" x="163.76" y="159"/> <e:Image id="act2Btn" source="map2红包大作战_png" x="163.76" y="159"/>
</e:Group> </e:Group>
<e:Image id="actsShowBtn" source="map2+_png" x="-7.64" y="5.45"/> <e:Image id="actsShowBtn" source="map2+_png" x="-7.64" y="5.45"/>
<e:Image source="maphot_png" x="91.52" y="15.72"/>
</e:Group> </e:Group>
<e:Group id="settingsx" x="30" scaleX="1.4" scaleY="1.4" bottom="23" locked="true"> <e:Group id="settingsx" x="30" scaleX="1.4" scaleY="1.4" bottom="23" locked="true">
<e:Group id="settingGroup" x="2" y="6.08" visible="false"> <e:Group id="settingGroup" x="2" y="6.08" visible="false">
...@@ -200,5 +201,9 @@ ...@@ -200,5 +201,9 @@
</e:Group> </e:Group>
<e:Label text="点击开宝箱" y="791" size="37" horizontalCenter="0" bold="true"/> <e:Label text="点击开宝箱" y="791" size="37" horizontalCenter="0" bold="true"/>
</e:Group> </e:Group>
<e:Group id="guide" visible="false">
<e:Rect width="750" height="1624" x="0" y="0" alpha="0.7"/>
<e:Image id="guideInner" source="map2热门引导_png" x="12.62" y="346.28"/>
</e:Group>
<w:Config id="16c89f4ae1a"/> <w:Config id="16c89f4ae1a"/>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -142,14 +142,13 @@ export default class MapScene extends Scene { ...@@ -142,14 +142,13 @@ export default class MapScene extends Scene {
if (!readCache() && getHomeData().levels.length <= 0) { //引导 if (!readCache() && getHomeData().levels.length <= 0) { //引导
const guide = new GuideCon(() => { const guide = new GuideCon(() => {
PanelCtrl.instance.showPanels(panels,this.onAllPanelHide);
PanelCtrl.instance.showPanels(panels);
}); });
this.addChild(guide); this.addChild(guide);
guide.play(1) guide.play(1)
console.log(guide) console.log(guide)
} else { //不用引导 } else { //不用引导
PanelCtrl.instance.showPanels(panels); PanelCtrl.instance.showPanels(panels,this.onAllPanelHide);
} }
}, window['signActivityId']); }, window['signActivityId']);
...@@ -192,7 +191,7 @@ export default class MapScene extends Scene { ...@@ -192,7 +191,7 @@ export default class MapScene extends Scene {
for (const key in MapScene.iconHash) { for (const key in MapScene.iconHash) {
const levelOrder = parseInt(key); const levelOrder = parseInt(key);
const element = MapScene.iconHash[key]; const element = MapScene.iconHash[key];
if(!element.hasEventListener(egret.TouchEvent.TOUCH_TAP)){ if (!element.hasEventListener(egret.TouchEvent.TOUCH_TAP)) {
element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => { element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if ( if (
(levelOrder > (homeData.levels.length + 1) && levelOrder > 1) (levelOrder > (homeData.levels.length + 1) && levelOrder > 1)
...@@ -265,21 +264,27 @@ export default class MapScene extends Scene { ...@@ -265,21 +264,27 @@ export default class MapScene extends Scene {
this.scroll.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this); this.scroll.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
} }
onAllPanelHide = ()=>{
if( !localStorage.getItem('activityguide') ) {
this['guide'].visible=true;
}
}
onEnterFrame() { onEnterFrame() {
const offset =0; const offset = 0;
const y0 = this.scroll.viewport.scrollV+offset; const y0 = this.scroll.viewport.scrollV + offset;
const y1 = this.stage.stageHeight + this.scroll.viewport.scrollV - offset; const y1 = this.stage.stageHeight + this.scroll.viewport.scrollV - offset;
// console.log(y0, y1); // console.log(y0, y1);
let count = 0; let count = 0;
for (const key in MapScene.iconHash) { for (const key in MapScene.iconHash) {
const icon = MapScene.iconHash[key]; const icon = MapScene.iconHash[key];
if(icon['visibleY'] >= y0 && icon['visibleY'] <= y1) { if (icon['visibleY'] >= y0 && icon['visibleY'] <= y1) {
icon.show(); icon.show();
}else if(icon.parent) { } else if (icon.parent) {
icon.hide(); icon.hide();
} }
if(icon.parent) if (icon.parent)
count++; count++;
} }
} }
...@@ -519,11 +524,18 @@ export default class MapScene extends Scene { ...@@ -519,11 +524,18 @@ export default class MapScene extends Scene {
} }
onTap_actsShowBtn() { onTap_actsShowBtn() {
this['actIconsGroup'].visible=!this['actIconsGroup'].visible; this['actIconsGroup'].visible = !this['actIconsGroup'].visible;
} }
onTap_act1btn() { onTap_act1btn() {
PanelCtrl.instance.show("HbCutTime"); PanelCtrl.instance.show("HbCutTime");
} }
onTap_guide() {
this['guide'].visible=false;
localStorage.setItem('activityguide','1');
}
onTap_act2btn() {
PanelCtrl.instance.show("HbCutTime");
}
onTap_inviteBtn() { onTap_inviteBtn() {
NetManager.ins.clickLog(getlogItem(33)); NetManager.ins.clickLog(getlogItem(33));
...@@ -618,7 +630,10 @@ export default class MapScene extends Scene { ...@@ -618,7 +630,10 @@ export default class MapScene extends Scene {
switch (true) { switch (true) {
case (flag == 0): // 未完成 显示倒计时 case (flag == 0): // 未完成 显示倒计时
this["inviteGroup"].visible = true; this["inviteGroup"].visible = true;
if(!mapAdvert || mapAdvert.enable==false) this['activitys'].y = 458; if (!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
NetManager.ins.showLog(getlogItem(33)); NetManager.ins.showLog(getlogItem(33));
this["inviteTipsBg"].visible = true; this["inviteTipsBg"].visible = true;
this["inviteTips"].visible = true; this["inviteTips"].visible = true;
...@@ -631,7 +646,10 @@ export default class MapScene extends Scene { ...@@ -631,7 +646,10 @@ export default class MapScene extends Scene {
case (flag == 1): // 完成未开奖 待领奖 显示待领奖 case (flag == 1): // 完成未开奖 待领奖 显示待领奖
NetManager.ins.showLog(getlogItem(33)); NetManager.ins.showLog(getlogItem(33));
this["inviteGroup"].visible = true; this["inviteGroup"].visible = true;
if(!mapAdvert || mapAdvert.enable==false) this['activitys'].y = 458; if (!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
this["inviteTipsBg"].visible = true; this["inviteTipsBg"].visible = true;
this["inviteTips"].visible = true; this["inviteTips"].visible = true;
this["inviteTips"].text = "待领奖"; this["inviteTips"].text = "待领奖";
...@@ -639,14 +657,20 @@ export default class MapScene extends Scene { ...@@ -639,14 +657,20 @@ export default class MapScene extends Scene {
case (flag == 2): // 领奖成功 无角标 case (flag == 2): // 领奖成功 无角标
case (flag == 3): // 领奖失败 无角标 case (flag == 3): // 领奖失败 无角标
this["inviteGroup"].visible = true; this["inviteGroup"].visible = true;
if(!mapAdvert || mapAdvert.enable==false) this['activitys'].y = 458; if (!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
NetManager.ins.showLog(getlogItem(33)); NetManager.ins.showLog(getlogItem(33));
this["inviteTipsBg"].visible = false; this["inviteTipsBg"].visible = false;
this["inviteTips"].visible = false; this["inviteTips"].visible = false;
break; break;
case (flag == 4): // 可以开启下一次发任务 显示立即到账 case (flag == 4): // 可以开启下一次发任务 显示立即到账
this["inviteGroup"].visible = true; this["inviteGroup"].visible = true;
if(!mapAdvert || mapAdvert.enable==false) this['activitys'].y = 458; if (!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
NetManager.ins.showLog(getlogItem(33)); NetManager.ins.showLog(getlogItem(33));
this["inviteTipsBg"].visible = true; this["inviteTipsBg"].visible = true;
this["inviteTips"].visible = true; this["inviteTips"].visible = true;
...@@ -654,7 +678,10 @@ export default class MapScene extends Scene { ...@@ -654,7 +678,10 @@ export default class MapScene extends Scene {
break; break;
case (flag == 5): // 等待开启下一次发任务 无角标 case (flag == 5): // 等待开启下一次发任务 无角标
this["inviteGroup"].visible = true; this["inviteGroup"].visible = true;
if(!mapAdvert || mapAdvert.enable==false) this['activitys'].y = 458; if (!mapAdvert || mapAdvert.enable == false) {
this['activitys'].y = 458;
this['guideInner'].y = 185;
}
NetManager.ins.showLog(getlogItem(33)); NetManager.ins.showLog(getlogItem(33));
this["inviteTipsBg"].visible = false; this["inviteTipsBg"].visible = false;
this["inviteTips"].visible = false; this["inviteTips"].visible = false;
...@@ -662,10 +689,13 @@ export default class MapScene extends Scene { ...@@ -662,10 +689,13 @@ export default class MapScene extends Scene {
case (flag == 6): // 无入口 case (flag == 6): // 无入口
this["inviteGroup"].visible = false; this["inviteGroup"].visible = false;
this['adBtn'].y = 323.76; this['adBtn'].y = 323.76;
if(mapAdvert && mapAdvert.enable) if (mapAdvert && mapAdvert.enable) {
this['guideInner'].y = 185;
this['activitys'].y = 458; this['activitys'].y = 458;
else } else {
this['guideInner'].y = 30;
this['activitys'].y = 303.76; this['activitys'].y = 303.76;
}
break; break;
default: default:
break; break;
...@@ -717,7 +747,9 @@ export default class MapScene extends Scene { ...@@ -717,7 +747,9 @@ export default class MapScene extends Scene {
protected initEvents() { protected initEvents() {
// this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this) // this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this)
this['guide'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_guide, this);
this['act1Btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_act1btn, this); this['act1Btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_act1btn, this);
this['act2Btn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_act2btn, this);
this['actsShowBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_actsShowBtn, this); this['actsShowBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_actsShowBtn, this);
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_inviteBtn, this); this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_inviteBtn, this);
this['friendBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_friendBtn, this) this['friendBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_friendBtn, this)
......
...@@ -46,7 +46,7 @@ const config = { ...@@ -46,7 +46,7 @@ const config = {
data: './happyclear/openTreasureBox.json' data: './happyclear/openTreasureBox.json'
}, },
'/customActivity/happyclear/home': { '/customActivity/happyclear/home': {
data: './happyclear/homemax.json' data: './happyclear/home.json'
}, },
'/customActivity/happyclear/getLevelInfo': { '/customActivity/happyclear/getLevelInfo': {
data: './happyclear/getLevelInfo.json' data: './happyclear/getLevelInfo.json'
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
} }
] ]
}, },
"noticeA1dvert": { "noticeAdvert": {
"enable": true, "enable": true,
"advertList": [ "advertList": [
{ {
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
} }
] ]
}, },
"popupAd1vert": { "enable": true, "popupAdvert": { "enable": true,
"advertList": [ "advertList": [
{ {
"img": "//yun.duiba.com.cn/images/201910/zqtdp6xibw.jpg", "img": "//yun.duiba.com.cn/images/201910/zqtdp6xibw.jpg",
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"invitationCount": 1, "invitationCount": 1,
"sysTime": 1572403459405, "sysTime": 1572403459405,
"endTime": 1572489858000, "endTime": 1572489858000,
"completeFlag": 6, "completeFlag": 5,
"openPrizMsg": null, "openPrizMsg": null,
"prizeType": "7", "prizeType": "7",
"prizeName": null, "prizeName": null,
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
"success": true, "success": true,
"signInfoVO": { "signInfoVO": {
"continueDay": 6, "continueDay": 6,
"todaySigned": 1 "todaySigned": 0
} }
} }
\ No newline at end of file
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