diff --git a/jd_bean_change.js b/jd_bean_change.js index 60e4fda3..08da6a56 100644 --- a/jd_bean_change.js +++ b/jd_bean_change.js @@ -2,7 +2,7 @@ * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-01 16:25:41 * @Last Modified by: LXK9301 - * @Last Modified time: 2021-02-19 10:25:41 + * @Last Modified time: 2021-02-27 10:25:41 */ /* 京豆变动通知脚本:https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js @@ -28,7 +28,7 @@ const $ = new Env('京豆变动通知'); const notify = $.isNode() ? require('./sendNotify') : ''; //Node.js用户请在jdCookie.js处填写京东ck; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; - +let allMessage = ''; //IOS等用户直接用NobyDa的jd cookie let cookiesArr = [], cookie = ''; if ($.isNode()) { @@ -72,6 +72,10 @@ if ($.isNode()) { await showMsg(); } } + + if ($.isNode()) { + await notify.sendNotify(`${$.name}`, `${allMessage}`, { url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` }) + } })() .catch((e) => { $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') @@ -81,9 +85,10 @@ if ($.isNode()) { }) async function showMsg() { if ($.errorMsg) return - if ($.isNode()) { - await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}京豆 🐶${$.message}`, { url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` }) - } + allMessage += `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}京豆 🐶${$.message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + // if ($.isNode()) { + // await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}京豆 🐶${$.message}`, { url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` }) + // } $.msg($.name, '', `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}京豆 🐶${$.message}`, {"open-url": "https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean"}); } async function bean() {