Commit 7c725e17 authored by haiyoucuv's avatar haiyoucuv

1

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