From 8e66f93a16f956f1bf95c8ed43fed0bece3dff2b Mon Sep 17 00:00:00 2001 From: any Date: Sat, 26 Dec 2020 21:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=A5=E9=94=99=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E4=BF=AE=E5=A4=8D0=E7=82=B9=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_live_redrain.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jd_live_redrain.js b/jd_live_redrain.js index 96f147fd..4de7cad5 100644 --- a/jd_live_redrain.js +++ b/jd_live_redrain.js @@ -85,7 +85,7 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; if (!($.st <= nowTs && nowTs < $.ed)) { $.log(`远程红包雨配置获取错误,从本地读取配置`) $.log(`\n`) - let hour = new Date().getUTCHours() + 8 + let hour = (new Date().getUTCHours() + 8) %24 if (ids[hour]){ $.activityId = ids[hour] $.log(`本地红包雨配置获取成功`) @@ -103,7 +103,7 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; $.index = i + 1; $.isLogin = true; $.nickName = ''; - message = `【${new Date($.st).getHours()}点${$.name}】` + message = `【${new Date().getUTCHours()+8}点${$.name}】` await TotalBean(); console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); if (!$.isLogin) { @@ -185,6 +185,7 @@ function receiveRedRain() { message += `领取失败,已领过\n`; } else { console.log(`异常:${JSON.stringify(data)}`) + message += `暂无红包雨\n`; } } }