获得战报,刷新,领取

This commit is contained in:
mamengke01
2021-01-08 16:17:19 +08:00
parent 099026869a
commit 12f308f0f5
14 changed files with 243 additions and 83 deletions
+9
View File
@@ -1,5 +1,7 @@
const PER_SECOND = 1 * 1000;
const PER_DAY = 24 * 60 * 60;
export function nowSeconds() {
return Math.floor(Date.now() / PER_SECOND );
}
@@ -11,4 +13,11 @@ export function getTodayZeroPoint() {
date.setSeconds(0);
var time = Math.floor(date.getTime() / PER_SECOND);
return time;
}
export function checkTodayTime(seasonEndTime: number) {
if (seasonEndTime - nowSeconds() <= PER_DAY) {
return true;
}
return false;
}