Commit 0d9939f2 authored by 邱旭's avatar 邱旭

1

parent cd469f27
...@@ -42,7 +42,6 @@ import BloodPanel2 from "../../src/panels/BloodPanel2"; ...@@ -42,7 +42,6 @@ import BloodPanel2 from "../../src/panels/BloodPanel2";
import ExchangePanel from "../../src/panels/ExchangePanel"; import ExchangePanel from "../../src/panels/ExchangePanel";
import { initstatistics } from "../../src/statistics"; import { initstatistics } from "../../src/statistics";
import ADPanel from "../../src/panels/ADPanel"; import ADPanel from "../../src/panels/ADPanel";
import TaskPanel from "../../src/panels/TaskPanel";
import TaskPrizePanel from "../../src/panels/TaskPrizePanel"; import TaskPrizePanel from "../../src/panels/TaskPrizePanel";
import BackPanel from "../../src/panels/BackPanel"; import BackPanel from "../../src/panels/BackPanel";
import InvitePanel from "../../src/panels/InvitePanel"; import InvitePanel from "../../src/panels/InvitePanel";
...@@ -74,6 +73,7 @@ import { GFun } from "../tc/util/GFun"; ...@@ -74,6 +73,7 @@ import { GFun } from "../tc/util/GFun";
import TaskCenter from "../../src/panels/TaskCenter/TaskCenter"; import TaskCenter from "../../src/panels/TaskCenter/TaskCenter";
import TaskCenterPrize from "../../src/panels/TaskCenter/TaskCenterPrize"; import TaskCenterPrize from "../../src/panels/TaskCenter/TaskCenterPrize";
import TaskCenterNoPrize from "../../src/panels/TaskCenter/TaskCenterNoPrize"; import TaskCenterNoPrize from "../../src/panels/TaskCenter/TaskCenterNoPrize";
import { GDispatcher } from "../tc/util/GDispatcher";
export default class MainBase extends eui.UILayer { export default class MainBase extends eui.UILayer {
constructor() { constructor() {
...@@ -526,11 +526,14 @@ export default class MainBase extends eui.UILayer { ...@@ -526,11 +526,14 @@ export default class MainBase extends eui.UILayer {
}, window['collectRuleId']); }, window['collectRuleId']);
// } // }
GDispatcher.dispatchEvent('docVisible'); // 触发document显示事件
} }
if (document.visibilityState == "hidden") { if (document.visibilityState == "hidden") {
stopBg(); stopBg();
stopGamebg(); stopGamebg();
GDispatcher.dispatchEvent('docHide'); // 触发document隐藏事件
} }
}) })
......
...@@ -12,20 +12,13 @@ ...@@ -12,20 +12,13 @@
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Image id="img" y="375.77" touchEnabled="true" width="512" height="240" scaleX="1" scaleY="1" horizontalCenter="0" source="{data.url}" visible="false"/> <e:Image id="img" y="375.77" touchEnabled="true" width="512" height="240" scaleX="1" scaleY="1" horizontalCenter="0" source="{data.url}" visible="false"/>
<e:Image id="money" y="366.4" horizontalCenter="0.5" scaleX="0.7" scaleY="0.7" source="common_money_png"/> <e:Image id="money" y="366.4" horizontalCenter="5.5" scaleX="0.7" scaleY="0.7" source="common_money_png"/>
<e:Label id="propnums2" text="30" textColor="0x885037" bold="true" y="527.64" width="75" textAlign="right" x="282.6" fontFamily="FZY3JW"/> <e:Label id="propnums2" text="30" textColor="0x885037" bold="true" y="526.64" width="75" textAlign="right" x="287.6" fontFamily="FZY3JW"/>
<e:Image id="blood" y="368.16" horizontalCenter="0" source="common_blood_png" scaleX="0.7" scaleY="0.7" visible="false"/> <e:Image id="blood" y="368.16" horizontalCenter="0" source="common_blood_png" scaleX="0.7" scaleY="0.7" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="378.12" visible="false"> <e:Group id="numsgroup" x="396.38" y="378.12" visible="false">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/> <e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="nums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW"/> <e:Label id="nums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW"/>
</e:Group> </e:Group>
<e:Label id="tipsLabel" text="继续完成任务可以获得更多元宝哦~" y="632.73" textColor="0xF54500" fontFamily="FZY3JW" size="26" horizontalCenter="0"/> <e:Label id="tipsLabel" text="继续完成任务可以获得更多元宝哦~" y="632.73" textColor="0xF54500" fontFamily="FZY3JW" size="26" horizontalCenter="0"/>
<e:Button id="close2Btn" label="" y="676.73" horizontalCenter="0"> <e:Image id="btn" y="676" source="TaskCenterGame_png" horizontalCenter="0"/>
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="TaskCenterGame_png" source.down="TaskCenterGame_png" source.disabled="TaskCenterGame_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin> </e:Skin>
...@@ -2,6 +2,7 @@ import Panel from "../../../libs/new_wx/components/Panel"; ...@@ -2,6 +2,7 @@ import Panel from "../../../libs/new_wx/components/Panel";
import getSkinPath from "../../../libs/new_wx/utils/getSkinPath"; import getSkinPath from "../../../libs/new_wx/utils/getSkinPath";
import { NetManager } from "../../../libs/tw/manager/NetManager"; import { NetManager } from "../../../libs/tw/manager/NetManager";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
export default class TaskCenter extends Panel { export default class TaskCenter extends Panel {
public closeBtn: eui.Button; public closeBtn: eui.Button;
...@@ -9,13 +10,12 @@ export default class TaskCenter extends Panel { ...@@ -9,13 +10,12 @@ export default class TaskCenter extends Panel {
public list: eui.List; public list: eui.List;
onShowAnim() { onShowAnim() {
let canvasW = 750 / window.innerWidth * window.innerWidth;
let canvasH = 750 / window.innerWidth * window.innerHeight; let canvasH = 750 / window.innerWidth * window.innerHeight;
// console.log('canvasW:' + canvasW + '\tcanvasH:' + canvasH); // let canvasW = 750 / window.innerWidth * window.innerWidth;
console.log({ // console.log({
canvasW: canvasW, // canvasW: canvasW,
canvasH: canvasH // canvasH: canvasH
}); // });
egret.Tween.get(this).set({y: canvasH}).to({y: canvasH - 710}, 300, egret.Ease.quadInOut); egret.Tween.get(this).set({y: canvasH}).to({y: canvasH - 710}, 300, egret.Ease.quadInOut);
} }
...@@ -24,6 +24,7 @@ export default class TaskCenter extends Panel { ...@@ -24,6 +24,7 @@ export default class TaskCenter extends Panel {
this.list.useVirtualLayout = false; this.list.useVirtualLayout = false;
this.list.itemRenderer = TaskCenterItem; this.list.itemRenderer = TaskCenterItem;
this.getTaskInfo(); this.getTaskInfo();
GDispatcher.addEvent('docVisible', this.getTaskInfo, this);
} }
private getTaskInfo() { private getTaskInfo() {
...@@ -33,13 +34,12 @@ export default class TaskCenter extends Panel { ...@@ -33,13 +34,12 @@ export default class TaskCenter extends Panel {
} }
const data = res.data; const data = res.data;
this.list.dataProvider = new eui.ArrayCollection(data); this.list.dataProvider = new eui.ArrayCollection(data);
new eui.ArrayCollection(data);
}); });
} }
onTouchTap_closeBtn() { onTouchTap_closeBtn() {
// let canvasW = 750 / window.innerWidth * window.innerWidth;
let canvasH = 750 / window.innerWidth * window.innerHeight; let canvasH = 750 / window.innerWidth * window.innerHeight;
// console.log('canvasW:' + canvasW + 'canvasH:' + canvasH);
egret.Tween.get(this).to({y: canvasH}, 300, egret.Ease.quadInOut).call(() => { egret.Tween.get(this).to({y: canvasH}, 300, egret.Ease.quadInOut).call(() => {
super.onTouchTap_closeBtn(); super.onTouchTap_closeBtn();
}); });
...@@ -48,6 +48,11 @@ export default class TaskCenter extends Panel { ...@@ -48,6 +48,11 @@ export default class TaskCenter extends Panel {
get skinKey() { get skinKey() {
return 'TaskCenter' return 'TaskCenter'
} }
destroy() {
super.destroy();
GDispatcher.removeEvent('docVisible', this.getTaskInfo, this);
}
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////
......
import Panel from "../../../libs/new_wx/components/Panel"; import Panel from "../../../libs/new_wx/components/Panel";
import { DataManager } from "../../../libs/tw/manager/DataManager";
import { addAdComp } from "../BoxPanel"; import { addAdComp } from "../BoxPanel";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
export default class TaskCenterPrize extends Panel { export default class TaskCenterPrize extends Panel {
public closeBtn: eui.Button; public closeBtn:eui.Button;
public img: eui.Image; public img:eui.Image;
public money: eui.Image; public money:eui.Image;
public propnums2: eui.Label; public propnums2:eui.Label;
public blood: eui.Image; public blood:eui.Image;
public numsgroup: eui.Group; public numsgroup:eui.Group;
public numsbg: eui.Image; public numsbg:eui.Image;
public nums: eui.Label; public nums:eui.Label;
public tipsLabel: eui.Label; public tipsLabel:eui.Label;
public close2Btn: eui.Button; public btn:eui.Image;
start(data) { start(data) {
super.start(); super.start();
...@@ -65,8 +63,4 @@ export default class TaskCenterPrize extends Panel { ...@@ -65,8 +63,4 @@ export default class TaskCenterPrize extends Panel {
get skinKey() { get skinKey() {
return 'TaskCenterPrize' return 'TaskCenterPrize'
} }
protected get closeBtns(): eui.Button[] {
return [this['closeBtn'], this['close2Btn']]
}
} }
\ No newline at end of file
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
"currentSession": { "currentSession": {
"sessionIndex": 6, "sessionIndex": 6,
"startTime": 1573210800000, "startTime": 1573210800000,
"endTime": 1573210803000, "endTime": 1573299903000,
"limitScore": 10 "limitScore": 10
}, },
"nextSession": { "nextSession": {
"sessionIndex": 10, "sessionIndex": 10,
"startTime": 1573440915952, "startTime": 1573440915952,
"endTime": 1573440915952, "endTime": 1573299903000,
"limitScore": 10 "limitScore": 10
}, },
"canJoin": true "canJoin": true
......
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