From 6ff66cca5b3e10a559e09bcc9d209050c5e930f4 Mon Sep 17 00:00:00 2001 From: lxk0301 <778732665@qq.com> Date: Sun, 14 Mar 2021 15:42:53 +0800 Subject: [PATCH] =?UTF-8?q?jd=5Fbean=5Fchange.js=20=E4=BA=AC=E8=B1=86?= =?UTF-8?q?=E5=8F=98=E5=8A=A8=E9=80=9A=E7=9F=A5=20=E8=84=9A=E6=9C=AC=20?= =?UTF-8?q?=E6=94=B9=E5=90=8D=20=E4=BA=AC=E4=B8=9C=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E5=8F=98=E5=8A=A8=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Loon/lxk0301_LoonTask.conf | 4 ++-- QuantumultX/lxk0301_gallery.json | 2 +- README.md | 2 +- Surge/lxk0301_Task.sgmodule.sgmodule | 2 +- jd_bean_change.js | 19 ++++++++++--------- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf index 3927efb6..70d04e32 100644 --- a/Loon/lxk0301_LoonTask.conf +++ b/Loon/lxk0301_LoonTask.conf @@ -7,8 +7,8 @@ hostname = me-api.jd.com, draw.jdfcloud.com, jdjoy.jd.com, account.huami.com -# 京豆变动通知 -cron "2 9 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, tag=京豆变动通知 +# 京东资产变动通知 +cron "2 9 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, tag=京东资产变动通知 # 领京豆额外奖励 cron "10 7 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_home.js, tag=领京豆额外奖励 diff --git a/QuantumultX/lxk0301_gallery.json b/QuantumultX/lxk0301_gallery.json index ebe37969..561ca7b0 100644 --- a/QuantumultX/lxk0301_gallery.json +++ b/QuantumultX/lxk0301_gallery.json @@ -2,7 +2,7 @@ "name": "LXK9301 task gallery", "description": "https://gitee.com/lxk0301/jd_scripts/tree/master", "task": [ - "2 9 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, tag=京豆变动通知, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true", + "2 9 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, tag=京东资产变动通知, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true", "10 7 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png, enabled=true", "0 0 0 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_blueCoin.js, tag=东东超市兑换奖品, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true", "1 8,12,18 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bookshop.js, tag=口袋书店, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true", diff --git a/README.md b/README.md index cecb512a..15b7eaf4 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ | 序号 | 文件 | 名称 | 活动入口 | | :-: | - | - | - | -|1|[jd_bean_change.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js)|京豆变动通知|| +|1|[jd_bean_change.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js)|京东资产变动通知|| |2|[jd_bean_home.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_home.js)|领京豆额外奖励|京东APP首页-领京豆| |3|[jd_bean_sign.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_sign.js)|京东多合一签到|各处的签到汇总| |4|[jd_beauty.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_beauty.js)|美丽研究院|京东app首页-美妆馆-底部中间按钮| diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule index cce18ecb..fcb52a2f 100644 --- a/Surge/lxk0301_Task.sgmodule.sgmodule +++ b/Surge/lxk0301_Task.sgmodule.sgmodule @@ -8,7 +8,7 @@ # Surge的Task&Cookies脚本模块地址: https://gitee.com/lxk0301/jd_scripts/raw/master/Surge/lxk0301_Task.sgmodule.sgmodule [Script] -京豆变动通知 = type=cron,cronexp=2 9 * * *,wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js +京东资产变动通知 = type=cron,cronexp=2 9 * * *,wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js 领京豆额外奖励 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_home.js 东东超市兑换奖品 = type=cron,cronexp="0 0 0 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_blueCoin.js 口袋书店 = type=cron,cronexp="1 8,12,18 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bookshop.js diff --git a/jd_bean_change.js b/jd_bean_change.js index 5623afdc..89a55203 100644 --- a/jd_bean_change.js +++ b/jd_bean_change.js @@ -5,26 +5,27 @@ * @Last Modified time: 2021-03-14 15: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 统计昨日京豆的变化情况,包括收入,支出,以及显示当前京豆数量,目前小问题:下单使用京豆后,退款重新购买,计算统计会出现异常 +统计红包以及过期红包 网页查看地址 : https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean 支持京东双账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============QuantumultX============== [task_local] -#京豆变动通知 -2 9 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, tag=京豆变动通知, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +#京东资产变动通知 +2 9 * * * https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, tag=京东资产变动通知, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true ================Loon=============== [Script] -cron "2 9 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, tag=京豆变动通知 +cron "2 9 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, tag=京东资产变动通知 =============Surge=========== [Script] -京豆变动通知 = type=cron,cronexp=2 9 * * *,wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js +京东资产变动通知 = type=cron,cronexp=2 9 * * *,wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js ============小火箭========= -京豆变动通知 = type=cron,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, cronexpr="2 9 * * *", timeout=3600, enable=true +京东资产变动通知 = type=cron,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_bean_change.js, cronexpr="2 9 * * *", timeout=3600, enable=true */ -const $ = new Env('京豆变动通知'); +const $ = new Env('京东资产变动通知'); const notify = $.isNode() ? require('./sendNotify') : ''; //Node.js用户请在jdCookie.js处填写京东ck; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; @@ -85,11 +86,11 @@ if ($.isNode()) { }) async function showMsg() { if ($.errorMsg) return - allMessage += `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}${$.expirejingdou > 0 ? `(今日将过期${$.expirejingdou})` : ''}京豆🐶${$.message}${$.index !== cookiesArr.length ? '\n\n' : ''}`; + allMessage += `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}(今日将过期${$.expirejingdou})京豆 🐶${$.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}${$.expirejingdou > 0 ? `(今日将过期${$.expirejingdou})` : ''}京豆🐶${$.message}`, {"open-url": "https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean"}); + $.msg($.name, '', `账号${$.index}:${$.nickName || $.UserName}\n昨日收入:${$.incomeBean}京豆 🐶\n昨日支出:${$.expenseBean}京豆 🐶\n当前京豆:${$.beanCount}(今日将过期${$.expirejingdou})京豆🐶${$.message}`, {"open-url": "https://bean.m.jd.com/beanDetail/index.action?resourceValue=bean"}); } async function bean() { // console.log(`北京时间零点时间戳:${parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000}`);