From 3bd45fdc8489ce0fa802b3622647d6ddb75023f6 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 7 Nov 2020 20:09:09 +0800 Subject: [PATCH] luci-app-jd-dailybonus: sync with upstream source --- .../ctcgfw/luci-app-jd-dailybonus/Makefile | 67 +- .../www => htdocs}/jd-dailybonus/JDCookie.crx | Bin .../www => htdocs}/jd-dailybonus/JDCookie.zip | Bin .../jd-dailybonus/jquery.min.js | 0 .../root/etc/config/jd-dailybonus | 2 +- .../usr/share/jd-dailybonus/JD_DailyBonus.js | 692 +++++++++++------- .../root/usr/share/jd-dailybonus/newapp.sh | 6 +- 7 files changed, 427 insertions(+), 340 deletions(-) rename package/ctcgfw/luci-app-jd-dailybonus/{root/www => htdocs}/jd-dailybonus/JDCookie.crx (100%) rename package/ctcgfw/luci-app-jd-dailybonus/{root/www => htdocs}/jd-dailybonus/JDCookie.zip (100%) rename package/ctcgfw/luci-app-jd-dailybonus/{root/www => htdocs}/jd-dailybonus/jquery.min.js (100%) diff --git a/package/ctcgfw/luci-app-jd-dailybonus/Makefile b/package/ctcgfw/luci-app-jd-dailybonus/Makefile index 8c627db00d..e66652a6f0 100644 --- a/package/ctcgfw/luci-app-jd-dailybonus/Makefile +++ b/package/ctcgfw/luci-app-jd-dailybonus/Makefile @@ -1,67 +1,20 @@ # -# Copyright (C) 2008-2014 The LuCI Team +# Copyright (C) 2006-2017 OpenWrt.org # -# This is free software, licensed under the Apache License, Version 2.0 . +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. # include $(TOPDIR)/rules.mk -PKG_NAME:=luci-app-jd-dailybonus + +LUCI_TITLE:=Luci for JD dailybonus Script +LUCI_DEPENDS:=+node +node-request +coreutils +coreutils-nohup +wget LUCI_PKGARCH:=all -PKG_VERSION:=0.8.6 -PKG_RELEASE:=20201021 -include $(INCLUDE_DIR)/package.mk +PKG_NAME:=luci-app-jd-dailybonus +PKG_VERSION:=0.8.7 +PKG_RELEASE:=20201031 -define Package/luci-app-jd-dailybonus - SECTION:=luci - CATEGORY:=LuCI - SUBMENU:=3. Applications - TITLE:=Luci for JD dailybonus Script - PKGARCH:=all - DEPENDS:=+node +node-request +coreutils +coreutils-nohup +wget -endef - -define Build/Prepare -endef - -define Build/Compile -endef - -define Package/luci-app-define Package/jd-dailybonus/conffiles - -endef - -define Package/luci-app-jd-dailybonus/install - $(INSTALL_DIR) $(1)/usr/lib/lua/luci - cp -pR ./luasrc/* $(1)/usr/lib/lua/luci - $(INSTALL_DIR) $(1)/ - cp -pR ./root/* $(1)/ - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n - po2lmo ./po/zh_Hans/jd-dailybonus.po $(1)/usr/lib/lua/luci/i18n/jd-dailybonus.zh-cn.lmo -endef - -define Package/luci-app-jd-dailybonus/postinst -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - ( . /etc/uci-defaults/luci-jd-dailybonus ) && rm -f /etc/uci-defaults/luci-jd-dailybonus - rm -rf /tmp/luci-indexcache - rm -rf /tmp/luci-modulecache/* - chmod +x /etc/init.d/jd-dailybonus >/dev/null 2>&1 - chmod +x /usr/share/jd-dailybonus/newapp.sh >/dev/null 2>&1 - /etc/init.d/jd-dailybonus enable >/dev/null 2>&1 -fi -exit 0 -endef - -define Package/luci-app-jd-dailybonus/prerm -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - /etc/init.d/jd-dailybonus disable - /etc/init.d/jd-dailybonus stop -fi -exit 0 -endef - -$(eval $(call BuildPackage,luci-app-jd-dailybonus)) +include $(TOPDIR)/feeds/luci/luci.mk # call BuildPackage - OpenWrt buildroot signature diff --git a/package/ctcgfw/luci-app-jd-dailybonus/root/www/jd-dailybonus/JDCookie.crx b/package/ctcgfw/luci-app-jd-dailybonus/htdocs/jd-dailybonus/JDCookie.crx similarity index 100% rename from package/ctcgfw/luci-app-jd-dailybonus/root/www/jd-dailybonus/JDCookie.crx rename to package/ctcgfw/luci-app-jd-dailybonus/htdocs/jd-dailybonus/JDCookie.crx diff --git a/package/ctcgfw/luci-app-jd-dailybonus/root/www/jd-dailybonus/JDCookie.zip b/package/ctcgfw/luci-app-jd-dailybonus/htdocs/jd-dailybonus/JDCookie.zip similarity index 100% rename from package/ctcgfw/luci-app-jd-dailybonus/root/www/jd-dailybonus/JDCookie.zip rename to package/ctcgfw/luci-app-jd-dailybonus/htdocs/jd-dailybonus/JDCookie.zip diff --git a/package/ctcgfw/luci-app-jd-dailybonus/root/www/jd-dailybonus/jquery.min.js b/package/ctcgfw/luci-app-jd-dailybonus/htdocs/jd-dailybonus/jquery.min.js similarity index 100% rename from package/ctcgfw/luci-app-jd-dailybonus/root/www/jd-dailybonus/jquery.min.js rename to package/ctcgfw/luci-app-jd-dailybonus/htdocs/jd-dailybonus/jquery.min.js diff --git a/package/ctcgfw/luci-app-jd-dailybonus/root/etc/config/jd-dailybonus b/package/ctcgfw/luci-app-jd-dailybonus/root/etc/config/jd-dailybonus index 6c2266466a..99178b2af9 100644 --- a/package/ctcgfw/luci-app-jd-dailybonus/root/etc/config/jd-dailybonus +++ b/package/ctcgfw/luci-app-jd-dailybonus/root/etc/config/jd-dailybonus @@ -1,5 +1,5 @@ config global - option version '1.47' + option version '1.79' option auto_run_time '1' option auto_run '1' option auto_update_time '1' diff --git a/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/JD_DailyBonus.js b/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/JD_DailyBonus.js index 698004d5a1..ea33dbaf29 100644 --- a/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/JD_DailyBonus.js +++ b/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/JD_DailyBonus.js @@ -2,8 +2,8 @@ 京东多合一签到脚本 -更新时间: 2020.9.28 18:00 v1.65 -有效接口: 35+ +更新时间: 2020.10.24 21:00 v1.79 +有效接口: 42+ 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js 电报频道: @NobyDa 问题反馈: @NobyDa_bot @@ -110,41 +110,48 @@ async function all() { JingDongStore(stop), //京东超市 JingDongWebcasts(stop), //京东直播 JingRongBean(stop), //金融简单赚钱 - JingRongDoll(stop), //金融抓娃娃 JingRongSteel(stop), //金融钢镚 JingDongTurn(stop), //京东转盘 JDFlashSale(stop), //京东闪购 JDOverseas(stop), //京东国际 JingDongCash(stop), //京东现金红包 - JDMagicCube(stop), //京东小魔方 + JDMagicCube(stop, 2), //京东小魔方 JingDongPrize(stop), //京东抽大奖 JingDongSubsidy(stop), //京东金贴 JingDongGetCash(stop), //京东领现金 - JingDongShake(stop) //京东摇一摇 + JingDongShake(stop), //京东摇一摇 + JDSecKilling(stop), //京东秒杀 + DoubleElevenSale(stop), //京东超值特卖入场红包 + JingRongDoll(stop, 'JRDoll', '京东金融-签壹', '890418F764'), + JingRongDoll(stop, 'JRTwoDoll', '京东金融-签贰', '3A3E839252'), + JingRongDoll(stop, 'JRThreeDoll', '京东金融-签叁', '69F5EC743C') ]); await Promise.all([ - JDUserSignPre(stop, 'JDShoes', '京东商城-鞋靴'), //京东鞋靴 - JDUserSignPre(stop, 'JDEsports', '京东商城-电竞'), //京东电竞 - JDUserSignPre(stop, 'JDCalendar', '京东日历-翻牌'), //京东日历翻牌 - JDUserSignPre(stop, 'JDChild', '京东商城-童装'), //京东童装馆 - JDUserSignPre(stop, 'JDBaby', '京东商城-母婴'), //京东母婴馆 - JDUserSignPre(stop, 'JD3C', '京东商城-数码'), //京东数码电器馆 - JDUserSignPre(stop, 'JDSubsidy', '京东晚市-补贴'), //京东晚市补贴金 - JDUserSignPre(stop, 'JDDrug', '京东商城-医药'), //京东医药馆 - JDUserSignPre(stop, 'JDWomen', '京东商城-女装'), //京东女装馆 - JDUserSignPre(stop, 'JDBook', '京东商城-图书') //京东图书 + JDUserSignPre(stop, 'JDToyMusic', '京东商城-乐器', '4N6RzwtBZdtdcgodvdsK7ZEzkUbZ'), //京东玩具乐器馆 + JDUserSignPre(stop, 'JDShoes', '京东商城-鞋靴', '4RXyb1W4Y986LJW8ToqMK14BdTD'), //京东鞋靴 + JDUserSignPre(stop, 'JDEsports', '京东商城-电竞', 'CHdHQhA5AYDXXQN9FLt3QUAPRsB'), //京东电竞 + JDUserSignPre(stop, 'JDCalendar', '京东日历-翻牌', '36V2Qw59VPNsuLxY84vCFtxFzrFs'), //京东日历翻牌 + JDUserSignPre(stop, 'JDChild', '京东商城-童装', '3Af6mZNcf5m795T8dtDVfDwWVNhJ'), //京东童装馆 + JDUserSignPre(stop, 'JDBaby', '京东商城-母婴', '3BbAVGQPDd6vTyHYjmAutXrKAos6'), //京东母婴馆 + JDUserSignPre(stop, 'JD3C', '京东商城-数码', '4SWjnZSCTHPYjE5T7j35rxxuMTb6'), //京东数码电器馆 + JDUserSignPre(stop, 'JDSubsidy', '京东晚市-补贴', 'xK148m4kWj5hBcTPuJUNNXH3AkJ'), //京东晚市补贴金 + JDUserSignPre(stop, 'JDDrug', '京东商城-医药', '3tqTG5sF1xCUyC6vgEF5CLCxGn7w'), //京东医药馆 + JDUserSignPre(stop, 'JDWomen', '京东商城-女装', 'DpSh7ma8JV7QAxSE2gJNro8Q2h9'), //京东女装馆 + JDUserSignPre(stop, 'JDFineWine', '京东商城-酒饮', 'zGwAUzL3pVGjptBBGeYfpKjYdtX'), //京东酒饮馆 + JDUserSignPre(stop, 'JDBook', '京东商城-图书', '3SC6rw5iBg66qrXPGmZMqFDwcyXi') //京东图书 ]); await Promise.all([ - JDUserSignPre(stop, 'JDSchool', '京东商城-校园'), //京东校园 - JDUserSignPre(stop, 'JDPet', '京东商城-宠物'), //京东宠物馆 - JDUserSignPre(stop, 'JDShand', '京东拍拍-二手'), //京东拍拍二手 - JDUserSignPre(stop, 'JDClean', '京东商城-清洁'), //京东清洁馆 - JDUserSignPre(stop, 'JDCare', '京东商城-个护'), //京东个人护理馆 - JDUserSignPre(stop, 'JDJewels', '京东商城-珠宝'), //京东珠宝馆 - JDUserSignPre(stop, 'JDClocks', '京东商城-钟表'), //京东钟表馆 - JDUserSignPre(stop, 'JDMakeup', '京东商城-美妆'), //京东美妆馆 - JDUserSignPre(stop, 'JDVege', '京东商城-菜场'), //京东菜场 - JDUserSignPre(stop, 'JDFood', '京东商城-美食') //京东美食馆 + JDUserSignPre(stop, 'JDSchool', '京东商城-校园', '4812pn2PAcUyfNdWr7Cvpww5MCyW'), //京东校园 + JDUserSignPre(stop, 'JDHealth', '京东商城-健康', 'w2oeK5yLdHqHvwef7SMMy4PL8LF'), //京东健康 + JDUserSignPre(stop, 'JDPet', '京东商城-宠物', '37ta5sh5ocrMZF3Fz5UMJbTsL42'), //京东宠物馆 + JDUserSignPre(stop, 'JDShand', '京东拍拍-二手', '3S28janPLYmtFxypu37AYAGgivfp'), //京东拍拍二手 + JDUserSignPre(stop, 'JDClean', '京东商城-清洁', '2Tjm6ay1ZbZ3v7UbriTj6kHy9dn6'), //京东清洁馆 + JDUserSignPre(stop, 'JDCare', '京东商城-个护', 'NJ1kd1PJWhwvhtim73VPsD1HwY3'), //京东个人护理馆 + JDUserSignPre(stop, 'JDJewels', '京东商城-珠宝', 'zHUHpTHNTaztSRfNBFNVZscyFZU'), //京东珠宝馆 + JDUserSignPre(stop, 'JDClocks', '京东商城-钟表', '2BcJPCVVzMEtMUynXkPscCSsx68W'), //京东钟表馆 + JDUserSignPre(stop, 'JDMakeup', '京东商城-美妆', '2smCxzLNuam5L14zNJHYu43ovbAP'), //京东美妆馆 + JDUserSignPre(stop, 'JDVege', '京东商城-菜场', 'Wcu2LVCFMkBP3HraRvb7pgSpt64'), //京东菜场 + JDUserSignPre(stop, 'JDFood', '京东商城-美食', '4PzvVmLSBq5K63oq4oxKcDtFtzJo') //京东美食馆 ]); } else { await JingDongBean(stop); //京东京豆 @@ -152,37 +159,44 @@ async function all() { await JingDongStore(stop); //京东超市 await JingDongWebcasts(stop); //京东直播 await JingRongBean(stop); //金融简单赚钱 - await JingRongDoll(stop); //金融抓娃娃 await JingRongSteel(stop); //金融钢镚 await JingDongTurn(stop); //京东转盘 await JDFlashSale(stop); //京东闪购 await JDOverseas(stop); //京东国际 await JingDongCash(stop); //京东现金红包 - await JDMagicCube(stop); //京东小魔方 + await JDMagicCube(stop, 2); //京东小魔方 await JingDongGetCash(stop); //京东领现金 await JingDongPrize(stop); //京东抽大奖 await JingDongSubsidy(stop); //京东金贴 await JingDongShake(stop); //京东摇一摇 - await JDUserSignPre(stop, 'JDSchool', '京东商城-校园'); //京东校园 - await JDUserSignPre(stop, 'JDShoes', '京东商城-鞋靴'); //京东鞋靴 - await JDUserSignPre(stop, 'JDEsports', '京东商城-电竞'); //京东电竞 - await JDUserSignPre(stop, 'JDCalendar', '京东日历-翻牌'); //京东日历翻牌 - await JDUserSignPre(stop, 'JDChild', '京东商城-童装'); //京东童装馆 - await JDUserSignPre(stop, 'JDBaby', '京东商城-母婴'); //京东母婴馆 - await JDUserSignPre(stop, 'JD3C', '京东商城-数码'); //京东数码电器馆 - await JDUserSignPre(stop, 'JDSubsidy', '京东晚市-补贴'); //京东晚市补贴金 - await JDUserSignPre(stop, 'JDClocks', '京东商城-钟表'); //京东钟表馆 - await JDUserSignPre(stop, 'JDDrug', '京东商城-医药'); //京东医药馆 - await JDUserSignPre(stop, 'JDPet', '京东商城-宠物'); //京东宠物馆 - await JDUserSignPre(stop, 'JDBook', '京东商城-图书'); //京东图书 - await JDUserSignPre(stop, 'JDShand', '京东拍拍-二手'); //京东拍拍二手 - await JDUserSignPre(stop, 'JDMakeup', '京东商城-美妆'); //京东美妆馆 - await JDUserSignPre(stop, 'JDWomen', '京东商城-女装'); //京东女装馆 - await JDUserSignPre(stop, 'JDVege', '京东商城-菜场'); //京东菜场 - await JDUserSignPre(stop, 'JDFood', '京东商城-美食'); //京东美食馆 - await JDUserSignPre(stop, 'JDClean', '京东商城-清洁'); //京东清洁馆 - await JDUserSignPre(stop, 'JDCare', '京东商城-个护'); //京东个人护理馆 - await JDUserSignPre(stop, 'JDJewels', '京东商城-珠宝'); //京东珠宝馆 + await JDSecKilling(stop); //京东秒杀 + await DoubleElevenSale(stop); //京东超值特卖入场红包 + await JingRongDoll(stop, 'JRDoll', '京东金融-签壹', '890418F764'); + await JingRongDoll(stop, 'JRTwoDoll', '京东金融-签贰', '3A3E839252'); + await JingRongDoll(stop, 'JRThreeDoll', '京东金融-签叁', '69F5EC743C'); + await JDUserSignPre(stop, 'JDToyMusic', '京东商城-乐器', '4N6RzwtBZdtdcgodvdsK7ZEzkUbZ'); //京东玩具乐器馆 + await JDUserSignPre(stop, 'JDSchool', '京东商城-校园', '4812pn2PAcUyfNdWr7Cvpww5MCyW'); //京东校园 + await JDUserSignPre(stop, 'JDHealth', '京东商城-健康', 'w2oeK5yLdHqHvwef7SMMy4PL8LF'); //京东健康 + await JDUserSignPre(stop, 'JDShoes', '京东商城-鞋靴', '4RXyb1W4Y986LJW8ToqMK14BdTD'); //京东鞋靴 + await JDUserSignPre(stop, 'JDEsports', '京东商城-电竞', 'CHdHQhA5AYDXXQN9FLt3QUAPRsB'); //京东电竞 + await JDUserSignPre(stop, 'JDCalendar', '京东日历-翻牌', '36V2Qw59VPNsuLxY84vCFtxFzrFs'); //京东日历翻牌 + await JDUserSignPre(stop, 'JDChild', '京东商城-童装', '3Af6mZNcf5m795T8dtDVfDwWVNhJ'); //京东童装馆 + await JDUserSignPre(stop, 'JDBaby', '京东商城-母婴', '3BbAVGQPDd6vTyHYjmAutXrKAos6'); //京东母婴馆 + await JDUserSignPre(stop, 'JD3C', '京东商城-数码', '4SWjnZSCTHPYjE5T7j35rxxuMTb6'); //京东数码电器馆 + await JDUserSignPre(stop, 'JDSubsidy', '京东晚市-补贴', 'xK148m4kWj5hBcTPuJUNNXH3AkJ'); //京东晚市补贴金 + await JDUserSignPre(stop, 'JDClocks', '京东商城-钟表', '2BcJPCVVzMEtMUynXkPscCSsx68W'); //京东钟表馆 + await JDUserSignPre(stop, 'JDDrug', '京东商城-医药', '3tqTG5sF1xCUyC6vgEF5CLCxGn7w'); //京东医药馆 + await JDUserSignPre(stop, 'JDWomen', '京东商城-女装', 'DpSh7ma8JV7QAxSE2gJNro8Q2h9'); //京东女装馆 + await JDUserSignPre(stop, 'JDPet', '京东商城-宠物', '37ta5sh5ocrMZF3Fz5UMJbTsL42'); //京东宠物馆 + await JDUserSignPre(stop, 'JDBook', '京东商城-图书', '3SC6rw5iBg66qrXPGmZMqFDwcyXi'); //京东图书 + await JDUserSignPre(stop, 'JDShand', '京东拍拍-二手', '3S28janPLYmtFxypu37AYAGgivfp'); //京东拍拍二手 + await JDUserSignPre(stop, 'JDMakeup', '京东商城-美妆', '2smCxzLNuam5L14zNJHYu43ovbAP'); //京东美妆馆 + await JDUserSignPre(stop, 'JDFineWine', '京东商城-酒饮', 'zGwAUzL3pVGjptBBGeYfpKjYdtX'); //京东酒饮馆 + await JDUserSignPre(stop, 'JDVege', '京东商城-菜场', 'Wcu2LVCFMkBP3HraRvb7pgSpt64'); //京东菜场 + await JDUserSignPre(stop, 'JDFood', '京东商城-美食', '4PzvVmLSBq5K63oq4oxKcDtFtzJo'); //京东美食馆 + await JDUserSignPre(stop, 'JDClean', '京东商城-清洁', '2Tjm6ay1ZbZ3v7UbriTj6kHy9dn6'); //京东清洁馆 + await JDUserSignPre(stop, 'JDCare', '京东商城-个护', 'NJ1kd1PJWhwvhtim73VPsD1HwY3'); //京东个人护理馆 + await JDUserSignPre(stop, 'JDJewels', '京东商城-珠宝', 'zHUHpTHNTaztSRfNBFNVZscyFZU'); //京东珠宝馆 } await Promise.all([ JingDongSpeedUp(stop), //京东天天加速 @@ -191,7 +205,9 @@ async function all() { await Promise.all([ TotalSteel(), //总钢镚查询 TotalCash(), //总红包查询 - TotalBean() //总京豆查询 + TotalBean(), //总京豆查询 + TotalSubsidy(), //总金贴查询 + TotalMoney() //总现金查询 ]) await notify(); //通知模块 } @@ -201,25 +217,30 @@ function notify() { try { var bean = 0; var steel = 0; + var cash = 0; var success = 0; var fail = 0; var err = 0; var notify = ''; for (var i in merge) { - bean += Number(merge[i].bean) - steel += Number(merge[i].steel) - success += Number(merge[i].success) - fail += Number(merge[i].fail) - err += Number(merge[i].error) + bean += merge[i].bean ? Number(merge[i].bean) : 0 + steel += merge[i].steel ? Number(merge[i].steel) : 0 + cash += merge[i].Cash ? Number(merge[i].Cash) : 0 + success += merge[i].success ? Number(merge[i].success) : 0 + fail += merge[i].fail ? Number(merge[i].fail) : 0 + err += merge[i].error ? Number(merge[i].error) : 0 notify += merge[i].notify ? "\n" + merge[i].notify : "" } - var Cash = merge.JDCash.TCash ? merge.JDCash.TCash + "红包" : "" - var Steel = merge.JRSteel.TSteel ? merge.JRSteel.TSteel + "钢镚" + (Cash ? ", " : "") : "" - var beans = merge.JDShake.Qbear ? merge.JDShake.Qbear + "京豆" + (Steel || Cash ? ", " : "") : "" + var Cash = merge.TotalCash.TCash ? merge.TotalCash.TCash + "红包" : "" + var Steel = merge.TotalSteel.TSteel ? merge.TotalSteel.TSteel + "钢镚" + (Cash ? ", " : "") : "" + var beans = merge.TotalBean.Qbear ? merge.TotalBean.Qbear + "京豆" + (Steel || Cash ? ", " : "") : "" var bsc = beans ? "\n" : Steel ? "\n" : Cash ? "\n" : "获取失败\n" - var Tbean = bean ? bean + "京豆" + (steel || merge.JDCash.Cash ? ", " : "") : "" - var TSteel = steel ? steel + "钢镚" + (merge.JDCash.Cash ? ", " : "") : "" - var TCash = merge.JDCash.Cash ? merge.JDCash.Cash + "红包" : "" + var Money = merge.TotalMoney.TMoney ? `${merge.TotalMoney.TMoney}现金` : "" + var Subsidy = merge.TotalSubsidy.TSubsidy ? `${merge.TotalSubsidy.TSubsidy}金贴${Money?", ":""}` : "" + var Sbsc = Subsidy ? "\n" : Money ? "\n" : "获取失败\n" + var Tbean = bean ? `${bean.toFixed(0)}京豆${steel||cash?", ":""}` : "" + var TSteel = steel ? `${steel.toFixed(2)}钢镚${cash?", ":""}` : "" + var TCash = cash ? `${cash.toFixed(2)}红包` : "" var Tbsc = Tbean ? "\n" : TSteel ? "\n" : TCash ? "\n" : "获取失败\n" var Ts = success ? "成功" + success + "个" + (fail || err ? ", " : "") : "" var Tf = fail ? "失败" + fail + "个" + (err ? ", " : "") : "" @@ -227,9 +248,9 @@ function notify() { var one = "【签到概览】: " + Ts + Tf + Te var two = "【签到总计】: " + Tbean + TSteel + TCash + Tbsc var three = "【账号总计】: " + beans + Steel + Cash + bsc - var four = "【左滑 '查看' 以显示签到详情】\n" + var four = "【其他总计】: " + Subsidy + Money + Sbsc var disa = $nobyda.disable ? "\n检测到上次执行意外崩溃, 已为您自动禁用相关接口. 如需开启请前往BoxJs ‼️‼️\n" : "" - var DName = merge.JDShake.nickname ? merge.JDShake.nickname : "获取失败" + var DName = merge.TotalBean.nickname ? merge.TotalBean.nickname : "获取失败" var Name = add ? DualAccount ? "【签到号一】: " + DName + "\n" : "【签到号二】: " + DName + "\n" : "" console.log("\n" + Name + one + two + three + four + disa + notify) if ($nobyda.isJSBox) { @@ -331,7 +352,7 @@ function JingDongBean(s) { merge.JDBean.notify = "京东商城-京豆: 失败, 原因: Cookie失效‼️" merge.JDBean.fail = 1 } else if (data.match(/跳转至拼图/)) { - merge.JDBean.notify = "京东商城-京豆: 失败, 原因: 需要拼图验证 ⚠️" + merge.JDBean.notify = "京东商城-京豆: 失败, 需要拼图验证 ⚠️" merge.JDBean.fail = 1 } else if (data.match(/\"status\":\"?1\"?/)) { console.log("\n" + "京东商城-京豆签到成功 " + Details) @@ -362,7 +383,7 @@ function JingDongBean(s) { } } } catch (eor) { - $nobyda.AnError("京东商城-京豆", "JDBean", eor) + $nobyda.AnError("京东商城-京豆", "JDBean", eor, response, data) } finally { resolve() } @@ -398,7 +419,7 @@ function JingDongTurn(s) { } } } catch (eor) { - $nobyda.AnError("京东转盘-查询", "JDTurn", eor) + $nobyda.AnError("京东转盘-查询", "JDTurn", eor, response, data) } finally { reject() } @@ -460,7 +481,7 @@ function JingDongTurnSign(s, code) { } } } catch (eor) { - $nobyda.AnError("京东商城-转盘", "JDTurn", eor) + $nobyda.AnError("京东商城-转盘", "JDTurn", eor, response, data) } finally { resolve() } @@ -505,7 +526,7 @@ function JingRongBean(s) { } } } catch (eor) { - $nobyda.AnError("金融金贴-查询", "JRBean", eor) + $nobyda.AnError("金融金贴-查询", "JRBean", eor, response, data) } finally { resolve() } @@ -537,18 +558,17 @@ function JRBeanCheckin(s, amount) { merge.JRBean.success = 1 } else { console.log("\n" + "京东金融-金贴签到失败 " + Details) + merge.JRBean.fail = 1 if (data.match(/发放失败|70111|10000|60203/)) { merge.JRBean.notify = "京东金融-金贴: 失败, 原因: 已签过 ⚠️" - merge.JRBean.fail = 1 } else { const UnType = data.match(/\"resultCode\":3|请先登录/) merge.JRBean.notify = `京东金融-金贴: 失败, 原因: ${UnType?`Cookie失效‼️`:`未知 ⚠️`}` - merge.JRBean.fail = 1 } } } } catch (eor) { - $nobyda.AnError("京东金融-金贴", "JRBean", eor) + $nobyda.AnError("京东金融-金贴", "JRBean", eor, response, data) } finally { resolve() } @@ -586,7 +606,7 @@ function JingRongSteel(s) { if (data.match(/已经领取|\"resBusiCode\":15/)) { merge.JRSteel.notify = "京东金融-钢镚: 失败, 原因: 已签过 ⚠️" } else if (data.match(/未实名/)) { - merge.JRSteel.notify = "京东金融-钢镚: 失败, 原因: 账号未实名 ⚠️" + merge.JRSteel.notify = "京东金融-钢镚: 失败, 账号未实名 ⚠️" } else if (data.match(/(\"resultCode\":3|请先登录)/)) { merge.JRSteel.notify = "京东金融-钢镚: 失败, 原因: Cookie失效‼️" } else { @@ -594,7 +614,7 @@ function JingRongSteel(s) { } } } catch (eor) { - $nobyda.AnError("京东金融-钢镚", "JRSteel", eor) + $nobyda.AnError("京东金融-钢镚", "JRSteel", eor, response, data) } finally { resolve() } @@ -633,9 +653,9 @@ function JRDoubleSign(s) { if (data.match(/已领取/)) { merge.JRDSign.notify = "京东金融-双签: 失败, 原因: 已签过 ⚠️" } else if (data.match(/未在/)) { - merge.JRDSign.notify = "京东金融-双签: 失败, 原因: 未在京东签到 ⚠️" + merge.JRDSign.notify = "京东金融-双签: 失败, 未在京东签到 ⚠️" } else { - merge.JRDSign.notify = "京东金融-双签: 失败, 原因: 无奖励 🐶" + merge.JRDSign.notify = "京东金融-双签: 失败, 原因: 无奖励 ⚠️" } } } else { @@ -649,7 +669,7 @@ function JRDoubleSign(s) { } } } catch (eor) { - $nobyda.AnError("京东金融-双签", "JRDSign", eor) + $nobyda.AnError("京东金融-双签", "JRDSign", eor, response, data) } finally { resolve() } @@ -712,7 +732,7 @@ function JingDongShake(s) { } } } catch (eor) { - $nobyda.AnError("京东商城-摇摇", "JDShake", eor) + $nobyda.AnError("京东商城-摇摇", "JDShake", eor, response, data) } finally { resolve() } @@ -722,17 +742,15 @@ function JingDongShake(s) { }); } -function JDUserSignPre(s, key, title) { - if ($nobyda.isNode) { - return JDUserSignPre1(s, key, title); - } else if (key == 'JDWomen' || key == 'JDJewels' || $nobyda.isJSBox) { - return JDUserSignPre2(s, key, title); +function JDUserSignPre(s, key, title, ac) { + if ($nobyda.isJSBox) { + return JDUserSignPre2(s, key, title, ac); } else { - return JDUserSignPre1(s, key, title); + return JDUserSignPre1(s, key, title, ac); } } -function JDUserSignPre1(s, key, title, ask) { +function JDUserSignPre1(s, key, title, acData, ask) { return new Promise((resolve, reject) => { if (disable(key, title, 1)) return reject() const JDUrl = { @@ -740,18 +758,21 @@ function JDUserSignPre1(s, key, title, ask) { headers: { Cookie: KEY }, - body: `body=${encodeURIComponent(`{"activityId":"${acData[key]}"${ask ? `,"paginationParam":"2",${ask}` : ``}}`)}` + opts: { + 'filter': 'try{var od=JSON.parse(body);var params=(od.floatLayerList||[]).filter(o=>o.params&&o.params.match(/enActK/)).map(o=>o.params).pop()||(od.floorList||[]).filter(o=>o.template=="signIn"&&o.signInfos&&o.signInfos.params&&o.signInfos.params.match(/enActK/)).map(o=>o.signInfos&&o.signInfos.params).pop();var tId=(od.floorList||[]).filter(o=>o.boardParams&&o.boardParams.turnTableId).map(o=>o.boardParams.turnTableId).pop();var page=od.paginationFlrs;return JSON.stringify({qxAct:params||null,qxTid:tId||null,qxPage:page||null})}catch(e){return `=> 过滤器发生错误: ${e.message}`}' + }, + body: `body=${encodeURIComponent(`{"activityId":"${acData}"${ask?`,"paginationParam":"2","paginationFlrs":"${ask}"`:``}}`)}` }; $nobyda.post(JDUrl, async function(error, response, data) { try { if (error) { throw new Error(error) } else { - const turnTableId = data.match(/\"turnTableId\":\"(\d+)\"/) - const page = data.match(/\"paginationFlrs\":\"\[\[.+?\]\]\"/) + const od = JSON.parse(data || '{}'); + const turnTableId = od.qxTid || (od.floorList || []).filter(o => o.boardParams && o.boardParams.turnTableId).map(o => o.boardParams.turnTableId).pop(); + const page = od.qxPage || od.paginationFlrs; if (data.match(/enActK/)) { // 含有签到活动数据 - const od = JSON.parse(data); - let params = (od.floatLayerList || []).filter(o => o.params && o.params.match(/enActK/)).map(o => o.params).pop(); + let params = od.qxAct || (od.floatLayerList || []).filter(o => o.params && o.params.match(/enActK/)).map(o => o.params).pop() if (!params) { // 第一处找到签到所需数据 // floatLayerList未找到签到所需数据,从floorList中查找 let signInfo = (od.floorList || []).filter(o => o.template == 'signIn' && o.signInfos && o.signInfos.params && o.signInfos.params.match(/enActK/)) @@ -778,7 +799,7 @@ function JDUserSignPre1(s, key, title, ask) { const boxds = $nobyda.read("JD_Follow_disable") === "false" ? false : true if (boxds) { console.log(`\n${title}关注店铺`) - return resolve(parseInt(turnTableId[1])) + return resolve(parseInt(turnTableId)) } else { merge[key].notify = `${title}: 失败, 需要关注店铺 ⚠️` merge[key].fail = 1 @@ -787,7 +808,7 @@ function JDUserSignPre1(s, key, title, ask) { const boxds = $nobyda.read("JD_Retry_disable") === "false" ? false : true if (boxds) { console.log(`\n${title}二次查询`) - return resolve(page[0]) + return resolve(page) } else { merge[key].notify = `${title}: 失败, 请尝试开启增强 ⚠️` merge[key].fail = 1 @@ -799,7 +820,7 @@ function JDUserSignPre1(s, key, title, ask) { } reject() } catch (eor) { - $nobyda.AnError(title, key, eor) + $nobyda.AnError(title, key, eor, response, data) reject() } }) @@ -808,15 +829,15 @@ function JDUserSignPre1(s, key, title, ask) { disable(key, title, 2) if (typeof(data) == "object") return JDUserSign1(s, key, title, encodeURIComponent(JSON.stringify(data))); if (typeof(data) == "number") return JDUserSign2(s, key, title, data); - if (typeof(data) == "string") return JDUserSignPre1(s, key, title, data); + if (typeof(data) == "string") return JDUserSignPre1(s, key, title, acData, data); }, () => disable(key, title, 2)) } -function JDUserSignPre2(s, key, title) { +function JDUserSignPre2(s, key, title, acData) { return new Promise((resolve, reject) => { if (disable(key, title, 1)) return reject() const JDUrl = { - url: `https://pro.m.jd.com/mall/active/${acData[key]}/index.html`, + url: `https://pro.m.jd.com/mall/active/${acData}/index.html`, headers: { Cookie: KEY, } @@ -828,7 +849,7 @@ function JDUserSignPre2(s, key, title) { } else { const act = data.match(/\"params\":\"\{\\\"enActK.+?\\\"\}\"/) const turnTable = data.match(/\"turnTableId\":\"(\d+)\"/) - const page = data.match(/\"paginationFlrs\":\"\[\[.+?\]\]\"/) + const page = data.match(/\"paginationFlrs\":\"(\[\[.+?\]\])\"/) if (act) { // 含有签到活动数据 return resolve(act) } else if (turnTable) { // 无签到数据, 但含有关注店铺签到 @@ -844,7 +865,7 @@ function JDUserSignPre2(s, key, title) { const boxds = $nobyda.read("JD_Retry_disable") === "false" ? false : true if (boxds) { console.log(`\n${title}二次查询`) - return resolve(page[0]) + return resolve(page[1]) } else { merge[key].notify = `${title}: 失败, 请尝试开启增强 ⚠️` merge[key].fail = 1 @@ -856,7 +877,7 @@ function JDUserSignPre2(s, key, title) { } reject() } catch (eor) { - $nobyda.AnError(title, key, eor) + $nobyda.AnError(title, key, eor, response, data) reject() } }) @@ -865,7 +886,7 @@ function JDUserSignPre2(s, key, title) { disable(key, title, 2) if (typeof(data) == "object") return JDUserSign1(s, key, title, encodeURIComponent(`{${data}}`)); if (typeof(data) == "number") return JDUserSign2(s, key, title, data) - if (typeof(data) == "string") return JDUserSignPre1(s, key, title, data) + if (typeof(data) == "string") return JDUserSignPre1(s, key, title, acData, data) }, () => disable(key, title, 2)) } @@ -907,7 +928,7 @@ function JDUserSign1(s, key, title, body) { } } } catch (eor) { - $nobyda.AnError(title, key, eor) + $nobyda.AnError(title, key, eor, response, data) } finally { resolve() } @@ -966,7 +987,7 @@ async function JDUserSign2(s, key, title, tid) { } } } catch (eor) { - $nobyda.AnError(title, key, eor) + $nobyda.AnError(title, key, eor, response, data) } finally { resolve() } @@ -1000,23 +1021,23 @@ function JDFlashSale(s) { merge.JDFSale.notify = "京东商城-闪购: 成功, 明细: " + (merge.JDFSale.bean || "无") + "京豆 🐶" merge.JDFSale.success = 1 } else { - merge.JDFSale.fail = 1 console.log("\n" + "京东商城-闪购签到失败 " + Details) if (data.match(/(已签到|已领取|\"2005\")/)) { merge.JDFSale.notify = "京东商城-闪购: 失败, 原因: 已签过 ⚠️" } else if (data.match(/不存在|已结束|\"2008\"|\"3001\"/)) { - //merge.JDFSale.notify = "京东商城-闪购: 失败, 原因: 需瓜分 ⚠️" - await FlashSaleDivide(s) + await FlashSaleDivide(s); //瓜分京豆 + return } else if (data.match(/(\"code\":\"3\"|\"1003\")/)) { merge.JDFSale.notify = "京东商城-闪购: 失败, 原因: Cookie失效‼️" } else { const msg = data.match(/\"msg\":\"([\u4e00-\u9fa5].+?)\"/) merge.JDFSale.notify = `京东商城-闪购: 失败, ${msg ? msg[1] : `原因: 未知`} ⚠️` } + merge.JDFSale.fail = 1 } } } catch (eor) { - $nobyda.AnError("京东商城-闪购", "JDFSale", eor) + $nobyda.AnError("京东商城-闪购", "JDFSale", eor, response, data) } finally { resolve() } @@ -1064,7 +1085,7 @@ function FlashSaleDivide(s) { } } } catch (eor) { - $nobyda.AnError("京东闪购-瓜分", "JDFSale", eor) + $nobyda.AnError("京东闪购-瓜分", "JDFSale", eor, response, data) } finally { resolve() } @@ -1112,7 +1133,7 @@ function JingDongCash(s) { } } } catch (eor) { - $nobyda.AnError("京东现金-红包", "JDCash", eor) + $nobyda.AnError("京东现金-红包", "JDCash", eor, response, data) } finally { resolve() } @@ -1122,29 +1143,34 @@ function JingDongCash(s) { }); } -function JDMagicCube(s) { +function JDMagicCube(s, sign) { return new Promise((resolve, reject) => { if (disable("JDCube")) return reject() const JDUrl = { - url: 'https://api.m.jd.com/client.action?functionId=getNewsInteractionInfo&appid=smfe', + url: `https://api.m.jd.com/client.action?functionId=getNewsInteractionInfo&appid=smfe${sign?`&body=${encodeURIComponent(`{"sign":${sign}}`)}`:``}`, headers: { Cookie: KEY, } }; - $nobyda.get(JDUrl, function(error, response, data) { + $nobyda.get(JDUrl, async (error, response, data) => { try { if (error) throw new Error(error) const Details = LogDetails ? "response:\n" + data : ''; + console.log(`\n京东魔方-尝试查询活动(${sign}) ${Details}`) if (data.match(/\"interactionId\":\d+/)) { - merge.JDCube.key = data.match(/\"interactionId\":(\d+)/)[1] - console.log("\n京东魔方-查询活动成功 " + Details) + resolve({ + id: data.match(/\"interactionId\":(\d+)/)[1], + sign: sign || null + }) + } else if (data.match(/配置异常/) && sign) { + await JDMagicCube(s, sign == 2 ? 1 : null) + reject() } else { - console.log("\n京东魔方-暂无有效活动 " + Details) + resolve(null) } } catch (eor) { - $nobyda.AnError("京东魔方-查询", "JDCube", eor) - } finally { - resolve(merge.JDCube.key) + $nobyda.AnError("京东魔方-查询", "JDCube", eor, response, data) + reject() } }) if (out) setTimeout(reject, out + s) @@ -1157,7 +1183,7 @@ function JDMagicCubeSign(s, id) { return new Promise(resolve => { setTimeout(() => { const JDMCUrl = { - url: `https://api.m.jd.com/client.action?functionId=getNewsInteractionLotteryInfo&appid=smfe${id ? `&body=%7B%22interactionId%22%3A${id}%7D` : ``}`, + url: `https://api.m.jd.com/client.action?functionId=getNewsInteractionLotteryInfo&appid=smfe${id?`&body=${encodeURIComponent(`{${id.sign?`"sign":${id.sign},`:``}"interactionId":${id.id}}`)}`:``}`, headers: { Cookie: KEY, } @@ -1193,7 +1219,7 @@ function JDMagicCubeSign(s, id) { } } } catch (eor) { - $nobyda.AnError("京东商城-魔方", "JDCube", eor) + $nobyda.AnError("京东商城-魔方", "JDCube", eor, response, data) } finally { resolve() } @@ -1241,7 +1267,7 @@ function JingDongPrize(s) { } } } catch (eor) { - $nobyda.AnError("京东大奖-查询", "JDPrize", eor) + $nobyda.AnError("京东大奖-查询", "JDPrize", eor, response, data) } finally { resolve() } @@ -1300,7 +1326,7 @@ function JDPrizeCheckin(s) { } } } catch (eor) { - $nobyda.AnError("京东大奖-签到", "JDPrize", eor) + $nobyda.AnError("京东大奖-签到", "JDPrize", eor, response, data) } finally { resolve() } @@ -1397,7 +1423,7 @@ function JingDongSpeedUp(s, id) { } } } catch (eor) { - $nobyda.AnError("京东天天-加速", "SpeedUp", eor) + $nobyda.AnError("京东天天-加速", "SpeedUp", eor, response, data) } finally { resolve() } @@ -1443,7 +1469,7 @@ function JDSpaceEvent(s) { console.log(`\n天天加速-太空事件为空 ${Details}`) } } catch (eor) { - $nobyda.AnError("太空事件-查询", "SpeedUp", eor) + $nobyda.AnError("太空事件-查询", "SpeedUp", eor, response, data) } finally { resolve(spaceEvents) } @@ -1472,7 +1498,7 @@ function JDSpaceEvent(s) { spaceNumTask += 1; } } catch (eor) { - $nobyda.AnError("太空事件-领取", "SpeedUp", eor) + $nobyda.AnError("太空事件-领取", "SpeedUp", eor, response, data) } finally { if (list.length == spaceEventCount) { if (list.length == spaceNumTask) $nobyda.isAllEvents = true; //避免重复查询 @@ -1526,7 +1552,7 @@ function JDQueryTask(s) { } } } catch (eor) { - $nobyda.AnError("查询道具-加速", "SpeedUp", eor) + $nobyda.AnError("查询道具-加速", "SpeedUp", eor, response, data) } finally { resolve(TaskID) } @@ -1560,7 +1586,7 @@ function JDQueryTask(s) { } } } catch (eor) { - $nobyda.AnError("领取道具-加速", "SpeedUp", eor) + $nobyda.AnError("领取道具-加速", "SpeedUp", eor, response, data) } finally { if (CID.length == count) { if (CID.length == NumTask) $nobyda.isAlltasks = true; //避免重复查询 @@ -1614,7 +1640,7 @@ function JDQueryTaskID(s) { } } } catch (eor) { - $nobyda.AnError("查询号码-加速", "SpeedUp", eor) + $nobyda.AnError("查询号码-加速", "SpeedUp", eor, response, data) } finally { resolve(TaskCID) } @@ -1652,7 +1678,7 @@ function JDUseProps(s, PropID) { } } } catch (eor) { - $nobyda.AnError("使用道具-加速", "SpeedUp", eor) + $nobyda.AnError("使用道具-加速", "SpeedUp", eor, response, data) } finally { if (PropID.length == PropCount) { console.log("\n天天加速-已成功使用" + PropNumTask + "个道具") @@ -1689,13 +1715,9 @@ function JingDongSubsidy(s) { const Details = LogDetails ? "response:\n" + data : ''; if (data.match(/\"msg\":\"操作成功\"/)) { console.log("\n" + "京东商城-金贴签到成功 " + Details) + const qt = data.match(/\"thisAmountStr\":\"(.+?)\"/) + merge.subsidy.notify = `京东商城-金贴: 成功, 明细: ${qt?qt[1]:`无`}金贴 💰` merge.subsidy.success = 1 - if (data.match(/\"thisAmountStr\":\".+?\"/)) { - var Quantity = data.match(/\"thisAmountStr\":\"(.+?)\"/)[1] - merge.subsidy.notify = "京东商城-金贴: 成功, 明细: " + Quantity + "金贴 💰" - } else { - merge.subsidy.notify = "京东商城-金贴: 成功, 明细: 无金贴 💰" - } } else { console.log("\n" + "京东商城-金贴签到失败 " + Details) merge.subsidy.fail = 1 @@ -1709,7 +1731,7 @@ function JingDongSubsidy(s) { } } } catch (eor) { - $nobyda.AnError("京东商城-金贴", "subsidy", eor) + $nobyda.AnError("京东商城-金贴", "subsidy", eor, response, data) } finally { resolve() } @@ -1719,16 +1741,16 @@ function JingDongSubsidy(s) { }); } -function JingRongDoll(s, type, num) { +function JingRongDoll(s, key, title, code, type, num) { return new Promise(resolve => { - if (disable("JRDoll")) return resolve() + if (disable(key)) return resolve() setTimeout(() => { const DollUrl = { url: "https://nu.jr.jd.com/gw/generic/jrm/h5/m/process", headers: { Cookie: KEY }, - body: "reqData=%7B%22actCode%22%3A%22890418F764%22%2C%22type%22%3A" + (type ? type : "3") + "%7D" + body: `reqData=%7B%22actCode%22%3A%22${code}%22%2C%22type%22%3A${type?type:`3`}%7D` }; $nobyda.post(DollUrl, async function(error, response, data) { try { @@ -1739,42 +1761,39 @@ function JingRongDoll(s, type, num) { const Details = LogDetails ? "response:\n" + data : ''; if (cc.resultCode == 0) { if (cc.resultData.data.businessData != null) { - console.log("\n" + "京东金融-娃娃登录成功 " + Details) if (cc.resultData.data.businessData.pickStatus == 2) { + console.log(`\n${title}查询成功 ${Details}`) if (data.match(/\"rewardPrice\":\"?(\d+)/)) { var JRDoll_bean = data.match(/\"rewardPrice\":\"?(\d+)/)[1] - await JingRongDoll(s, "4", JRDoll_bean) + await JingRongDoll(s, key, title, code, '4', JRDoll_bean) } else { - merge.JRDoll.success = 1 - merge.JRDoll.notify = "京东金融-娃娃: 成功, 明细: 无京豆 🐶" + merge[key].success = 1 + merge[key].notify = `${title}: 成功, 明细: 无京豆 🐶` } } else { - console.log("\n" + "京东金融-娃娃签到失败 " + Details) - merge.JRDoll.notify = "京东金融-娃娃: 失败, 原因: 已签过 ⚠️"; - merge.JRDoll.fail = 1 + console.log(`\n${title}签到失败 ${Details}`) + merge[key].notify = `${title}: 失败, 原因: 已签过 ⚠️`; + merge[key].fail = 1 } } else if (cc.resultData.data.businessCode == 200) { - console.log("\n" + "京东金融-娃娃签到成功 " + Details) - merge.JRDoll.bean = num ? num : 0 - merge.JRDoll.success = num ? 1 : 0 - merge.JRDoll.notify = "京东金融-娃娃: 成功, 明细: " + (num ? num + "京豆 🐶" : "无京豆 🐶") + console.log(`\n${title}签到成功 ${Details}`) + merge[key].bean = num || 0 + merge[key].success = 1 + merge[key].notify = `${title}: 成功, 明细: ${num||`无`}京豆 🐶` } else { - console.log("\n" + "京东金融-娃娃签到异常 " + Details) - merge.JRDoll.fail = 1; - merge.JRDoll.notify = "京东金融-娃娃: 失败, 原因: 领取异常 ⚠️"; + console.log(`\n${title}领取异常 ${Details}\n请尝试手动领取, 预计可得${num||'0'}京豆: \nhttps://uf1.jr.jd.com/up/redEnvelopes/index.html?actCode=${code}\n`) + merge[key].fail = 1; + merge[key].notify = `${title}: 失败, 原因: 领取异常 ⚠️`; } - } else if (cc.resultCode == 3) { - console.log("\n" + "京东金融-娃娃签到失败 " + Details) - merge.JRDoll.notify = "京东金融-娃娃: 失败, 原因: Cookie失效‼️" - merge.JRDoll.fail = 1; } else { - console.log("\n" + "京东金融-娃娃判断失败 " + Details) - merge.JRDoll.notify = "京东金融-娃娃: 失败, 原因: 未知 ⚠️" - merge.JRDoll.fail = 1; + console.log(`\n${title}签到失败 ${Details}`) + const redata = typeof(cc.resultData) == 'string' ? cc.resultData : '' + merge[key].notify = `${title}: 失败, 原因: ${cc.resultCode==3?`Cookie失效‼️`:`${redata||'未知 ⚠️'}`}` + merge[key].fail = 1; } } } catch (eor) { - $nobyda.AnError("京东金融-娃娃", "JRDoll", eor) + $nobyda.AnError(title, key, eor, response, data) } finally { resolve() } @@ -1823,7 +1842,7 @@ function JDOverseas(s) { } } } catch (eor) { - $nobyda.AnError("京东商城-国际", "Overseas", eor) + $nobyda.AnError("京东商城-国际", "Overseas", eor, response, data) } finally { resolve() } @@ -1850,15 +1869,10 @@ function JingDongGetCash(s) { } else { const cc = JSON.parse(data); const Details = LogDetails ? "response:\n" + data : ''; - if (cc.data.success) { + if (cc.data.success && cc.data.result) { console.log("\n" + "京东商城-现金签到成功 " + Details) merge.JDGetCash.success = 1 - if (cc.data.result && cc.data.result.signCash) { - merge.JDGetCash.Cash = cc.data.result.signCash - merge.JDGetCash.notify = "京东商城-现金: 成功, 明细: " + merge.JDGetCash.Cash + "现金 💰" - } else { - merge.JDGetCash.notify = "京东商城-现金: 成功, 明细: 无现金 💰" - } + merge.JDGetCash.notify = `京东商城-现金: 成功, 明细: ${cc.data.result.signCash||`无`}现金 💰` } else { console.log("\n" + "京东商城-现金签到失败 " + Details) merge.JDGetCash.fail = 1 @@ -1872,7 +1886,7 @@ function JingDongGetCash(s) { } } } catch (eor) { - $nobyda.AnError("京东商城-现金", "JDGetCash", eor) + $nobyda.AnError("京东商城-现金", "JDGetCash", eor, response, data) } finally { resolve() } @@ -1909,7 +1923,7 @@ function JingDongWebcasts(s) { merge.JDWebcasts.fail = 1 } } catch (eor) { - $nobyda.AnError("京东商城-直播", "JDWebcasts", eor) + $nobyda.AnError("京东商城-直播", "JDWebcasts", eor, response, data) } finally { resolve() } @@ -1933,7 +1947,7 @@ function JDTakeaLook(s) { if (error) throw new Error(error); const cc = JSON.parse(data); const Details = LogDetails ? "response:\n" + data : ''; - const tm = new Date(new Date().setHours(0, 0, 0, 0)).getTime() + const tm = parseInt((Date.now() + 28800000) / 86400000) * 86400000 - 28800000 if (data.match(/签到成功/) && !data.match(tm)) { console.log(`\n京东发现-看看签到成功 ${Details}`) const aw = data.match(/\"签到成功,获得(\d+)京豆\"/) @@ -1947,13 +1961,13 @@ function JDTakeaLook(s) { merge.TakeaLook.fail = 1 } } catch (eor) { - $nobyda.AnError("京东发现-看看", "TakeaLook", eor) + $nobyda.AnError("京东发现-看看", "TakeaLook", eor, response, data) } finally { resolve() } }) }, s) - if (out) setTimeout(resolve, out) + if (out) setTimeout(resolve, out + s) }); } @@ -1985,41 +1999,148 @@ function JingDongStore(s) { merge.JDGStore.fail = 1 } } catch (eor) { - $nobyda.AnError("京东商城-超市", "JDGStore", eor) + $nobyda.AnError("京东商城-超市", "JDGStore", eor, response, data) } finally { resolve() } }) }, s) - if (out) setTimeout(resolve, out) + if (out) setTimeout(resolve, out + s) + }); +} + +function JDSecKilling(s) { + return new Promise((resolve, reject) => { + if (disable("JDSecKill")) return reject(); + setTimeout(() => { + $nobyda.post({ + url: 'https://api.m.jd.com/client.action', + headers: { + Cookie: KEY, + Origin: 'https://h5.m.jd.com' + }, + body: 'functionId=freshManHomePage&body=%7B%7D&client=wh5&appid=SecKill2020' + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data); + if (cc.code == 203 || cc.code == 3 || cc.code == 101) { + merge.JDSecKill.notify = `京东秒杀-红包: 失败, 原因: Cookie失效‼️`; + } else if (cc.result && cc.result.projectId && cc.result.taskId) { + console.log(`\n京东秒杀-红包查询成功 ${Details}`) + return resolve({ + projectId: cc.result.projectId, + taskId: cc.result.taskId + }) + } else { + merge.JDSecKill.notify = `京东秒杀-红包: 失败, 暂无有效活动 ⚠️`; + } + merge.JDSecKill.fail = 1; + console.log(`\n京东秒杀-红包查询失败 ${Details}`) + reject() + } catch (eor) { + $nobyda.AnError("京东秒杀-查询", "JDSecKill", eor, response, data) + reject() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) + }).then(async (id) => { + await new Promise(resolve => { + $nobyda.post({ + url: 'https://api.m.jd.com/client.action', + headers: { + Cookie: KEY, + Origin: 'https://h5.m.jd.com' + }, + body: `functionId=doInteractiveAssignment&body=%7B%22encryptProjectId%22%3A%22${id.projectId}%22%2C%22encryptAssignmentId%22%3A%22${id.taskId}%22%2C%22completionFlag%22%3Atrue%7D&client=wh5&appid=SecKill2020` + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data); + if (cc.msg == 'success' && cc.subCode == 0) { + console.log(`\n京东秒杀-红包签到成功 ${Details}`); + const qt = data.match(/"discount":(\d.*?),/); + merge.JDSecKill.success = 1; + merge.JDSecKill.Cash = qt ? qt[1] : 0; + merge.JDSecKill.notify = `京东秒杀-红包: 成功, 明细: ${merge.JDSecKill.Cash||`无`}红包 🧧`; + } else { + console.log(`\n京东秒杀-红包签到失败 ${Details}`); + merge.JDSecKill.fail = 1; + merge.JDSecKill.notify = `京东秒杀-红包: 失败, 原因: ${cc.subCode==103?`已领取`:cc.msg?cc.msg:`未知`} ⚠️`; + } + } catch (eor) { + $nobyda.AnError("京东秒杀-领取", "JDSecKill", eor, response, data); + } finally { + resolve(); + } + }) + }) + }, () => {}); +} + +function DoubleElevenSale(s) { + return new Promise(resolve => { + if (disable("ElevenSale")) return resolve(); + setTimeout(() => { + $nobyda.post({ + url: 'https://api.m.jd.com/client.action', + headers: { + Cookie: KEY, + Origin: 'https://h5.m.jd.com' + }, + body: 'functionId=noahHaveFunLottery&appid=publicUseApi&body=%7B%22actId%22%3A%22RRD7PgE4k1PYkLBEJRWv6gfPkZUqgY%22%7D&client=wh5' + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const cc = JSON.parse(data); + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.code == 0 && cc.lotteryResult) { + console.log(`\n京东入场-红包签到成功 ${Details}`) + const qt = data.match(/"disCount":"(\d.*?)",/); + merge.ElevenSale.success = 1; + merge.ElevenSale.Cash = qt ? Number(qt[1]) : 0; + merge.ElevenSale.notify = `京东入场-红包: 成功, 明细: ${merge.ElevenSale.Cash||`无`}红包 🧧${qt?` (2天)`:``}`; + } else { + console.log(`\n京东入场-红包签到失败 ${Details}`) + const tp = cc.subCode == 8 ? `无机会` : cc.code == 3 ? `Cookie失效` : `${cc.msg||`未知`}` + merge.ElevenSale.notify = `京东入场-红包: 失败, 原因: ${tp}${cc.code==3?`‼️`:` ⚠️`}` + merge.ElevenSale.fail = 1 + } + } catch (eor) { + $nobyda.AnError("京东入场-红包", "ElevenSale", eor, response, data) + } finally { + resolve() + } + }) + }, s) + if (out) setTimeout(resolve, out + s) }); } function TotalSteel() { return new Promise(resolve => { if (disable("TSteel")) return resolve() - const SteelUrl = { + $nobyda.get({ url: 'https://coin.jd.com/m/gb/getBaseInfo.html', headers: { - Cookie: KEY, + Cookie: KEY } - }; - $nobyda.get(SteelUrl, function(error, response, data) { + }, (error, response, data) => { try { - if (!error) { - const Details = LogDetails ? "response:\n" + data : ''; - if (data.match(/(\"gbBalance\":\d+)/)) { - console.log("\n" + "京东-总钢镚查询成功 " + Details) - const cc = JSON.parse(data) - merge.JRSteel.TSteel = cc.gbBalance - } else { - console.log("\n" + "京东-总钢镚查询失败 " + Details) - } + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + if (data.match(/(\"gbBalance\":\d+)/)) { + console.log("\n" + "京东-总钢镚查询成功 " + Details) + const cc = JSON.parse(data) + merge.TotalSteel.TSteel = cc.gbBalance } else { - throw new Error(error) + console.log("\n" + "京东-总钢镚查询失败 " + Details) } } catch (eor) { - $nobyda.AnError("账户钢镚-查询", "JRSteel", eor) + $nobyda.AnError("账户钢镚-查询", "TotalSteel", eor, response, data) } finally { resolve() } @@ -2031,36 +2152,32 @@ function TotalSteel() { function TotalBean() { return new Promise(resolve => { if (disable("Qbear")) return resolve() - const BeanUrl = { + $nobyda.post({ url: 'https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2', headers: { Cookie: KEY, Referer: "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2" } - }; - $nobyda.post(BeanUrl, function(error, response, data) { + }, (error, response, data) => { try { - if (!error) { - const Details = LogDetails ? "response:\n" + data : ''; - const cc = JSON.parse(data) - if (cc.base.jdNum != 0) { - console.log("\n" + "京东-总京豆查询成功 " + Details) - merge.JDShake.Qbear = cc.base.jdNum - } else { - console.log("\n" + "京东-总京豆查询失败 " + Details) - } - if (data.match(/\"nickname\" ?: ?\"(.+?)\",/)) { - merge.JDShake.nickname = cc.base.nickname - } else if (data.match(/\"no ?login\.?\"/)) { - merge.JDShake.nickname = "Cookie失效 ‼️" - } else { - merge.JDShake.nickname = ''; - } + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + const cc = JSON.parse(data) + if (cc.base.jdNum != 0) { + console.log("\n" + "京东-总京豆查询成功 " + Details) + merge.TotalBean.Qbear = cc.base.jdNum } else { - throw new Error(error) + console.log("\n" + "京东-总京豆查询失败 " + Details) + } + if (data.match(/\"nickname\" ?: ?\"(.+?)\",/)) { + merge.TotalBean.nickname = cc.base.nickname + } else if (data.match(/\"no ?login\.?\"/)) { + merge.TotalBean.nickname = "Cookie失效 ‼️" + } else { + merge.TotalBean.nickname = ''; } } catch (eor) { - $nobyda.AnError("账户京豆-查询", "JDShake", eor) + $nobyda.AnError("账户京豆-查询", "TotalBean", eor, response, data) } finally { resolve() } @@ -2072,29 +2189,84 @@ function TotalBean() { function TotalCash() { return new Promise(resolve => { if (disable("TCash")) return resolve() - const CashUrl = { + $nobyda.post({ url: 'https://api.m.jd.com/client.action?functionId=myhongbao_balance', headers: { Cookie: KEY }, body: "body=%7B%22fp%22%3A%22-1%22%2C%22appToken%22%3A%22apphongbao_token%22%2C%22childActivityUrl%22%3A%22-1%22%2C%22country%22%3A%22cn%22%2C%22openId%22%3A%22-1%22%2C%22childActivityId%22%3A%22-1%22%2C%22applicantErp%22%3A%22-1%22%2C%22platformId%22%3A%22appHongBao%22%2C%22isRvc%22%3A%22-1%22%2C%22orgType%22%3A%222%22%2C%22activityType%22%3A%221%22%2C%22shshshfpb%22%3A%22-1%22%2C%22platformToken%22%3A%22apphongbao_token%22%2C%22organization%22%3A%22JD%22%2C%22pageClickKey%22%3A%22-1%22%2C%22platform%22%3A%221%22%2C%22eid%22%3A%22-1%22%2C%22appId%22%3A%22appHongBao%22%2C%22childActiveName%22%3A%22-1%22%2C%22shshshfp%22%3A%22-1%22%2C%22jda%22%3A%22-1%22%2C%22extend%22%3A%22-1%22%2C%22shshshfpa%22%3A%22-1%22%2C%22activityArea%22%3A%22-1%22%2C%22childActivityTime%22%3A%22-1%22%7D&client=apple&clientVersion=8.5.0&d_brand=apple&networklibtype=JDNetworkBaseAF&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=fdc04c3ab0ee9148f947d24fb087b55d&st=1581245397648&sv=120" - }; - $nobyda.post(CashUrl, function(error, response, data) { + }, (error, response, data) => { try { - if (!error) { - const Details = LogDetails ? "response:\n" + data : ''; - if (data.match(/(\"totalBalance\":\d+)/)) { - console.log("\n" + "京东-总红包查询成功 " + Details) - const cc = JSON.parse(data) - merge.JDCash.TCash = cc.totalBalance - } else { - console.log("\n" + "京东-总红包查询失败 " + Details) - } + if (error) throw new Error(error); + const Details = LogDetails ? "response:\n" + data : ''; + if (data.match(/(\"totalBalance\":\d+)/)) { + console.log("\n" + "京东-总红包查询成功 " + Details) + const cc = JSON.parse(data) + merge.TotalCash.TCash = cc.totalBalance } else { - throw new Error(error) + console.log("\n" + "京东-总红包查询失败 " + Details) } } catch (eor) { - $nobyda.AnError("账户红包-查询", "JDCash", eor) + $nobyda.AnError("账户红包-查询", "TotalCash", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function TotalSubsidy() { + return new Promise(resolve => { + if (disable("TotalSubsidy")) return resolve() + $nobyda.get({ + url: 'https://ms.jr.jd.com/gw/generic/uc/h5/m/mySubsidyBalance', + headers: { + Cookie: KEY, + Referer: 'https://active.jd.com/forever/cashback/index?channellv=wojingqb' + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.resultCode == 0 && cc.resultData && cc.resultData.data) { + console.log("\n京东-总金贴查询成功 " + Details) + merge.TotalSubsidy.TSubsidy = cc.resultData.data.balance || 0 + } else { + console.log("\n京东-总金贴查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户金贴-查询", "TotalSubsidy", eor, response, data) + } finally { + resolve() + } + }) + if (out) setTimeout(resolve, out) + }); +} + +function TotalMoney() { + return new Promise(resolve => { + if (disable("TotalMoney")) return resolve() + $nobyda.get({ + url: 'https://api.m.jd.com/client.action?functionId=cash_exchangePage&body=%7B%7D&build=167398&client=apple&clientVersion=9.1.9&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=762a8e894dea8cbfd91cce4dd5714bc5&st=1602179446935&sv=102', + headers: { + Cookie: KEY + } + }, (error, response, data) => { + try { + if (error) throw new Error(error); + const cc = JSON.parse(data) + const Details = LogDetails ? "response:\n" + data : ''; + if (cc.code == 0 && cc.data && cc.data.bizCode == 0 && cc.data.result) { + console.log("\n京东-总现金查询成功 " + Details) + merge.TotalMoney.TMoney = cc.data.result.totalMoney || 0 + } else { + console.log("\n京东-总现金查询失败 " + Details) + } + } catch (eor) { + $nobyda.AnError("账户现金-查询", "TotalMoney", eor, response, data) } finally { resolve() } @@ -2137,60 +2309,20 @@ function disable(Val, name, way) { } function initial() { - - acData = { - // 京东商城-校园 - JDSchool: '4812pn2PAcUyfNdWr7Cvpww5MCyW', - // 京东商城-鞋靴 - JDShoes: '4RXyb1W4Y986LJW8ToqMK14BdTD', - // 京东商城-电竞 - JDEsports: 'CHdHQhA5AYDXXQN9FLt3QUAPRsB', - // 京东商城-日历 - JDCalendar: '36V2Qw59VPNsuLxY84vCFtxFzrFs', - // 京东商城-童装 - JDChild: '3Af6mZNcf5m795T8dtDVfDwWVNhJ', - // 京东商城-母婴 - JDBaby: '3BbAVGQPDd6vTyHYjmAutXrKAos6', - // 京东商城-数码 - JD3C: '4SWjnZSCTHPYjE5T7j35rxxuMTb6', - // 京东晚市-补贴 - JDSubsidy: 'xK148m4kWj5hBcTPuJUNNXH3AkJ', - // 京东商城-钟表 - JDClocks: '2BcJPCVVzMEtMUynXkPscCSsx68W', - // 京东商城-医药 - JDDrug: '3tqTG5sF1xCUyC6vgEF5CLCxGn7w', - // 京东商城-宠物 - JDPet: '37ta5sh5ocrMZF3Fz5UMJbTsL42', - // 京东商城-图书 - JDBook: '3SC6rw5iBg66qrXPGmZMqFDwcyXi', - // 京东拍拍-二手 - JDShand: '3S28janPLYmtFxypu37AYAGgivfp', - // 京东商城-美妆 - JDMakeup: '2smCxzLNuam5L14zNJHYu43ovbAP', - // 京东商城-清洁 - JDClean: '2Tjm6ay1ZbZ3v7UbriTj6kHy9dn6', - // 京东商城-女装 - JDWomen: 'DpSh7ma8JV7QAxSE2gJNro8Q2h9', - // 京东商城-个护 - JDCare: 'NJ1kd1PJWhwvhtim73VPsD1HwY3', - // 京东商城-美食 - JDFood: '4PzvVmLSBq5K63oq4oxKcDtFtzJo', - // 京东商城-珠宝 - JDJewels: 'zHUHpTHNTaztSRfNBFNVZscyFZU', - // 京东商城-菜场 - JDVege: 'Wcu2LVCFMkBP3HraRvb7pgSpt64' - }; - merge = { SpeedUp: {}, JDBean: {}, JDTurn: {}, - JRDoll: {}, JRDSign: {}, TakeaLook: {}, Overseas: {}, JDFSale: {}, JDPet: {}, + JDToyMusic: {}, + JRDoll: {}, + JRTwoDoll: {}, + JRThreeDoll: {}, + JDHealth: {}, JDEsports: {}, JDSchool: {}, JDCalendar: {}, @@ -2206,6 +2338,7 @@ function initial() { JDShand: {}, JDMakeup: {}, JDWomen: {}, + JDFineWine: {}, JDCare: {}, JDFood: {}, JDClean: {}, @@ -2217,23 +2350,22 @@ function initial() { JRSteel: {}, JRBean: {}, subsidy: {}, + ElevenSale: {}, + JDSecKill: {}, JDCash: {}, JDGetCash: {}, - JDShake: {} + JDShake: {}, + TotalBean: {}, + TotalSteel: {}, + TotalCash: {}, + TotalSubsidy: {}, + TotalMoney: {} } + for (var i in merge) { merge[i].success = 0; - merge[i].fail = 0; - merge[i].error = 0; merge[i].bean = 0; - merge[i].steel = 0; merge[i].notify = ''; - merge[i].key = 0; - merge[i].TSteel = 0; - merge[i].Cash = 0; - merge[i].TCash = 0; - merge[i].Qbear = 0; - merge[i].nickname = ''; } } @@ -2458,7 +2590,7 @@ function nobyda() { $http.post(options); } } - const AnError = (name, keyname, er) => { + const AnError = (name, keyname, er, resp, body) => { if (typeof(merge) != "undefined" && keyname) { if (!merge[keyname].notify) { merge[keyname].notify = `${name}: 异常, 已输出日志 ‼️` @@ -2467,7 +2599,7 @@ function nobyda() { } merge[keyname].error = 1 } - return console.log(`\n‼️${name}发生错误\n‼️名称: ${er.name}\n‼️描述: ${er.message}${JSON.stringify(er).match(/\"line\"/) ? `\n‼️行列: ${JSON.stringify(er)}` : ``}`) + return console.log(`\n‼️${name}发生错误\n‼️名称: ${er.name}\n‼️描述: ${er.message}${JSON.stringify(er).match(/\"line\"/)?`\n‼️行列: ${JSON.stringify(er)}`:``}${resp&&resp.status?`\n‼️状态: ${resp.status}`:``}${body?`\n‼️响应: ${body}`:``}`) } const time = () => { const end = ((Date.now() - start) / 1000).toFixed(2) @@ -2494,4 +2626,4 @@ function nobyda() { done } }; -ReadCookie(); +ReadCookie(); \ No newline at end of file diff --git a/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/newapp.sh b/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/newapp.sh index 58cf990039..93f4ab05a8 100755 --- a/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/newapp.sh +++ b/package/ctcgfw/luci-app-jd-dailybonus/root/usr/share/jd-dailybonus/newapp.sh @@ -86,7 +86,7 @@ local_ver=$(uci_get_by_type global version) add_cron() { sed -i '/jd-dailybonus/d' $CRON_FILE - [ $(uci_get_by_type global auto_run 0) -eq 1 ] && echo '5 '$(uci_get_by_type global auto_run_time)' * * * /bin/bash -c "sleep $[RANDOM % 180]s"; /usr/share/jd-dailybonus/newapp.sh -w' >>$CRON_FILE + [ $(uci_get_by_type global auto_run 0) -eq 1 ] && echo '5 '$(uci_get_by_type global auto_run_time)' * * * sleep '$(expr $(head -n 128 /dev/urandom | tr -dc "0123456789" | head -c4) % 180)'s; /usr/share/jd-dailybonus/newapp.sh -w' >>$CRON_FILE [ $(uci_get_by_type global auto_update 0) -eq 1 ] && echo '1 '$(uci_get_by_type global auto_update_time)' * * * /usr/share/jd-dailybonus/newapp.sh -u' >>$CRON_FILE crontab $CRON_FILE } @@ -118,12 +118,14 @@ serverchan() { run() { fill_cookie echo -e $(date '+%Y-%m-%d %H:%M:%S %A') >$LOG_HTM 2>/dev/null - nohup node $JD_SCRIPT >>$LOG_HTM 2>/dev/null & + [ ! -f "/usr/bin/node" ] && echo "未安装node,请安装后再试!">>$LOG_HTM && exit 1 + node $JD_SCRIPT >>$LOG_HTM 2>&1 & } back_run() { fill_cookie echo -e $(date '+%Y-%m-%d %H:%M:%S %A') >$LOG_HTM 2>/dev/null + [ ! -f "/usr/bin/node" ] && echo "未安装node,请安装后再试!">>$LOG_HTM && exit 1 node $JD_SCRIPT >>$LOG_HTM 2>/dev/null serverchan }