From 4d0ccfed92d74e46c17d9632e67f0c844c29cbae Mon Sep 17 00:00:00 2001 From: wisz2021 Date: Thu, 6 May 2021 15:23:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=20JD=5FBEAN=5FSIGN?= =?UTF-8?q?=5FSTOP=5FNOTIFY=E8=AE=BE=E7=BD=AE=E4=B8=BAtrue=E4=B8=8D?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E9=80=9A=E7=9F=A5=E6=97=B6=EF=BC=8Cresult.tx?= =?UTF-8?q?t=E6=96=87=E4=BB=B6=E6=9C=AA=E8=A2=AB=E5=88=A0=E6=8E=89?= =?UTF-8?q?=E4=B8=80=E7=9B=B4=E7=B4=AF=E5=8A=A0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_bean_sign.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/jd_bean_sign.js b/jd_bean_sign.js index a21f62c3..10e62906 100644 --- a/jd_bean_sign.js +++ b/jd_bean_sign.js @@ -6,7 +6,7 @@ 活动入口:各处的签到汇总 Node.JS专用 IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js -更新时间:2021-4-9 +更新时间:2021-5-6 推送通知默认简洁模式(多账号只发送一次)。如需详细通知,设置环境变量 JD_BEAN_SIGN_NOTIFY_SIMPLE 为false即可(N账号推送N次通知)。 Modified From github https://github.com/ruicky/jd_sign_bot */ @@ -84,16 +84,16 @@ async function execSign() { if (fs.existsSync(resultPath)) { const barkContentStart = notifyContent.indexOf('【签到概览】') const barkContentEnd = notifyContent.length; - if (process.env.JD_BEAN_SIGN_STOP_NOTIFY === 'true') return - if (process.env.BARK_PUSH || notify.BARK_PUSH) process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE = 'true'; - if (process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE === 'true') { - if (barkContentStart > -1 && barkContentEnd > -1) { - BarkContent = notifyContent.substring(barkContentStart, barkContentEnd); - } - BarkContent = BarkContent.split('\n\n')[0]; - } else { - if (barkContentStart > -1 && barkContentEnd > -1) { - BarkContent = notifyContent.substring(barkContentStart, barkContentEnd); + if (process.env.JD_BEAN_SIGN_STOP_NOTIFY !== 'true') { + if (process.env.JD_BEAN_SIGN_NOTIFY_SIMPLE === 'true') { + if (barkContentStart > -1 && barkContentEnd > -1) { + BarkContent = notifyContent.substring(barkContentStart, barkContentEnd); + } + BarkContent = BarkContent.split('\n\n')[0]; + } else { + if (barkContentStart > -1 && barkContentEnd > -1) { + BarkContent = notifyContent.substring(barkContentStart, barkContentEnd); + } } } }