Commit 9503f907 authored by 邱旭's avatar 邱旭

1

parent 56926ef4
...@@ -523,24 +523,21 @@ export default class MapScene extends Scene { ...@@ -523,24 +523,21 @@ export default class MapScene extends Scene {
return; return;
} }
let flag = res.data.completeFlag; let flag = res.data.completeFlag;
if (this.timer) {
this.timer.stop();
}
switch (true) { switch (true) {
case (flag == 0): // 未完成 显示倒计时 case (flag == 0): // 未完成 显示倒计时
this["inviteGroup"].visible = true; this["inviteGroup"].visible = true;
this["inviteTipsBg"].visible = true; this["inviteTipsBg"].visible = true;
this["inviteTips"].visible = true; this["inviteTips"].visible = true;
this.cutTime = res.data.endTime - res.data.sysTime + 5000; this.cutTime = res.data.endTime - res.data.sysTime + 5000;
if (this.timer) {
this.timer.stop();
}
this.timer = new egret.Timer(1000, 0); this.timer = new egret.Timer(1000, 0);
this.timer.addEventListener(egret.TimerEvent.TIMER, this.cutTimer, this); this.timer.addEventListener(egret.TimerEvent.TIMER, this.cutTimer, this);
this.timer.start(); this.timer.start();
this.cutTimer(); this.cutTimer();
break; break;
case (flag == 1): // 完成未开奖 待领奖 显示待领奖 case (flag == 1): // 完成未开奖 待领奖 显示待领奖
if (this.timer) {
this.timer.stop();
}
this["inviteGroup"].visible = true; this["inviteGroup"].visible = true;
this["inviteTipsBg"].visible = true; this["inviteTipsBg"].visible = true;
this["inviteTips"].visible = true; this["inviteTips"].visible = true;
...@@ -558,7 +555,7 @@ export default class MapScene extends Scene { ...@@ -558,7 +555,7 @@ export default class MapScene extends Scene {
this["inviteTips"].visible = true; this["inviteTips"].visible = true;
this["inviteTips"].text = "立即到账"; this["inviteTips"].text = "立即到账";
break; break;
case (flag == 5): // 可以开启下一次发任务 显示立即到账 case (flag == 5): // 等待开启下一次发任务 无角标
this["inviteGroup"].visible = true; this["inviteGroup"].visible = true;
this["inviteTipsBg"].visible = false; this["inviteTipsBg"].visible = false;
this["inviteTips"].visible = false; this["inviteTips"].visible = false;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"invitationCount": null, "invitationCount": null,
"sysTime": null, "sysTime": null,
"endTime": null, "endTime": null,
"completeFlag": 3, "completeFlag": 2,
"openPrizMsg": null, "openPrizMsg": null,
"prizeType": "7", "prizeType": "7",
"prizeName": null, "prizeName": null,
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"avatar": null "avatar": null
} }
], ],
"completeFlag": 1, "completeFlag": 6,
"openPrizeMsg": "图片", "openPrizeMsg": "图片",
"prizeType": "nickname", "prizeType": "nickname",
"prizeName": "nickname", "prizeName": "nickname",
......
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