优化代码

This commit is contained in:
黄志军
2021-11-08 09:11:51 +08:00
parent 4851c848e2
commit 4bcbb2d133
4 changed files with 202 additions and 277 deletions
+196 -269
View File
@@ -1,269 +1,196 @@
[ [{
"id": "jd_try_xcl1",
{ "cron": "9 34 0,3,6,9,12,15,18,21 * * * *",
"id": "jd_pet_xcl", "isConcurrent": false,
"cron": "20 1 8,17 * * * *", "url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@v1.3/src/main/resources/test_trytryOne.js",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_pet.js", "name": "随机试用1"
"name": "东东萌宠" }, {
}, { "id": "jd_try_xcl2",
"id": "jd_speed_red_xcl", "isConcurrent": false,
"cron": "0 0 3,18 * * * *", "cron": "17 1 2,5,8,11,14,17,20,23 * * * *",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_speed_red.js", "url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@v1.3/src/main/resources/test_trytryOne.js",
"name": "极速版领红包" "name": "随机试用2"
}, { }, {
"id": "jd_pet_xcl", "id": "jd_fruit_xcl",
"cron": "51 17 5,11,23,18,9,16 * * * *", "cron": "17 5 8,13,17 * * * *",
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_Utils@v1.1/src/main/resources/test_pet.js", "describe": "一天只能帮助4个人。多出的助力码无效",
"name": "东东萌宠" "url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@1.8/src/main/resources/test_fruit.js",
}, { "name": "东东农场"
"id": "jd_speed_sign_xcl", }, {
"cron": "56 9 2,10,19,22 * * * *", "id": "jd_bean_change_new1",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_speed_sign.js", "cron": "10 59 11 * * * *",
"name": "极速版签到赚金币" "isConcurrent": false,
}, { "describe": "京东居产变动通知(最新)",
"id": "jd_plantBean_xcl", "url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@1.7/src/main/resources/test_our_new.js",
"cron": "29 58 11,14,19,22,23,7 * * * *", "name": "京东居产变动通知(最新)"
"describe": "会自动关注任务中的店铺跟商品,介意者勿使用", }, {
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_Utils@v100.16/src/main/resources/test_bean.js", "id": "jd_bean_change_new2",
"name": "种豆得豆" "cron": "24 25 22 * * * *",
}, "describe": "京东居产变动通知",
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@1.7/src/main/resources/test_our.js",
{ "name": "京东居产变动通知"
"id": "jd_dtqd_xcl", }, {
"cron": "0 10 8 * * * *", "id": "jd_bean_change_new2",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/script/jd_dtqd.js", "cron": "1 1 12 * * * *",
"name": "店铺签到" "isConcurrent": false,
}, "describe": "京东资产变动通知(最新)",
{ "url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@1.7/src/main/resources/test_assets_new.js",
"id": "jd_bean_sign_xcl", "name": "京东资产变动通知(最新)"
"cron": "29 56 4 * * * *", }, {
"describe": "一键签到系列,每天运行一次,默认定时0点20分执行", "id": "jd_bean_change_new1",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_bean_sign.js", "cron": "55 21 22 * * * *",
"name": "京东一键签到" "describe": "京东资产变动通知",
}, "url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@1.7/src/main/resources/test_assets.js",
{ "name": "京东资产变动通知"
"id": "jd_jdzz_xcl", }, {
"cron": "27 10 5,22 * * * *", "id": "jd_plantBean_xcl",
"describe": "长期活动,每日收益2毛左右,多号互助会较多", "isConcurrent": false,
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_Utils@v1.1/src/main/resources/test_money_money.js", "cron": "29 58 11,14,19,22,23,3,8 * * * *",
"name": "京东赚赚" "describe": "会自动关注任务中的店铺跟商品,介意者勿使用",
}, { "url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@1.8/src/main/resources/test_bean.js",
"id": "jx_sign_xcl", "name": "种豆得豆"
"cron": "20 5 1 * * * *", }, {
"describe": "京喜签到", "id": "jd_pet_xcl",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jx_sign.js", "isConcurrent": false,
"name": "京喜签到" "cron": "51 17 5,11,23,18,9,16 * * * *",
}, "url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@1.8/src/main/resources/test_pet.js",
{ "name": "东东萌宠"
"id": "jd_market_lottery_xcl", }, {
"cron": "0 4 17 * * * *", "id": "jd_jdzz_xcl",
"describe": "幸运大转盘 活动地址:https://pro.m.jd.com/mall/active/3ryu78eKuLyY5YipWWVSeRQEpLQP/index.html", "isConcurrent": false,
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_market_lottery.js", "cron": "27 10 5,22 * * * *",
"name": "幸运大转盘" "describe": "长期活动,每日收益2毛左右,多号互助会较多",
}, { "url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@1.8/src/main/resources/test_money_money.js",
"id": "jd_gold_creator", "name": "京东赚赚"
"isConcurrent": true, }, {
"cron": "0 13 13,20 * * * *", "id": "jd_joypark_joy",
"describe": "活动入口:https://h5.m.jd.com/babelDiy/Zeus/2H5Ng86mUJLXToEo57qWkJkjFPxw/index.html", "cron": "1 4 2,7,11,15,20 * * * *",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_gold_creator.js", "describe": "汪汪乐园养joy",
"name": "金榜创造营" "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_joypark_joy.js",
}, "name": "汪汪乐园养joy"
{ }, {
"id": "gua_MMdou", "id": "jd_speed_red_xcl",
"isConcurrent": false, "isConcurrent": false,
"cron": "31 17 6,19 * * * *", "cron": "0 0 3,18 * * * *",
"describe": "入口:首页-领京豆-升级赚京豆", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_speed_red.js",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/gua_MMdou.js", "name": "极速版领红包"
"name": "升级领京豆" }, {
}, "id": "jd_speed_sign_xcl",
{ "isConcurrent": false,
"id": "jd_bean_change_new1", "cron": "56 9 2,10,19,22 * * * *",
"cron": "55 21 22 * * * *", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_speed_sign.js",
"describe": "京东资产变动通知", "name": "极速版签到赚金币"
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_Utils@v2.9/src/main/resources/test_assets.js", }, {
"name": "京东资产变动通知" "id": "jd_dtqd_xcl",
}, "isConcurrent": false,
{ "cron": "0 10 8 * * * *",
"id": "jd_bean_change_new2", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/script/jd_dtqd.js",
"cron": "24 25 22 * * * *", "name": "店铺签到"
"describe": "京东居产变动通知", }, {
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_Utils@v2.9/src/main/resources/test_our.js", "id": "jd_bean_sign_xcl",
"name": "京东居产变动通知" "isConcurrent": false,
}, { "cron": "29 56 4 * * * *",
"id": "jd_fruit_xcl", "describe": "一键签到系列,每天运行一次,默认定时0点20分执行",
"cron": "17 5 8,13,17 * * * *", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_bean_sign.js",
"describe": "一天只能帮助4个人。多出的助力码无效", "name": "京东一键签到"
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_Utils@v1.1/src/main/resources/test_fruit.js", }, {
"name": "东东农场" "id": "jx_sign_xcl",
}, "isConcurrent": false,
{ "cron": "20 5 1 * * * *",
"id": "jd_lsj", "describe": "京喜签到",
"isConcurrent": false, "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jx_sign.js",
"cron": "17 29 4,14 * * * *", "name": "京喜签到"
"describe": "入口 京东 频道 美食馆", }, {
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_lsj.js", "id": "jd_market_lottery_xcl",
"name": "零食街" "isConcurrent": false,
}, "cron": "0 4 17 * * * *",
{ "describe": "幸运大转盘 活动地址:https://pro.m.jd.com/mall/active/3ryu78eKuLyY5YipWWVSeRQEpLQP/index.html",
"id": "jd_joypark_joy", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_market_lottery.js",
"cron": "1 4 2,7,11,15,20 * * * *", "name": "幸运大转盘"
"describe": "汪汪乐园养joy", }, {
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_joypark_joy.js", "id": "jd_gold_creator",
"name": "汪汪乐园养joy" "isConcurrent": false,
}, { "cron": "0 13 13,20 * * * *",
"id": "jd_connoisseur", "describe": "活动入口:https://h5.m.jd.com/babelDiy/Zeus/2H5Ng86mUJLXToEo57qWkJkjFPxw/index.html",
"cron": "18 22 5 * * * *", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_gold_creator.js",
"describe": "内容鉴赏官", "name": "金榜创造营"
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_connoisseur.js", }, {
"name": "内容鉴赏官" "id": "gua_MMdou",
}, { "isConcurrent": false,
"id": "jd_wish", "cron": "31 17 6,19 * * * *",
"cron": "17 56 4,11,17,21 * * * *", "describe": "入口:首页-领京豆-升级赚京豆",
"describe": "活动入口:京东-京东众筹-众筹许愿池", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/gua_MMdou.js",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/yuannian1112/jd_scripts/main/jd_wish.js", "name": "升级领京豆"
"name": "众筹许愿池" }, {
}, { "id": "jd_lsj",
"id": "jd_ddworld", "isConcurrent": false,
"cron": "0 8 20,3,13 * * * *", "cron": "17 29 4,14 * * * *",
"describe": "东东世界", "describe": "入口 京东 频道 美食馆",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_ddworld.js", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_lsj.js",
"name": "东东世界" "name": "零食街"
}, { }, {
"id": "jx_mc", "id": "jd_connoisseur",
"isConcurrent": true, "cron": "18 22 5 * * * *",
"cron": "14 39 1,7,13,19 * * * *", "describe": "内容鉴赏官",
"describe": "京喜App -> 我的 -> 京喜牧场,先将新手任务做完,再执行本脚本,不然会出现未知错误", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_connoisseur.js",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jx_mc.js", "name": "内容鉴赏官"
"name": "京喜牧场" }, {
}, "id": "jd_wish",
{ "cron": "17 56 4,11,17,21 * * * *",
"id": "jx_cfd_xcl", "describe": "活动入口:京东-京东众筹-众筹许愿池",
"cron": "28 3 2,5,8,11,14,17,20,23 * * * *", "url": "https://ghproxy.com/https://raw.githubusercontent.com/yuannian1112/jd_scripts/main/jd_wish.js",
"describe": "京喜APP-我的-京喜财富岛", "name": "众筹许愿池"
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jx_cfd.js", }, {
"name": "京喜财富岛" "id": "jd_ddworld",
}, { "cron": "0 8 20,3,13 * * * *",
"id": "jd_bean_change_new1", "describe": "东东世界",
"cron": "10 59 11 * * * *", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_ddworld.js",
"describe": "京东居产变动通知(最新)", "name": "东东世界"
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_Utils@v2.9/src/main/resources/test_our_new.js", }, {
"name": "京东居产变动通知(最新)" "id": "jx_mc",
}, "isConcurrent": false,
{ "cron": "14 39 1,7,13,19 * * * *",
"id": "jd_bean_change_new2", "describe": "京喜App -> 我的 -> 京喜牧场,先将新手任务做完,再执行本脚本,不然会出现未知错误",
"cron": "1 1 12 * * * *", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jx_mc.js",
"describe": "京东资产变动通知(最新)", "name": "京喜牧场"
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_Utils@v2.9/src/main/resources/test_our_new.js", }, {
"name": "京东资产变动通知(最新)" "id": "jx_cfd_xcl",
}, { "isConcurrent": false,
"id": "jd_dreamFactory_xcl", "cron": "28 3 2,5,8,11,14,17,20,23 * * * *",
"cron": "22 10,40 0,6,12,18 * * * *", "describe": "京喜APP-我的-京喜财富岛",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_dreamFactory.js", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jx_cfd.js",
"name": "京喜工厂" "name": "京喜财富岛"
}, { }, {
"id": "jd_try_xcl1", "id": "jd_dreamFactory_xcl",
"cron": "9 34 0,3,6,9,12,15,18,21 * * * *", "cron": "22 10,40 0,6,12,18 * * * *",
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@v1.3/src/main/resources/test_trytryOne.js", "isConcurrent": false,
"name": "随机试用1" "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_dreamFactory.js",
}, { "name": "京喜工厂"
"id": "jd_try_xcl2", }, {
"cron": "17 1 2,5,8,11,14,17,20,23 * * * *", "id": "jd_jmsign",
"url": "https://cdn.jsdelivr.net/gh/selfImprHuang/Java_utils_enhance@v1.3/src/main/resources/test_trytryOne.js", "isConcurrent": false,
"name": "随机试用2" "cron": "0 11 0,9 * * * *",
}, "describe": "芥么签到",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_jmsign.js",
"name": "芥么签到"
}, {
"id": "jd_car_exchange",
"isConcurrent": false,
"cron": "0 0 10 * * * *",
{ "describe": "活动入口:京东APP首页-京东汽车-屏幕右中部,车主福利",
"id": "jd_star_shop", "url": "https://ghproxy.com/https://github.com/zero205/JD_tencent_scf/blob/main/jd_car_exchange.js",
"cron": "0 12 19 19-30 9 * *", "name": "京东汽车兑换"
"describe": "明星小店", }, {
"url": "https://ghproxy.com/https://raw.githubusercontent.com/zero205/JD_tencent_scf/main/jd_star_shop.js", "id": "jd_car",
"name": "明星小店" "isConcurrent": false,
}, { "cron": "0 10 7 * * * *",
"id": "jd_ddwj", "describe": "活动入口:京东APP首页-京东汽车-屏幕右中部,车主福利",
"cron": "0 20 0 * * * *", "url": "https://ghproxy.com/https://github.com/zero205/JD_tencent_scf/blob/main/jd_car.js",
"describe": "东东玩家", "name": "京东汽车"
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_ddwj.js", }, {
"name": "东东玩家" "id": "jd_superbox",
}, { "isConcurrent": false,
"id": "jd_xmf", "cron": "0 24 2,3 * * * *",
"cron": "0 6 8,20 * * * *", "url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_superbox.js",
"describe": "集魔方", "name": "京东超级盒子"
"url": "https://ghproxy.com/https://raw.githubusercontent.com/zero205/JD_tencent_scf/main/jd_jmf.js", }]
"name": "集魔方"
}, {
"id": "jd_jmsign",
"cron": "0 11 0,9 * * * *",
"describe": "芥么签到",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_jmsign.js",
"name": "芥么签到"
}, {
"id": "jd_genz",
"cron": "0 37 0,11 * * * *",
"describe": "微信-芥么小程序-赚豪礼",
"url": "https://ghproxy.com/https://github.com/zero205/JD_tencent_scf/blob/main/jd_genz.js",
"name": "芥么赚豪礼"
}, {
"id": "jd_bookshop",
"cron": "0 1 8,12,18 * * * *",
"describe": "活动入口:https://lzdz-isv.isvjcloud.com/dingzhi/book/develop/activity?activityId=dz2010100034444201",
"url": "https://ghproxy.com/https://github.com/zero205/JD_tencent_scf/blob/main/jd_bookshop.js",
"name": "口袋书店"
}, {
"id": "jd_car_exchange",
"cron": "0 0 10 * * * *",
"describe": "活动入口:京东APP首页-京东汽车-屏幕右中部,车主福利",
"url": "https://ghproxy.com/https://github.com/zero205/JD_tencent_scf/blob/main/jd_car_exchange.js",
"name": "京东汽车兑换"
}, {
"id": "jd_car",
"cron": "0 10 7 * * * *",
"describe": "活动入口:京东APP首页-京东汽车-屏幕右中部,车主福利",
"url": "https://ghproxy.com/https://github.com/zero205/JD_tencent_scf/blob/main/jd_car.js",
"name": "京东汽车"
}, {
"id": "ccfxj",
"isConcurrent": false,
"cron": "0 0 2 * * * *",
"describe": "首个帐号助力作者,其余帐号优先向前内部互助",
"url": "https://tyh52.com/jd/script/ccfxj.js",
"name": "城城分现金"
}, {
"id": "jd_fission",
"cron": "0 11 0,9 * * * *",
"describe": "东东超市抢京豆",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_fission.js",
"name": "东东超市抢京豆"
}, {
"id": "jd_ys",
"cron": "0 5 0,2 * * * *",
"describe": "活动入口:https://prodev.m.jd.com/mall/active/3QvpPkepEuB5hRgtQvWJ2bjRTCA8/index.html",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/zero205/JD_tencent_scf/main/jd_ys.js",
"name": "预售福利机"
}, {
"id": "jd_speed_signfree",
"cron": "0 18 8,12,20 * * * *",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_speed_signfree.js",
"name": "签到免单"
}, {
"id": "jd_jika",
"cron": "0 10 7,21 * * * *",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/yuannian1112/jd_scripts/main/jd_jika.js",
"name": "集魔力卡召唤大奖"
}, {
"id": "jd_zzt",
"cron": "0 23 9,12 * * * *",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/yuannian1112/jd_scripts/main/jd_zzt.js",
"name": "潮玩儿制躁团"
}, {
"id": "jd_superbox",
"isConcurrent": false,
"cron": "0 24 2,3 * * * *",
"url": "https://ghproxy.com/https://raw.githubusercontent.com/small-redguy/helper/main/jdresource/jd_superbox.js",
"name": "京东超级盒子"
}
]
+1 -2
View File
@@ -6,6 +6,7 @@ let shareCodes =
[ // 这个列表填入你要助力的好友的shareCode [ // 这个列表填入你要助力的好友的shareCode
] ]
let message = '', subTitle = '', option = {}, isFruitFinished = false; let message = '', subTitle = '', option = {}, isFruitFinished = false;
let dingtalk = "https://oapi.dingtalk.com/robot/send?access_token=d2b6042cb38f0df63e20797c002208d2710104750c18a1dc84d54106a859a3f0"
const retainWater = 100;//保留水滴大于多少g,默认100g; const retainWater = 100;//保留水滴大于多少g,默认100g;
let jdNotify = false;//是否关闭通知,false打开通知推送,true关闭通知推送 let jdNotify = false;//是否关闭通知,false打开通知推送,true关闭通知推送
let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),true表示换豆(不浇水),false表示不换豆(继续浇水),脚本默认是浇水 let jdFruitBeanCard = false;//农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),true表示换豆(不浇水),false表示不换豆(继续浇水),脚本默认是浇水
@@ -1461,8 +1462,6 @@ function jsonParse(str) {
//我加的函数 //我加的函数
function postToDingTalk(messgae) { function postToDingTalk(messgae) {
const dingtalk = "https://oapi.dingtalk.com/robot/send?access_token=18444b555747aad3381bc1d1e3dea72b03158e152a846f818d82a1ca946bd430"
const message1 = "" + messgae const message1 = "" + messgae
that.log(messgae) that.log(messgae)
+1 -1
View File
@@ -6,6 +6,7 @@ const randomCount = $.isNode() ? 0 : 5;
let jdNotify = true; // 是否关闭通知,false打开通知推送,true关闭通知推送 let jdNotify = true; // 是否关闭通知,false打开通知推送,true关闭通知推送
//IOS等用户直接用NobyDa的jd cookie //IOS等用户直接用NobyDa的jd cookie
let cookiesArr = [], cookie = '', message = ""; let cookiesArr = [], cookie = '', message = "";
let dingtalk = "https://oapi.dingtalk.com/robot/send?access_token=d2b6042cb38f0df63e20797c002208d2710104750c18a1dc84d54106a859a3f0"
if ($.isNode()) { if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => { Object.keys(jdCookieNode).forEach((item) => {
cookiesArr.push(jdCookieNode[item]) cookiesArr.push(jdCookieNode[item])
@@ -653,7 +654,6 @@ function jsonParse(str) {
//我加的函数 //我加的函数
function postToDingTalk(messgae) { function postToDingTalk(messgae) {
const dingtalk = "https://oapi.dingtalk.com/robot/send?access_token=18444b555747aad3381bc1d1e3dea72b03158e152a846f818d82a1ca946bd430"
const message1 = "" + messgae const message1 = "" + messgae
that.log(messgae) that.log(messgae)
+4 -5
View File
@@ -9,6 +9,7 @@ let jdNotify = false;//是否关闭通知,false打开通知推送,true关闭
const JD_API_HOST = 'https://api.m.jd.com/client.action'; const JD_API_HOST = 'https://api.m.jd.com/client.action';
let goodsUrl = '', taskInfoKey = []; let goodsUrl = '', taskInfoKey = [];
let randomCount = $.isNode() ? 20 : 5; let randomCount = $.isNode() ? 20 : 5;
let postAddress = "https://oapi.dingtalk.com/robot/send?access_token=d2b6042cb38f0df63e20797c002208d2710104750c18a1dc84d54106a859a3f0"
!(async () => { !(async () => {
await requireConfig(); await requireConfig();
if (!cookiesArr[0]) { if (!cookiesArr[0]) {
@@ -19,7 +20,7 @@ let randomCount = $.isNode() ? 20 : 5;
message += "<font color=\'#FFA500\'>[通知] </font><font color=\'#006400\' size='3'>动动萌宠</font> \n\n --- \n\n" message += "<font color=\'#FFA500\'>[通知] </font><font color=\'#006400\' size='3'>动动萌宠</font> \n\n --- \n\n"
for (let i = 0; i < cookiesArr.length; i++) { for (let i = 0; i < cookiesArr.length; i++) {
if (cookiesArr[i]) { if (cookiesArr[i]) {
await $.wait(Math.floor(Math.random() * (300000) + 5000)); await $.wait(Math.floor(Math.random() * (300000) + 5000));
cookie = cookiesArr[i]; cookie = cookiesArr[i];
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]) $.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
$.index = i + 1; $.index = i + 1;
@@ -38,7 +39,7 @@ let randomCount = $.isNode() ? 20 : 5;
username = "康康" username = "康康"
} }
//加上名称 //加上名称
message = message + "<font color=\'#778899\' size=2>【羊毛姐妹】<font color=\'#FFA500\' size=3>" + username + " </font> </font> \n\n " message = message + "<font color=\'#778899\' size=2>【羊毛姐妹】<font color=\'#FFA500\' size=3>" + username + " </font> </font> \n\n "
await TotalBean(); await TotalBean();
that.log(`\n开始【动动账号${$.index}${$.nickName || $.UserName}\n`); that.log(`\n开始【动动账号${$.index}${$.nickName || $.UserName}\n`);
if (!$.isLogin) { if (!$.isLogin) {
@@ -653,8 +654,6 @@ function jsonParse(str) {
//我加的函数 //我加的函数
function postToDingTalk(messgae) { function postToDingTalk(messgae) {
const dingtalk = "https://oapi.dingtalk.com/robot/send?access_token=18444b555747aad3381bc1d1e3dea72b03158e152a846f818d82a1ca946bd430"
const message1 = "" + messgae const message1 = "" + messgae
that.log(messgae) that.log(messgae)
@@ -671,7 +670,7 @@ function postToDingTalk(messgae) {
} }
$.post(toDingtalk(dingtalk,JSON.stringify(body)), (data,status,xhr)=>{ $.post(toDingtalk(postAddress ,JSON.stringify(body)), (data,status,xhr)=>{
try { try {
that.log(resp) that.log(resp)
that.log(data) that.log(data)