update jd_bean_change.js ,云端多账号内容全集中到一次通知
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: LXK9301 https://github.com/LXK9301
|
* @Author: LXK9301 https://github.com/LXK9301
|
||||||
* @Date: 2020-11-01 16:25:41
|
* @Date: 2020-11-01 16:25:41
|
||||||
* @Last Modified by: LXK9301
|
* @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
|
京豆变动通知脚本:https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js
|
||||||
@@ -28,7 +28,7 @@ const $ = new Env('京豆变动通知');
|
|||||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||||
|
let allMessage = '';
|
||||||
//IOS等用户直接用NobyDa的jd cookie
|
//IOS等用户直接用NobyDa的jd cookie
|
||||||
let cookiesArr = [], cookie = '';
|
let cookiesArr = [], cookie = '';
|
||||||
if ($.isNode()) {
|
if ($.isNode()) {
|
||||||
@@ -72,6 +72,10 @@ if ($.isNode()) {
|
|||||||
await showMsg();
|
await showMsg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($.isNode()) {
|
||||||
|
await notify.sendNotify(`${$.name}`, `${allMessage}`, { url: `https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean` })
|
||||||
|
}
|
||||||
})()
|
})()
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
|
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
|
||||||
@@ -81,9 +85,10 @@ if ($.isNode()) {
|
|||||||
})
|
})
|
||||||
async function showMsg() {
|
async function showMsg() {
|
||||||
if ($.errorMsg) return
|
if ($.errorMsg) return
|
||||||
if ($.isNode()) {
|
allMessage += `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}京豆 🐶${$.message}${$.index !== cookiesArr.length ? '\n\n' : ''}`;
|
||||||
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` })
|
// 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"});
|
$.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() {
|
async function bean() {
|
||||||
|
Reference in New Issue
Block a user