From 1771d956c1953ca6be4795b659e861e7e4093690 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Thu, 3 Dec 2020 16:32:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=8E=82=E9=95=BF=E5=BE=97?= =?UTF-8?q?=E9=92=9E=E7=A5=A8=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E6=89=8B=E6=9C=BA=E7=AB=AF=E5=92=8C=E4=BA=91?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/crontab_list.sh | 4 ++-- docker/crontab_list_ts.sh | 4 ++-- jd_jxstory.js | 18 +++++++++++------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh index c6ea1ea2..a6bb4bac 100644 --- a/docker/crontab_list.sh +++ b/docker/crontab_list.sh @@ -6,8 +6,8 @@ ##############短期活动############## -# 京喜故事 -10 7 * * * node /scripts/jd_jxstory.js >> /scripts/logs/jd_jxstory.log 2>&1 +# 京喜故事(2020.12.12活动过期) +10 * * * * node /scripts/jd_jxstory.js >> /scripts/logs/jd_jxstory.log 2>&1 ##############长期活动############## diff --git a/docker/crontab_list_ts.sh b/docker/crontab_list_ts.sh index d40db1bf..0b13ca13 100644 --- a/docker/crontab_list_ts.sh +++ b/docker/crontab_list_ts.sh @@ -6,8 +6,8 @@ ##############短期活动############## -# 京喜故事 -10 7 * * * node /scripts/jd_jxstory.js |ts >> /scripts/logs/jd_jxstory.log 2>&1 +# 京喜故事(2020.12.12活动过期) +10 * * * * node /scripts/jd_jxstory.js |ts >> /scripts/logs/jd_jxstory.log 2>&1 ##############长期活动############## diff --git a/jd_jxstory.js b/jd_jxstory.js index a7afb5b3..7c1260c3 100644 --- a/jd_jxstory.js +++ b/jd_jxstory.js @@ -31,7 +31,7 @@ const notify = $.isNode() ? require('./sendNotify') : ''; let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 const randomCount = 3; let cookiesArr = [], cookie = '', message = ''; -const inviteCodes = ['qSDHMwUOz7onHcMyaju4KmdSXWf0dlv7LVnTt1Wzemo=']; +const inviteCodes = ['qSDHMwUOz7onHcMyaju4KmdSXWf0dlv7LVnTt1Wzemo=@iuGNoGYvk9YdEImUAz25Wyzm7oeggrm0JSIYgZdHJGI=', 'iuGNoGYvk9YdEImUAz25Wyzm7oeggrm0JSIYgZdHJGI=']; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; if ($.isNode()) { Object.keys(jdCookieNode).forEach((item) => { @@ -90,8 +90,12 @@ async function jdJxStory() { await upgrade(); } await cardList() - $.click = true; - while($.click){ + if ($.isNode()) { + $.click = true; + while($.click){ + await increase() + } + } else { await increase() } } @@ -516,10 +520,10 @@ function shareCodesFormat() { const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); $.newShareCodes = inviteCodes[tempIndex].split('@'); } - const readShareCodeRes = await readShareCode(); - if (readShareCodeRes && readShareCodeRes.code === 200) { - $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; - } + // const readShareCodeRes = await readShareCode(); + // if (readShareCodeRes && readShareCodeRes.code === 200) { + // $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + // } console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) resolve(); })