fix bug 奇遇刷新时间
This commit is contained in:
@@ -36,10 +36,10 @@ export function getEventTime(now: Date) {
|
|||||||
let curTime = Number(now);
|
let curTime = Number(now);
|
||||||
let todayA = now.setHours(12, 0, 0, 0); // 每天12点
|
let todayA = now.setHours(12, 0, 0, 0); // 每天12点
|
||||||
let todayB = now.setHours(18, 0, 0, 0); // 每天18点
|
let todayB = now.setHours(18, 0, 0, 0); // 每天18点
|
||||||
let yesterdayA = todayA - 86400000; // 前一天12点
|
let yesterdayB = todayB - 86400000; // 前一天12点
|
||||||
let t = 0;
|
let t = 0;
|
||||||
if(curTime < todayA) {
|
if(curTime < todayA) {
|
||||||
t = yesterdayA;
|
t = yesterdayB;
|
||||||
} else if (curTime >= todayA && curTime < todayB) {
|
} else if (curTime >= todayA && curTime < todayB) {
|
||||||
t = todayA;
|
t = todayA;
|
||||||
} else if (curTime >= todayB) {
|
} else if (curTime >= todayB) {
|
||||||
|
|||||||
Reference in New Issue
Block a user