fix bug 奇遇刷新时间

This commit is contained in:
luying
2020-10-26 11:28:29 +08:00
parent 79ca79a6f4
commit 115a846e46

View File

@@ -36,10 +36,10 @@ export function getEventTime(now: Date) {
let curTime = Number(now);
let todayA = now.setHours(12, 0, 0, 0); // 每天12点
let todayB = now.setHours(18, 0, 0, 0); // 每天18点
let yesterdayA = todayA - 86400000; // 前一天12点
let yesterdayB = todayB - 86400000; // 前一天12点
let t = 0;
if(curTime < todayA) {
t = yesterdayA;
t = yesterdayB;
} else if (curTime >= todayA && curTime < todayB) {
t = todayA;
} else if (curTime >= todayB) {