Commit 7c725e17 authored by haiyoucuv's avatar haiyoucuv

1

parent 3333e8fd
This diff is collapsed.
...@@ -13565,6 +13565,11 @@ var Tools = (function () { ...@@ -13565,6 +13565,11 @@ var Tools = (function () {
Tools.propInfo.hammers = data.tools.hammers || 0; Tools.propInfo.hammers = data.tools.hammers || 0;
} }
Tools.propInfo.power = data.power || 0; Tools.propInfo.power = data.power || 0;
my.getServerTime({
success: function (t) {
Tools.actEnd = (+res.data.endTime <= +t.time);
}
});
} }
r(s); r(s);
}); });
...@@ -13758,6 +13763,7 @@ var Tools = (function () { ...@@ -13758,6 +13763,7 @@ var Tools = (function () {
booms: 0, booms: 0,
power: 0, power: 0,
}; };
Tools.actEnd = false;
return Tools; return Tools;
}()); }());
exports.Tools = Tools; exports.Tools = Tools;
...@@ -24031,6 +24037,10 @@ var CheckBtn = (function (_super) { ...@@ -24031,6 +24037,10 @@ var CheckBtn = (function (_super) {
this.btn.addEventListener(MouseEvent.CLICK, this.clickStart, this); this.btn.addEventListener(MouseEvent.CLICK, this.clickStart, this);
}; };
CheckBtn.prototype.clickStart = function () { CheckBtn.prototype.clickStart = function () {
if (Tools_1.Tools.actEnd) {
ctrls_1.showToast('活动已结束');
return;
}
Tools_1.Tools.btnDelay(this, 200); Tools_1.Tools.btnDelay(this, 200);
console.log("\u5173\u5361:" + this.checkNum); console.log("\u5173\u5361:" + this.checkNum);
ctrls_1.showPanel(StartPanelPrize_1.StartPanelPrize, this.checkData); ctrls_1.showPanel(StartPanelPrize_1.StartPanelPrize, this.checkData);
...@@ -24790,6 +24800,10 @@ var MapUI = (function (_super) { ...@@ -24790,6 +24800,10 @@ var MapUI = (function (_super) {
}, true); }, true);
break; break;
case this.taskBtn: case this.taskBtn:
if (Tools_1.Tools.actEnd) {
ctrls_1.showToast('活动已结束');
return;
}
ctrls_1.showPanel(TaskPanel_1.TaskPanel); ctrls_1.showPanel(TaskPanel_1.TaskPanel);
break; break;
} }
This diff is collapsed.
...@@ -61,6 +61,7 @@ export class Tools { ...@@ -61,6 +61,7 @@ export class Tools {
// } // }
public static actEnd: boolean = false; public static actEnd: boolean = false;
public static actStart: boolean = true;
public static baseInfo: { public static baseInfo: {
inviteFriends: any, inviteFriends: any,
...@@ -100,6 +101,7 @@ export class Tools { ...@@ -100,6 +101,7 @@ export class Tools {
my.getServerTime({ my.getServerTime({
success: (t) => { success: (t) => {
Tools.actEnd = (+res.data.endTime <= +t.time); Tools.actEnd = (+res.data.endTime <= +t.time);
Tools.actStart = (+t.time >= +res.data.startTime);
} }
}); });
} }
......
...@@ -171,6 +171,10 @@ export default class CheckBtn extends Container { ...@@ -171,6 +171,10 @@ export default class CheckBtn extends Container {
} }
public clickStart() { public clickStart() {
if(!Tools.actStart){
showToast('活动未开始');
return;
}
if (Tools.actEnd) { if (Tools.actEnd) {
showToast('活动已结束'); showToast('活动已结束');
return; return;
......
...@@ -56,6 +56,10 @@ export default class MapUI extends Container { ...@@ -56,6 +56,10 @@ export default class MapUI extends Container {
break; break;
case this.taskBtn: case this.taskBtn:
if(!Tools.actStart){
showToast('活动未开始');
return;
}
if (Tools.actEnd) { if (Tools.actEnd) {
showToast('活动已结束'); showToast('活动已结束');
return; return;
......
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