diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf index 82a334a3..751b5868 100644 --- a/Loon/lxk0301_LoonTask.conf +++ b/Loon/lxk0301_LoonTask.conf @@ -107,7 +107,7 @@ cron "10 0,20 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_sc cron "1 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js,tag=京东年货节 # 京东炸年兽🧨 -cron "0 9,12,20 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js,tag=京东炸年兽🧨 +cron "0 9,12,20,21 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js,tag=京东炸年兽🧨 # 京东炸年兽领爆竹🧨 cron "50 * * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nianCollect.js,tag=京东收🧨 diff --git a/QuantumultX/lxk0301_gallery.json b/QuantumultX/lxk0301_gallery.json index d0e4bb2c..3009d359 100644 --- a/QuantumultX/lxk0301_gallery.json +++ b/QuantumultX/lxk0301_gallery.json @@ -30,7 +30,7 @@ "3 0-23/2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js, tag=京东摇钱树, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyqs.png, enabled=true", "10 0,20 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js, tag=点点券, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true", "1 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js, tag=京东年货节, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true", - "0 9,12,20 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js, tag=京东炸年兽🧨, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/main/Icon/lxk0301/jd_nian.png, enabled=true", + "0 9,12,20,21 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js, tag=京东炸年兽🧨, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/main/Icon/lxk0301/jd_nian.png, enabled=true", "50 * * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nianCollect.js, tag=京东收🧨, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/main/Icon/lxk0301/jd_nianCollect.png, enabled=true", "0 9 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_ar.js, tag=京东炸年兽AR, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/main/Icon/lxk0301/jd_nian.png, enabled=true", "30 8 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_sign.js, tag=京东炸年兽签到任务🧨, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/main/Icon/lxk0301/jd_nian.png, enabled=true", diff --git a/README.md b/README.md index 2f43dd5e..07932586 100644 --- a/README.md +++ b/README.md @@ -30,70 +30,71 @@ -| 序号 | 名称 | blob文件链接 | raw文件链接 | -| ---- | ------- | ------------ | ----------- | -| 1 | 京豆变动通知 | [jd_bean_change.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_bean_change.js) | [jd_bean_change.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js) | -| 2 | 领京豆额外奖励 | [jd_bean_home.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_bean_home.js) | [jd_bean_home.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js) | -| 3 | 京豆签到 | [jd_bean_sign.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_bean_sign.js) | [jd_bean_sign.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_sign.js) | -| 4 | 东东超市兑换奖品 | [jd_blueCoin.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_blueCoin.js) | [jd_blueCoin.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js) | -| 5 | 口袋书店 | [jd_bookshop.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_bookshop.js) | [jd_bookshop.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js) | -| 6 | 京东汽车 | [jd_car.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_car.js) | [jd_car.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js) | -| 7 | 京东汽车兑换 | [jd_car_exchange.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_car_exchange.js) | [jd_car_exchange.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js) | -| 8 | 签到领现金 | [jd_cash.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_cash.js) | [jd_cash.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_cash.js) | -| 9 | 摇京豆 | [jd_club_lottery.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_club_lottery.js) | [jd_club_lottery.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_club_lottery.js) | -| 10 | crazyJoy任务 | [jd_crazy_joy.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_crazy_joy.js) | [jd_crazy_joy.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js) | -| 11 | crazyJoy挂机 | [jd_crazy_joy_coin.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_crazy_joy_coin.js) | [jd_crazy_joy_coin.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy_coin.js) | -| 12 | 天天提鹅 | [jd_daily_egg.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_daily_egg.js) | [jd_daily_egg.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_daily_egg.js) | -| 13 | 京喜工厂 | [jd_dreamFactory.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_dreamFactory.js) | [jd_dreamFactory.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js) | -| 14 | 京东家庭号 | [jd_family.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_family.js) | [jd_family.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_family.js) | -| 15 | 集鞭炮赢京豆 | [jd_firecrackers.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_firecrackers.js) | [jd_firecrackers.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_firecrackers.js) | -| 16 | 东东农场 | [jd_fruit.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_fruit.js) | [jd_fruit.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js) | -| 17 | 获取互助码 | [jd_get_share_code.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_get_share_code.js) | [jd_get_share_code.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_get_share_code.js) | -| 18 | 京东神仙书院 | [jd_immortal.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_immortal.js) | [jd_immortal.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_immortal.js) | -| 19 | 东东工厂 | [jd_jdfactory.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_jdfactory.js) | [jd_jdfactory.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js) | -| 20 | 京东赚赚 | [jd_jdzz.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_jdzz.js) | [jd_jdzz.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js) | -| 21 | 宠汪汪 | [jd_joy.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_joy.js) | [jd_joy.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js) | -| 22 | 宠汪汪🐕喂食 | [jd_joy_feedPets.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_joy_feedPets.js) | [jd_joy_feedPets.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_feedPets.js) | -| 23 | 宠汪汪强制为别人助力 | [jd_joy_help.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_joy_help.js) | [jd_joy_help.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_help.js) | -| 24 | 宠汪汪积分兑换奖品 | [jd_joy_reward.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_joy_reward.js) | [jd_joy_reward.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js) | -| 25 | 宠汪汪赛跑 | [jd_joy_run.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_joy_run.js) | [jd_joy_run.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js) | -| 26 | 宠汪汪偷好友积分与狗粮 | [jd_joy_steal.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_joy_steal.js) | [jd_joy_steal.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js) | -| 27 | 京喜农场 | [jd_jxnc.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_jxnc.js) | [jd_jxnc.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxnc.js) | -| 28 | 京东快递签到 | [jd_kd.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_kd.js) | [jd_kd.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js) | -| 29 | 京东直播 | [jd_live.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_live.js) | [jd_live.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js) | -| 30 | 京东抽奖机 | [jd_lotteryMachine.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_lotteryMachine.js) | [jd_lotteryMachine.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_lotteryMachine.js) | -| 31 | 京东摇钱树 | [jd_moneyTree.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_moneyTree.js) | [jd_moneyTree.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js) | -| 32 | 点点券 | [jd_necklace.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_necklace.js) | [jd_necklace.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js) | -| 33 | 京东年货节 | [jd_nh.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_nh.js) | [jd_nh.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js) | -| 34 | 京东炸年兽🧨 | [jd_nian.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_nian.js) | [jd_nian.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js) | -| 35 | 京东炸年兽领爆竹🧨 | [jd_nianCollect.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_nianCollect.js) | [jd_nianCollect.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nianCollect.js) | -| 36 | 京东炸年兽AR | [jd_nian_ar.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_nian_ar.js) | [jd_nian_ar.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_ar.js) | -| 37 | 京东炸年兽签到任务🧨 | [jd_nian_sign.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_nian_sign.js) | [jd_nian_sign.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_sign.js) | -| 38 | 京东炸年兽小程序🧨 | [jd_nian_wechat.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_nian_wechat.js) | [jd_nian_wechat.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_wechat.js) | -| 39 | 东东萌宠 | [jd_pet.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_pet.js) | [jd_pet.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js) | -| 40 | 聚宝盆投狗粮辅助 | [jd_petTreasureBox.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_petTreasureBox.js) | [jd_petTreasureBox.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_petTreasureBox.js) | -| 41 | 金融养猪 | [jd_pigPet.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_pigPet.js) | [jd_pigPet.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pigPet.js) | -| 42 | 京东种豆得豆 | [jd_plantBean.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_plantBean.js) | [jd_plantBean.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js) | -| 43 | 京东排行榜 | [jd_rankingList.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_rankingList.js) | [jd_rankingList.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_rankingList.js) | -| 44 | 京东全民开红包 | [jd_redPacket.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_redPacket.js) | [jd_redPacket.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js) | -| 45 | 闪购盲盒 | [jd_sgmh.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_sgmh.js) | [jd_sgmh.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_sgmh.js) | -| 46 | 进店领豆 | [jd_shop.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_shop.js) | [jd_shop.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js) | -| 47 | 东东小窝 | [jd_small_home.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_small_home.js) | [jd_small_home.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js) | -| 48 | ✈️天天加速 | [jd_speed.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_speed.js) | [jd_speed.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js) | -| 49 | 东东超市 | [jd_superMarket.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_superMarket.js) | [jd_superMarket.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_superMarket.js) | -| 50 | 十元街 | [jd_syj.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_syj.js) | [jd_syj.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js) | -| 51 | 注销京东会员卡 | [jd_unbind.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_unbind.js) | [jd_unbind.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js) | -| 52 | 取关京东店铺和商品 | [jd_unsubscribe.js](https://github.com/LXK9301/jd_scripts/blob/master/jd_unsubscribe.js) | [jd_unsubscribe.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js) | -| 53 | 京喜签到 | [jx_sign.js](https://github.com/LXK9301/jd_scripts/blob/master/jx_sign.js) | [jx_sign.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js) | +| 文件 | 名称 | 活动入口 | +| - | - | - | +|[jd_bean_change.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js)|京豆变动通知|| +|[jd_bean_home.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js)|领京豆额外奖励|首页-领京豆| +|[jd_bean_sign.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_sign.js)|京豆签到|各处的签到汇总| +|[jd_beauty.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_beauty.js)|美丽研究院|京东app首页-美妆馆-底部中间按钮| +|[jd_blueCoin.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js)|东东超市兑换奖品|京东APP我的-更多工具-东东超市| +|[jd_bookshop.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js)|口袋书店|京东app首页-京东图书-右侧口袋书店| +|[jd_car.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js)|京东汽车|首页👉京东汽车👉屏幕右中部,车主福利| +|[jd_car_exchange.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js)|京东汽车兑换|首页👉京东汽车兑换👉屏幕右中部,车主福利| +|[jd_cash.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_cash.js)|签到领现金|京东APP搜索领现金进入| +|[jd_club_lottery.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_club_lottery.js)|摇京豆|京东APP首页-领京豆-摇京豆| +|[jd_crazy_joy.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js)|crazyJoy任务|京东APP我的-更多工具-疯狂的JOY| +|[jd_crazy_joy_coin.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy_coin.js)|crazyJoy挂机|京东APP我的-更多工具-疯狂的JOY| +|[jd_daily_egg.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_daily_egg.js)|天天提鹅|京东金融-天天提鹅| +|[jd_dreamFactory.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js)|京喜工厂|京东APP-游戏与互动-查看更多-京喜工厂| +|[jd_family.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_family.js)|京东家庭号|玩一玩-家庭号| +|[jd_firecrackers.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_firecrackers.js)|集鞭炮赢京豆|https://linggame.jd.com/babelDiy/Zeus/heA49fhvyw9UakaaS3UUJRL7v3o/index.html| +|[jd_fruit.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js)|东东农场|京东APP我的-更多工具-东东农场| +|[jd_get_share_code.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_get_share_code.js)|获取互助码|我的->游戏与互动->查看更多开启`| +|[jd_immortal.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_immortal.js)|京东神仙书院|京东app-我的-神仙书院| +|[jd_jdfactory.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js)|东东工厂|京东APP首页-数码电器-东东工厂| +|[jd_jdzz.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js)|京东赚赚|京东赚赚小程序| +|[jd_joy.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js)|宠汪汪|京东APP我的-更多工具-宠汪汪| +|[jd_joy_feedPets.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_feedPets.js)|宠汪汪🐕喂食|京东APP我的-更多工具-宠汪汪| +|[jd_joy_help.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_help.js)|宠汪汪强制为别人助力|京东APP我的-更多工具-宠汪汪| +|[jd_joy_reward.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js)|宠汪汪积分兑换奖品|京东APP我的-更多工具-宠汪汪| +|[jd_joy_run.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js)|宠汪汪赛跑|京东APP我的-更多工具-宠汪汪| +|[jd_joy_steal.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js)|宠汪汪偷好友积分与狗粮|京东APP我的-更多工具-宠汪汪| +|[jd_jxnc.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxnc.js)|京喜农场|京喜APP我的-京喜农场| +|[jd_kd.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js)|京东快递签到|https://jingcai-h5.jd.com/#/| +|[jd_live.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js)|京东直播|https://h5.m.jd.com/babelDiy/Zeus/2zwQnu4WHRNfqMSdv69UPgpZMnE2/index.html/| +|[jd_lotteryMachine.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_lotteryMachine.js)|京东抽奖机|京东APP中各种抽奖活动的汇总| +|[jd_moneyTree.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js)|京东摇钱树|京东APP我的-更多工具-摇钱树| +|[jd_necklace.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js)|点点券|京东APP-领券中心/券后9.9-领点点券| +|[jd_nh.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js)|京东年货节|https://lzdz-isv.isvjcloud.com/dingzhi/vm/template/activity/940531?activityId=dzvm210168869301| +|[jd_nian.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js)|京东炸年兽🧨|京东app首页浮动窗口| +|[jd_nian_ar.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_ar.js)|京东炸年兽AR|京东app首页浮动窗口| +|[jd_nian_sign.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_sign.js)|京东炸年兽签到任务🧨|京东app左侧浮动窗口| +|[jd_nian_wechat.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_wechat.js)|京东炸年兽小程序🧨|| +|[jd_nianCollect.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nianCollect.js)|京东炸年兽领爆竹🧨|京东app首页浮动窗口| +|[jd_pet.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js)|东东萌宠|京东APP我的-更多工具-东东萌宠| +|[jd_petTreasureBox.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_petTreasureBox.js)|聚宝盆投狗粮辅助|京东APP我的-更多工具-宠汪汪| +|[jd_pigPet.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pigPet.js)|金融养猪|京东金融养猪猪| +|[jd_plantBean.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js)|京东种豆得豆|京东APP我的-更多工具-种豆得豆| +|[jd_rankingList.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_rankingList.js)|京东排行榜|京东APP首页-更多频道-特色频道-排行榜-悬浮按钮今日王牌领京豆| +|[jd_redPacket.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js)|京东全民开红包|京东APP-首页-领券-锦鲤红包| +|[jd_sgmh.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_sgmh.js)|闪购盲盒|首页-闪购-闪购盲盒| +|[jd_shop.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js)|进店领豆|京东APP首页-领京豆-进店领豆| +|[jd_small_home.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js)|东东小窝|京东APP我的-游戏与更多-东东小窝| +|[jd_speed.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js)|✈️天天加速|京东APP我的-更多工具-天天加速| +|[jd_superMarket.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_superMarket.js)|东东超市|京东APP首页-京东超市-底部东东超市| +|[jd_syj.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js)|赚京豆|赚京豆(微信小程序)-赚京豆-签到领京豆| +|[jd_unbind.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js)|注销京东会员卡|| +|[jd_unsubscribe.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js)|取关京东店铺和商品|| +|[jx_sign.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js)|京喜签到|| #### 搬运脚本 -1. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东抽奖机([jd_lotteryMachine.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_lotteryMachine.js)) +1. 【 [@yangtingxiao](https://github.com/yangtingxiao) 】 京东抽奖机([jd_lotteryMachine.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_lotteryMachine.js)) -2. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东排行榜([jd_rankingList.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_rankingList.js)) +2. 【 [@yangtingxiao](https://github.com/yangtingxiao) 】 京东排行榜([jd_rankingList.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_rankingList.js)) **脚本兼容: [QuantumultX](https://apps.apple.com/us/app/quantumult-x/id1443988620), [Surge](https://apps.apple.com/us/app/surge-4/id1442620678), [Loon](https://apps.apple.com/us/app/loon/id1373567447), 小火箭, JSBox, Node.js** @@ -137,19 +138,19 @@ ### 4. iOS代理软件(QuantumultX, Surge, Loon, 小火箭) -##### 获取京东cookie +##### BoxJs订阅地址:[lxk0301.boxjs.json](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/lxk0301.boxjs.json) -- [京东cookie获取脚本 JD_extra_cookie.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/JD_extra_cookie.js) +##### 获取京东cookie [JD_extra_cookie.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/JD_extra_cookie.js) ##### 订阅链接: -- Surge:Task&Cookies脚本模块地址: https://raw.githubusercontent.com/LXK9301/jd_scripts/master/Surge/lxk0301_Task.sgmodule.sgmodule +- Surge:Task&Cookies脚本模块地址: [lxk0301_Task.sgmodule.sgmodule](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/Surge/lxk0301_Task.sgmodule.sgmodule) -- Loon:Task&Cookies脚本订阅链接: https://raw.githubusercontent.com/LXK9301/jd_scripts/master/Loon/lxk0301_LoonTask.conf +- Loon:Task&Cookies脚本订阅链接: [lxk0301_LoonTask.conf](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/Loon/lxk0301_LoonTask.conf) -- QuantumultX Task脚本订阅链接: https://raw.githubusercontent.com/LXK9301/jd_scripts/master/QuantumultX/lxk0301_gallery.json +- QuantumultX Task脚本订阅链接: [lxk0301_gallery.json](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/QuantumultX/lxk0301_gallery.json) -- QuantumultX cookie脚本订阅链接: https://raw.githubusercontent.com/LXK9301/jd_scripts/master/QuantumultX/lxk0301_cookies.conf +- QuantumultX cookie脚本订阅链接: [lxk0301_cookies.conf](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/QuantumultX/lxk0301_cookies.conf) ## 赞赏码(开发维护不易,请赏杯茶水费) diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule index af1bd196..87467466 100644 --- a/Surge/lxk0301_Task.sgmodule.sgmodule +++ b/Surge/lxk0301_Task.sgmodule.sgmodule @@ -41,7 +41,7 @@ crazyJoy任务 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,scrip 京东摇钱树 = type=cron,cronexp="3 0-23/2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js 点点券 = type=cron,cronexp="10 0,20 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js 京东年货节 = type=cron,cronexp="1 7 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js -京东炸年兽🧨 = type=cron,cronexp="0 9,12,20 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js +京东炸年兽🧨 = type=cron,cronexp="0 9,12,20,21 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js 京东收🧨 = type=cron,cronexp="50 * * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nianCollect.js 京东炸年兽AR = type=cron,cronexp="0 9 * * *",wake-system=1,timeout=36000,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_ar.js 京东炸年兽签到任务🧨 = type=cron,cronexp="30 8 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian_sign.js diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh index f1476648..5157ccc2 100644 --- a/docker/crontab_list.sh +++ b/docker/crontab_list.sh @@ -21,6 +21,9 @@ #京东神仙书院(活动时间:2021-1-20至2021-2-5) 30 6 * * * node /scripts/jd_immortal.js >> /scripts/logs/jd_immortal.log 2>&1 +#京东神仙书院答题(活动时间:2021-1-20至2021-2-5) +5 */2 * * * node /scripts/jd_immortal_answer.js >> /scripts/logs/jd_immortal_answer.log 2>&1 + ##############长期活动############## # 签到 0 0,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1 diff --git a/jd_bean_home.js b/jd_bean_home.js index 0dd13931..63904e78 100644 --- a/jd_bean_home.js +++ b/jd_bean_home.js @@ -1,7 +1,7 @@ /* 领京豆额外奖励&抢京豆 脚本自带助力码,介意者可将 29行 helpAuthor 变量设置为 false -入口:首页-领京豆 +活动入口:京东APP首页-领京豆 更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js diff --git a/jd_bean_sign.js b/jd_bean_sign.js index c8cd63bb..280cd451 100644 --- a/jd_bean_sign.js +++ b/jd_bean_sign.js @@ -3,6 +3,7 @@ */ /* 京豆签到,自用,可N个京东账号 +活动入口:各处的签到汇总 Node.JS专用 IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js 更新时间:2021-1-19 diff --git a/jd_blueCoin.js b/jd_blueCoin.js index 7fedbdcb..4a184753 100644 --- a/jd_blueCoin.js +++ b/jd_blueCoin.js @@ -2,6 +2,7 @@ 东东超市兑换奖品 脚本地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js 感谢@yangtingxiao提供PR 更新时间:2020-12-24 +活动入口:京东APP我的-更多工具-东东超市 支持京东多个账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============QuantumultX============== diff --git a/jd_car.js b/jd_car.js index 26c0b2df..132ade0b 100644 --- a/jd_car.js +++ b/jd_car.js @@ -1,7 +1,7 @@ /* 京东汽车,签到满500赛点可兑换500京豆,一天运行一次即可 长期活动 -活动入口:首页👉京东汽车👉屏幕右中部,车主福利 +活动入口:京东APP首页-京东汽车-屏幕右中部,车主福利 更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js diff --git a/jd_car_exchange.js b/jd_car_exchange.js index 00084709..99731961 100644 --- a/jd_car_exchange.js +++ b/jd_car_exchange.js @@ -2,8 +2,7 @@ 京东汽车兑换,500赛点兑换500京豆 长期活动 -活动入口 -京东APP:首页👉京东汽车兑换👉屏幕右中部,车主福利 +活动入口:京东APP首页-京东汽车-屏幕右中部,车主福利 活动网页地址:https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html#/journey 更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange diff --git a/jd_club_lottery.js b/jd_club_lottery.js index 71cf3d50..b343e936 100644 --- a/jd_club_lottery.js +++ b/jd_club_lottery.js @@ -5,7 +5,7 @@ * @Last Modified time: 2020-11-23 12:27:09 */ /* -摇京豆(京东APP首页-领京豆-摇京豆) +活动入口:京东APP首页-领京豆-摇京豆 更新时间:2020-10-12 Modified from https://github.com/Zero-S1/JD_tools/blob/master/JD_vvipclub.py 已支持IOS双京东账号,Node.js支持N个京东账号 diff --git a/jd_crazy_joy.js b/jd_crazy_joy.js index 687112e0..31b67187 100644 --- a/jd_crazy_joy.js +++ b/jd_crazy_joy.js @@ -3,7 +3,7 @@ crazyJoy任务 每天运行一次即可 - +活动入口:京东APP我的-更多工具-疯狂的JOY 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============Quantumultx=============== diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js index 8720d218..a2ecaa08 100644 --- a/jd_crazy_joy_coin.js +++ b/jd_crazy_joy_coin.js @@ -1,6 +1,7 @@ /* crazy joy 挂机领金币/宝箱专用 +活动入口:京东APP我的-更多工具-疯狂的JOY ⚠️建议云端使用。手机端不建议使用(会一直跑下去,永不停止) 10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy_coin.js diff --git a/jd_daily_egg.js b/jd_daily_egg.js index f4000c6d..7b93ce8f 100644 --- a/jd_daily_egg.js +++ b/jd_daily_egg.js @@ -6,7 +6,7 @@ */ /* TODO -京东金融-天天提鹅 +活动入口:京东金融-天天提鹅 定时收鹅蛋,兑换金币 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js index eb1e1072..56335d2e 100644 --- a/jd_dreamFactory.js +++ b/jd_dreamFactory.js @@ -1,7 +1,7 @@ /* 京东京喜工厂 更新时间:2021-1-19 -活动入口 :京东APP->游戏与互动->查看更多->京喜工厂 +活动入口:京东APP我的-游戏与互动-查看更多-京喜工厂 或者: 京东APP首页搜索 "玩一玩" ,造物工厂即可 diff --git a/jd_firecrackers.js b/jd_firecrackers.js index 634c49ba..6c8430c1 100644 --- a/jd_firecrackers.js +++ b/jd_firecrackers.js @@ -6,7 +6,8 @@ */ /* 集鞭炮赢京豆 -活动入口:https://linggame.jd.com/babelDiy/Zeus/heA49fhvyw9UakaaS3UUJRL7v3o/index.html +活动入口:京东APP首页-发现好货-悬浮窗领京豆 +地址:https://linggame.jd.com/babelDiy/Zeus/heA49fhvyw9UakaaS3UUJRL7v3o/index.html 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============Quantumultx=============== diff --git a/jd_fruit.js b/jd_fruit.js index cf7b9840..0164570e 100644 --- a/jd_fruit.js +++ b/jd_fruit.js @@ -1,6 +1,7 @@ /* 东东水果:脚本更新地址 https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js 更新时间:2021-1-9 +活动入口:京东APP我的-更多工具-东东农场 东东农场活动链接:https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js diff --git a/jd_immortal.js b/jd_immortal.js index da6ec925..d7b6e504 100644 --- a/jd_immortal.js +++ b/jd_immortal.js @@ -5,8 +5,8 @@ 环境变量:JD_IMMORTAL_LATLON(经纬度) 示例:JD_IMMORTAL_LATLON={"lat":33.1, "lng":118.1} boxjs IMMORTAL_LATLON -活动入口: 京东app-我的-神仙书院 -活动地址:https://h5.m.jd.com//babelDiy//Zeus//4XjemYYyPScjmGyjej78M6nsjZvj//index.html?babelChannel=ttt9 +活动入口:京东APP我的-神仙书院 +地址:https://h5.m.jd.com//babelDiy//Zeus//4XjemYYyPScjmGyjej78M6nsjZvj//index.html?babelChannel=ttt9 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============Quantumultx=============== diff --git a/jd_immortal_answer.js b/jd_immortal_answer.js new file mode 100644 index 00000000..d5b90396 --- /dev/null +++ b/jd_immortal_answer.js @@ -0,0 +1,439 @@ +/* +京东神仙书院答题 +根据bing搜索结果答题,常识题可对,商品题不能保证胜率 +活动时间:2021-1-27至2021-2-5 +活动入口: 京东APP我的-神仙书院 +活动地址:https://h5.m.jd.com//babelDiy//Zeus//4XjemYYyPScjmGyjej78M6nsjZvj//index.html?babelChannel=ttt9 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东神仙书院答题 +20 8 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_immortal_answer.js, tag=京东神仙书院答题, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png, enabled=true + +================Loon============== +[Script] +cron "20 8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_immortal_answer.js,tag=京东神仙书院答题 + +===============Surge================= +京东神仙书院答题 = type=cron,cronexp="20 8 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_immortal_answer.js + +============小火箭========= +京东神仙书院答题 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_immortal_answer.js, cronexpr="20 8 * * *", timeout=3600, enable=true + */ +const $ = new Env('京东神仙书院答题'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = jsonParse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; + +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + await requireTk() + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await jdImmortalAnswer() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) + +async function jdImmortalAnswer() { + try { + $.risk = false + $.earn = 0 + await getHomeData() + if ($.risk) return + await getQuestions() + await showMsg() + } catch (e) { + $.logErr(e) + } +} + +function getHomeData(info = false) { + return new Promise((resolve) => { + $.post(taskPostUrl('mcxhd_brandcity_homePage'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['retCode'] === "200") { + const {userCoinNum} = data.result + if (info) { + $.earn = userCoinNum - $.coin + } else { + console.log(`当前用户金币${userCoinNum}`) + } + $.coin = userCoinNum + } else { + $.risk = true + console.log(`账号被风控,无法参与活动`) + message += `账号被风控,无法参与活动\n` + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function showMsg() { + return new Promise(resolve => { + message += `本次运行获得${$.earn}积分` + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} + +function getQuestions() { + return new Promise((resolve) => { + $.get(taskUrl('mcxhd_brandcity_getQuestions'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data['retCode'] === "200") { + console.log(`答题开启成功`) + let i = 0, questionList = [] + for (let vo of data.result.questionList) { + $.question = vo + let option = null, hasFound = false + + console.log(`去查询第${++i}题:【${vo.questionStem}】`) + let ques = $.tk.filter(qo => qo.questionId === vo.questionId) + + if (ques.length) { + ques = ques[0] + let ans = JSON.parse(ques.correct) + let opt = vo.options.filter(bo => bo.optionDesc === ans.optionDesc) + if (opt.length) { + console.log(`在题库中找到题啦~`) + option = opt[0] + hasFound = true + } + } + + if (!option) { + console.log(`在题库中未找到题`) + let ans = -1 + for (let opt of vo.options) { + let str = vo.questionStem + opt.optionDesc + console.log(`去搜索${str}`) + let res = await bing(str) + if (res > ans) { + option = opt + ans = res + } + await $.wait(2 * 1000) + } + if (!option) { + option = vo.options[1] + console.log(`未找到答案,都选B【${option.optionDesc}】\n`) + } else { + console.log(`选择搜索返回结果最多的一项【${option.optionDesc}】\n`) + } + } + + let b = { + "questionToken": vo.questionToken, + "optionId": option.optionId + } + $.option = option + await answer(b) + if (!hasFound) questionList.push($.question) + if (i < data.result.questionList.length) { + if (hasFound) + await $.wait(2 * 1000) + else + await $.wait(5 * 1000) + } + } + for (let vo of questionList) { + $.question = vo + await submitQues({ + ...$.question, + options: JSON.stringify($.question.options), + correct: JSON.stringify($.question.correct), + }) + } + } else { + console.log(`答题开启失败`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function submitQues(question) { + return new Promise(resolve => { + $.post({ + 'url': 'http://qa.turinglabs.net:8081/api/v1/question', + 'headers': { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(question), + }, (err, resp, data) => { + try { + data = JSON.parse(data) + if (data.status === 200) { + console.log(`提交成功`) + } else { + console.log(`提交失败`) + } + resolve() + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function answer(body = {}) { + return new Promise((resolve) => { + $.get(taskUrl('mcxhd_brandcity_answerQuestion', {"costTime": 1, ...body}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + // console.log(data) + if (data && data['retCode'] === "200") { + if (data.result.isCorrect) { + console.log(`您选对啦!获得积分${data.result.score},本次答题共计获得${data.result.totalScore}分`) + $.earn += parseInt(data.result.score) + $.question = { + ...$.question, + correct: $.option + } + } else { + let correct = $.question.options.filter(vo => vo.optionId === data.result.correctOptionId)[0] + console.log(`您选错啦~正确答案是:${correct.optionDesc}`) + $.question = { + ...$.question, + correct: correct + } + } + if (data.result.isLastQuestion) { + console.log(`答题完成`) + } + } else { + console.log(`答题失败`) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} + +function bing(str) { + return new Promise(resolve => { + $.get({ + url: `https://www.bing.com/search?q=${str}`, + headers: { + 'Connection': 'Keep-Alive', + 'Accept': 'text/html, application/xhtml+xml, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6', + 'Accept-Encoding': 'gzip, deflate', + 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4371.0 Safari/537.36' + } + }, (err, resp, data) => { + try { + let num = parseInt(data.match(/="sb_count">(.*) 条结果<\/span>/)[1].split(',').join('')) + console.log(`找到结果${num}个`) + resolve(num) + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) + +} + +function taskUrl(function_id, body = {}, function_id2) { + body = {"token": 'jd17919499fb7031e5', ...body} + return { + url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&appid=publicUseApi&t=${new Date().getTime()}&sid=&uuid=&area=&networkType=wifi`, + headers: { + "Cookie": cookie, + 'Accept': "application/json, text/plain, */*", + 'Accept-Language': 'zh-cn', + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/babelDiy/Zeus/4XjemYYyPScjmGyjej78M6nsjZvj/index.html", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") + } + } +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + body = {...body, "token": 'jd17919499fb7031e5'} + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&appid=publicUseApi`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") + } + } +} + +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + $.nickName = data['base'].nickname; + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +function requireTk() { + return new Promise(resolve => { + $.get({ + url: `http://qn6l5d6wm.hn-bkt.clouddn.com/question.json?t=${new Date().getTime()}`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4371.0 Safari/537.36' + } + }, (err, resp, data) => { + try { + $.tk = JSON.parse(data).RECORDS + } catch (e) { + console.log(e) + } finally { + resolve() + } + }) + }) +} + +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_jdfactory.js b/jd_jdfactory.js index c5fefd44..840f301f 100644 --- a/jd_jdfactory.js +++ b/jd_jdfactory.js @@ -6,6 +6,7 @@ */ /* 东东工厂,不是京喜工厂 +活动入口:京东APP首页-数码电器-东东工厂 免费产生的电量(10秒1个电量,500个电量满,5000秒到上限不生产,算起来是84分钟达到上限) 故建议1小时运行一次 开会员任务和去京东首页点击“数码电器任务目前未做 diff --git a/jd_joy.js b/jd_joy.js index 08eb0446..bb765222 100644 --- a/jd_joy.js +++ b/jd_joy.js @@ -2,7 +2,8 @@ jd宠汪汪 搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_joy.js 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js IOS用户支持京东双账号,NodeJs用户支持N个京东账号 -更新时间:2021-1-22 +更新时间:2021-1-26 +活动入口:京东APP我的-更多工具-宠汪汪 建议先凌晨0点运行jd_joy.js脚本获取狗粮后,再运行此脚本(jd_joy_steal.js)可偷好友积分,6点运行可偷好友狗粮 feedCount:自定义 每次喂养数量; 等级只和喂养次数有关,与数量无关 推荐每次投喂10个,积累狗粮,然后去玩聚宝盆赌 @@ -265,11 +266,11 @@ async function petTask() { } //每日喂狗粮 if (item['taskType'] === 'FeedEveryDay') { - if (item['taskStatus'] === 'processing') { + if (item['receiveStatus'] === 'chance_left') { console.log(`\n${item['taskName']}任务进行中\n`) } else if (item['receiveStatus'] === 'unreceive') { const res = await getFood('FeedEveryDay'); - console.log(`领取每日帮好友喂一次狗粮 狗粮结果:${res.data}`); + console.log(`领取每日喂狗粮 结果:${res.data}`); } } // diff --git a/jd_joy_feedPets.js b/jd_joy_feedPets.js index bd67c524..e088d1b5 100644 --- a/jd_joy_feedPets.js +++ b/jd_joy_feedPets.js @@ -1,6 +1,7 @@ /* 宠汪汪喂食(如果喂食80g失败,降级一个档次喂食(40g),依次类推),三餐,建议一小时运行一次 更新时间:2020-11-03 +活动入口:京东APP我的-更多工具-宠汪汪 支持京东多个账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ==============Quantumult X============== diff --git a/jd_joy_help.js b/jd_joy_help.js index fe6525f0..56e52f8e 100644 --- a/jd_joy_help.js +++ b/jd_joy_help.js @@ -2,6 +2,7 @@ 宠汪汪强制为别人助力(助力一个好友你自己可以获得30积分,一天上限是帮助3个好友,自己获得90积分,不管助力是否成功,对方都会成为你的好友) 更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_help.js 更新时间:2021-1-21 +活动入口:京东APP我的-更多工具-宠汪汪 目前提供了304位好友的friendPin供使用。脚本随机从里面获取一个,助力成功后,退出小程序重新点击进去开始助力新的好友 欢迎大家使用 https://jdjoy.jd.com/pet/getFriends?itemsPerPage=20¤tPage=1 (currentPage=1表示第一页好友,=2表示第二页好友) 提供各自账号列表的friendPin给我 diff --git a/jd_joy_reward.js b/jd_joy_reward.js index 1644159a..2473e4d6 100644 --- a/jd_joy_reward.js +++ b/jd_joy_reward.js @@ -1,6 +1,7 @@ /* 宠汪汪积分兑换奖品脚本, 目前脚本只兑换京豆,兑换京豆成功,才会发出通知提示,其他情况不通知。 更新时间:2021-1-20 +活动入口:京东APP我的-更多工具-宠汪汪 兑换规则:一个账号一天只能兑换一次京豆。 兑换奖品成功后才会有系统弹窗通知 每日京豆库存会在0:00、8:00、16:00更新,经测试发现中午12:00也会有补发京豆。 diff --git a/jd_joy_run.js b/jd_joy_run.js index 1cd14d38..8c41754f 100644 --- a/jd_joy_run.js +++ b/jd_joy_run.js @@ -1,7 +1,7 @@ /** 宠汪汪邀请助力与赛跑助力脚本,感谢github@Zero-S1提供帮助 更新时间:2021-1-7(宠汪汪助力更新Token的配置正则表达式已改) - +活动入口:京东APP我的-更多工具-宠汪汪 token时效很短,几个小时就失效了,闲麻烦的放弃就行 每天拿到token后,可一次性运行完毕即可。 互助码friendPin是京东用户名,不是昵称(可在京东APP->我的->设置 查看获得) diff --git a/jd_joy_steal.js b/jd_joy_steal.js index 82da18db..fe968190 100644 --- a/jd_joy_steal.js +++ b/jd_joy_steal.js @@ -5,6 +5,7 @@ * @Last Modified time: 2021-1-21 21:22:37 */ /* +活动入口:京东APP我的-更多工具-宠汪汪 最近经常出现给偷好友积分与狗粮失败的情况,故建议cron设置为多次 jd宠汪汪偷好友积分与狗粮,及给好友喂食 偷好友积分上限是20个好友(即获得100积分),帮好友喂食上限是20个好友(即获得200积分),偷好友狗粮上限也是20个好友(最多获得120g狗粮) diff --git a/jd_jxnc.js b/jd_jxnc.js index 8e343e85..431b2b73 100644 --- a/jd_jxnc.js +++ b/jd_jxnc.js @@ -5,6 +5,7 @@ 京喜农场:脚本更新地址 https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxnc.js 更新时间:2021-01-10 22:47:51 +活动入口:京喜APP我的-京喜农场 东东农场活动链接:https://wqsh.jd.com/sns/201912/12/jxnc/detail.html?ptag=7155.9.32&smp=b47f4790d7b2a024e75279f55f6249b9&active=jdnc_1_chelizi1205_2 已支持IOS双京东账号,Node.js支持N个京东账号 理论上脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js diff --git a/jd_live.js b/jd_live.js index a34e0d9b..0beab58f 100644 --- a/jd_live.js +++ b/jd_live.js @@ -1,7 +1,8 @@ /* 京东直播,每日18豆 活动结束时间未知 -活动地址:https://h5.m.jd.com/babelDiy/Zeus/2zwQnu4WHRNfqMSdv69UPgpZMnE2/index.html/ +活动入口:京东APP首页-京东直播 +地址:https://h5.m.jd.com/babelDiy/Zeus/2zwQnu4WHRNfqMSdv69UPgpZMnE2/index.html/ 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============Quantumultx=============== diff --git a/jd_lotteryMachine.js b/jd_lotteryMachine.js index 83f0c3db..7110b661 100644 --- a/jd_lotteryMachine.js +++ b/jd_lotteryMachine.js @@ -1,7 +1,7 @@ /* 京东抽奖机 - +活动入口:京东APP中各种抽奖活动的汇总 自用 author:yangtingxiao github: https://github.com/yangtingxiao diff --git a/jd_moneyTree.js b/jd_moneyTree.js index fe978e7b..874e62b6 100644 --- a/jd_moneyTree.js +++ b/jd_moneyTree.js @@ -1,6 +1,7 @@ /* 京东摇钱树 :https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js 更新时间:2020-11-16 +活动入口:京东APP我的-更多工具-摇钱树 京东摇钱树支持京东双账号 注:如果使用Node.js, 需自行安装'crypto-js,got,http-server,tough-cookie'模块. 例: npm install crypto-js http-server tough-cookie got --save ===============Quantumultx=============== diff --git a/jd_necklace.js b/jd_necklace.js index 31510529..64f4e054 100644 --- a/jd_necklace.js +++ b/jd_necklace.js @@ -6,8 +6,8 @@ */ /* 点点券,可以兑换无门槛红包(1元,5元,10元,100元,部分红包需抢购) -APP活动入口:“最新版本京东APP >领券中心/券后9.9>领点点券”页面 -网页入口:https://h5.m.jd.com/babelDiy/Zeus/41Lkp7DumXYCFmPYtU3LTcnTTXTX/index.html +活动入口:京东APP-领券中心/券后9.9-领点点券 +地址:https://h5.m.jd.com/babelDiy/Zeus/41Lkp7DumXYCFmPYtU3LTcnTTXTX/index.html 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ===============Quantumultx=============== diff --git a/jd_nian.js b/jd_nian.js index 98b85033..1d1756a0 100644 --- a/jd_nian.js +++ b/jd_nian.js @@ -2,24 +2,24 @@ 京东炸年兽🧨 活动时间:2021-1-18至2021-2-11 暂不加入品牌会员 -活动入口:https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html -活动地址:京东app左侧浮动窗口 +地址 https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html +活动入口:京东app首页浮动窗口 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============Quantumultx=============== [task_local] #京东炸年兽🧨 -0 9,12,20 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js, tag=京东炸年兽🧨, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/main/Icon/lxk0301/jd_nian.png, enabled=true +0 9,12,20,21 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js, tag=京东炸年兽🧨, img-url=https://raw.githubusercontent.com/yogayyy/Scripts/main/Icon/lxk0301/jd_nian.png, enabled=true ================Loon============== [Script] -cron "0 9,12,20 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js,tag=京东炸年兽🧨 +cron "0 9,12,20,21 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js,tag=京东炸年兽🧨 ===============Surge================= -京东炸年兽🧨 = type=cron,cronexp="0 9,12,20 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js +京东炸年兽🧨 = type=cron,cronexp="0 9,12,20,21 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js ============小火箭========= -京东炸年兽🧨 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js, cronexpr="0 9,12,20 * * *", timeout=3600, enable=true +京东炸年兽🧨 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js, cronexpr="0 9,12,20,21 * * *", timeout=3600, enable=true */ const $ = new Env('京东炸年兽🧨'); @@ -50,8 +50,8 @@ const inviteCodes = [ `cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZdTXtIumO4w2cDgSqvYcqHwjaAzLxu0S371Dh_fctFJtN0tXYzdR7JaY` ]; const pkInviteCodes = [ - 'IgNWdiLGaPadvlqJQnnKp27-YpAvKvSYNTSkTGvZylf_0wcvqD9EMkohEdw@IgNWdiLGaPaZskfACQyhgLSpZWps-WtQEW3McifW@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hJTS2SQzU0vulL0fHeULJaIfgqHFd7f_Kg', - 'IgNWdiLGaPadvlqJQnnKp27-YpAvKvSYNTSkTGvZylf_0wcvqD9EMkohEdw@IgNWdiLGaPaAvmHPAQf769XqjJjMyRirPzN9-AS-WHY9Y_G7t9Cwe5gdiI2qEvHa@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hLRjZBAJLHzBpcl18AeskNYctp-8Q@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hLRjZBCduDyApZxg5BPuhRfnJvQvQ' + 'IgNWdiLGaPadvlqJQnnKp27-YpAvKvSYNTSkTGvZylf_0wcvqD9EMkohEd0@IgNWdiLGaPaZskfACQyhgLSpZWps-WtQEW3McifX@IgNWdiLGaPaAvmHPAQf769XqjJjMyRirPzN9-AS-WHY9Y_G7t9Cwe5gdiI2qEvHb@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hJTS2SQzU0vulL0fHeULJaIfgqHFd7f_Kk@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hLRjZBAJLHzBpcl18AeskNYctp-8A', + 'IgNWdiLGaPadvlqJQnnKp27-YpAvKvSYNTSkTGvZylf_0wcvqD9EMkohEd0@IgNWdiLGaPaZskfACQyhgLSpZWps-WtQEW3McifX@IgNWdiLGaPaAvmHPAQf769XqjJjMyRirPzN9-AS-WHY9Y_G7t9Cwe5gdiI2qEvHb@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hJTS2SQzU0vulL0fHeULJaIfgqHFd7f_Kk@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hLRjZBAJLHzBpcl18AeskNYctp-8A' ] !(async () => { await requireConfig(); @@ -107,6 +107,7 @@ async function jdNian() { $.hasGroup = false await pkTaskStealDetail() if ($.hasGroup) await pkInfo() + await helpFriendsPK() } await $.wait(2000) await killCouponList() @@ -118,7 +119,7 @@ async function jdNian() { await $.wait(1000) await doTask() await $.wait(2000) - await helpFriends() + // await helpFriends() await $.wait(2000) await getHomeData(true) await showMsg() @@ -1079,7 +1080,7 @@ function readShareCodePk() { console.log(`开始`) return new Promise(async resolve => { $.get({ - url: `http://jd.turinglabs.net/api/v2/jd/nian_pk/read/${randomCount}/`, + url: `http://jd.turinglabs.net/api/v2/jd/nian/read/${randomCount}/`, 'timeout': 10000 }, (err, resp, data) => { try { @@ -1135,7 +1136,9 @@ function shareCodesFormatPk() { const tempIndex = $.index > pkInviteCodes.length ? (pkInviteCodes.length - 1) : ($.index - 1); $.newShareCodesPk = pkInviteCodes[tempIndex].split('@'); } - const readShareCodeRes = null //await readShareCodePk(); + let readShareCodeRes = null + if (new Date().getUTCHours() >= 12) + readShareCodeRes = await readShareCodePk(); if (readShareCodeRes && readShareCodeRes.code === 200) { $.newShareCodesPk = [...new Set([...$.newShareCodesPk, ...(readShareCodeRes.data || [])])]; } diff --git a/jd_nianCollect.js b/jd_nianCollect.js index 45f301f3..8fe6d799 100644 --- a/jd_nianCollect.js +++ b/jd_nianCollect.js @@ -1,6 +1,8 @@ /* #炸年兽专门收集爆竹 京东炸年兽领爆竹🧨 +活动入口:京东app首页浮动窗口 +地址:https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html 仅仅是收集一下京东炸年兽领爆竹活动每秒产生的爆竹🧨 每小时的第20分运行一次 ============Quantumultx=============== diff --git a/jd_nian_ar.js b/jd_nian_ar.js index 824f612f..3015da00 100644 --- a/jd_nian_ar.js +++ b/jd_nian_ar.js @@ -1,8 +1,8 @@ /* 京东炸年兽AR 活动时间:2021-1-18至2021-2-11 -活动入口:https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html -活动地址:京东app左侧浮动窗口 +地址:https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html +活动入口:京东app首页浮动窗口 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============Quantumultx=============== diff --git a/jd_nian_sign.js b/jd_nian_sign.js index 37633930..4e702fec 100644 --- a/jd_nian_sign.js +++ b/jd_nian_sign.js @@ -2,8 +2,8 @@ 京东炸年兽签到任务🧨 活动时间:2021-1-18至2021-2-11 暂不加入品牌会员 -活动入口:https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html -活动地址:京东app左侧浮动窗口 +地址:https://wbbny.m.jd.com/babelDiy/Zeus/2cKMj86srRdhgWcKonfExzK4ZMBy/index.html +活动入口:京东app左侧浮动窗口 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js ============Quantumultx=============== diff --git a/jd_pet.js b/jd_pet.js index 73b7914e..e861f572 100644 --- a/jd_pet.js +++ b/jd_pet.js @@ -1,6 +1,7 @@ /* 东东萌宠 更新地址: https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js 更新时间:2021-01-19 +活动入口:京东APP我的-更多工具-东东萌宠 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js diff --git a/jd_petTreasureBox.js b/jd_petTreasureBox.js index 026bd94f..27fe31ec 100644 --- a/jd_petTreasureBox.js +++ b/jd_petTreasureBox.js @@ -1,5 +1,6 @@ /* 更新时间:2020-11-12 +活动入口:京东APP我的-更多工具-宠汪汪 从github@Zero-S1搬的[https://github.com/Zero-S1/JD_tools/blob/master/jbp.js] 【宠汪汪聚宝盆辅助脚本】 1、进入聚宝盆,显示本轮狗粮池投入总数,方便估算 diff --git a/jd_pigPet.js b/jd_pigPet.js index 7c7ab558..af0a5e8e 100644 --- a/jd_pigPet.js +++ b/jd_pigPet.js @@ -5,7 +5,7 @@ * @Last Modified time: 2020-11-23 12:27:16 */ /* -京东金融养猪猪 +活动入口:京东金融养猪猪 一键开完所有的宝箱功能。耗时70秒 大转盘抽奖 喂食 diff --git a/jd_plantBean.js b/jd_plantBean.js index 1d128de1..0710c959 100644 --- a/jd_plantBean.js +++ b/jd_plantBean.js @@ -1,6 +1,7 @@ /* 种豆得豆 脚本更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js 更新时间:2021-1-16 +活动入口:京东APP我的-更多工具-种豆得豆 已支持IOS京东双账号,云端N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js 注:会自动关注任务中的店铺跟商品,介意者勿使用。 diff --git a/jd_rankingList.js b/jd_rankingList.js index 235fa991..f10e5173 100644 --- a/jd_rankingList.js +++ b/jd_rankingList.js @@ -1,6 +1,6 @@ /* -京东排行榜 +活动入口:京东APP首页-更多频道-排行榜-悬浮按钮 自用 author:yangtingxiao diff --git a/jd_redPacket.js b/jd_redPacket.js index 0b67b540..e0955a91 100644 --- a/jd_redPacket.js +++ b/jd_redPacket.js @@ -5,7 +5,8 @@ * @Last Modified time: 2020-12-20 12:27:18 */ /* -京东全民开红包(京东app->首页->领券->锦鲤红包) +京东全民开红包 +活动入口:京东APP-首页-领券-锦鲤红包 已完成功能: ①浏览活动 ②关注频道 diff --git a/jd_sgmh.js b/jd_sgmh.js index 9f8aa1dd..639e77a6 100644 --- a/jd_sgmh.js +++ b/jd_sgmh.js @@ -2,7 +2,7 @@ 闪购盲盒 长期活动,一人每天5次助力机会,10次被助机会,被助力一次获得一次抽奖机会,前几次必中京豆 修改自 @yangtingxiao 抽奖机脚本 -入口:首页-闪购-闪购盲盒 +活动入口:首页-闪购-闪购盲盒 网页地址:https://h5.m.jd.com/babelDiy/Zeus/3vzA7uGuWL2QeJ5UeecbbAVKXftQ/index.html 更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_sgmh.js 已支持IOS双京东账号, Node.js支持N个京东账号 diff --git a/jd_shop.js b/jd_shop.js index d77cf14e..b84d5924 100644 --- a/jd_shop.js +++ b/jd_shop.js @@ -1,5 +1,6 @@ /* -进店领豆(京东APP首页-领京豆-进店领豆),每天可拿四京豆 +进店领豆,每天可拿四京豆 +活动入口:京东APP首页-领京豆-进店领豆 更新时间:2020-11-03 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js diff --git a/jd_small_home.js b/jd_small_home.js index e50a3ef6..4ba32f01 100644 --- a/jd_small_home.js +++ b/jd_small_home.js @@ -12,9 +12,8 @@ 注:目前使用此脚本会给脚本内置的两个码进行助力,请知晓 -APP活动入口: -京东APP首页 ->搜索 玩一玩 -> DIY理想家 -或 京东APP -> 我的-> 游戏与更多 - > 东东小窝 +活动入口:京东APP我的-游戏与更多-东东小窝 +或 京东APP首页-搜索 玩一玩-DIY理想家 微信小程序入口: 来客有礼 - > 首页 -> 东东小窝 网页入口(注:进入后不能再此刷新,否则会有问题,需重新输入此链接进入) diff --git a/jd_speed.js b/jd_speed.js index 50031563..2aeb71e6 100644 --- a/jd_speed.js +++ b/jd_speed.js @@ -1,6 +1,7 @@ /* 京东天天加速链接:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js 更新时间:2020-12-25 +活动入口:京东APP我的-更多工具-天天加速 支持京东双账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js 每天4京豆,再小的苍蝇也是肉 diff --git a/jd_syj.js b/jd_syj.js index 86ab7e00..68a65524 100644 --- a/jd_syj.js +++ b/jd_syj.js @@ -5,27 +5,28 @@ * @Last Modified time: 2021-1-1 16:58:02 */ /* -十元街脚本,一周签到下来可获得30京豆,一天任意时刻运行一次即可 +赚京豆脚本,一周签到下来可获得30京豆,一天任意时刻运行一次即可 +活动入口:赚京豆(微信小程序)-赚京豆-签到领京豆 更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js 参考github@jidesheng6修改而来 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] -#十元街 -10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, tag=十元街, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_syj.png, enabled=true +#赚京豆 +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, tag=赚京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_syj.png, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, tag=十元街 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, tag=赚京豆 ===============Surge================= -十元街 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js +赚京豆 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js ============小火箭========= -十元街 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, cronexpr="10 7 * * *", timeout=3600, enable=true +赚京豆 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, cronexpr="10 7 * * *", timeout=3600, enable=true */ -const $ = new Env('十元街'); +const $ = new Env('赚京豆'); const notify = $.isNode() ? require('./sendNotify') : ''; //Node.js用户请在jdCookie.js处填写京东ck; diff --git a/tencentscf.js b/tencentscf.js index ba6a9bab..94680cba 100644 --- a/tencentscf.js +++ b/tencentscf.js @@ -1,8 +1,7 @@ // Depends on tencentcloud-sdk-nodejs version 4.0.3 or higher const tencentcloud = require("tencentcloud-sdk-nodejs"); const fs = require('fs') -const file_buffer = fs.readFileSync('./myfile.zip'); -const contents_in_base64 = file_buffer.toString('base64'); +const yaml = require('js-yaml'); const ScfClient = tencentcloud.scf.v20180416.Client; @@ -18,57 +17,77 @@ const clientConfig = { }, }, }; +const sleep = ms => new Promise(res => setTimeout(res, ms)); +!(async () => { + const client = new ScfClient(clientConfig); -const client = new ScfClient(clientConfig); -let params = { - "Handler": "index.main_handler", - "FunctionName": process.env.TENCENT_FUNCTION_NAME, // 云函数程序名,例如 jd_scripts - "ZipFile": contents_in_base64 -}; -client.UpdateFunctionCode(params).then( - (data) => { - console.log(data); - }, - (err) => { - console.error("error", err); - } -); + let params + await client.ListFunctions({}).then( + async (data) => { + let func = data.Functions.filter(vo=>vo.FunctionName===process.env.TENCENT_FUNCTION_NAME) + const file_buffer = fs.readFileSync('./myfile.zip'); + const contents_in_base64 = file_buffer.toString('base64'); + if(func.length){ + console.log(`函数已存在,去更新函数`) + // 更新代码 + params = { + "Handler": "index.main_handler", + "FunctionName": process.env.TENCENT_FUNCTION_NAME, + "ZipFile": contents_in_base64 + }; + await client.UpdateFunctionCode(params).then( + (data) => { + console.log(data); + }, + (err) => { + console.error("error", err); + } + ); + } else{ + console.log(`函数不存在,去创建函数`) + params = { + "Code": { + "ZipFile": contents_in_base64 + }, + "FunctionName": process.env.TENCENT_FUNCTION_NAME, + "Runtime": "Nodejs12.16" + }; + await client.CreateFunction(params).then( + (data) => { + console.log(data); + }, + (err) => { + console.error("error", err); + } + ); + await sleep(1000*100) // 等待100秒 + } + }, + (err) => { + console.error("error", err); + } + ); -// 更新环境变量 -let vars = [] -for(let key in process.env){ - vars.push({ - "Key": key, - "Value": process.env[key] - }) -} - -params = { - "Environment": { - "Variables": vars + console.log(`更新环境变量`) + // 更新环境变量 + let inputYML = '.github/workflows/deploy_tencent_scf.yml'; + let obj = yaml.load(fs.readFileSync(inputYML, {encoding: 'utf-8'})) + let vars = [] + for(let key in obj.jobs.build.steps[3].env){ + if(key!=='PATH' && process.env.hasOwnProperty(key)) + vars.push({ + "Key": key, + "Value": process.env[key] + }) } -}; -client.UpdateFunctionConfiguration(params).then( - (data) => { - console.log(data); - }, - (err) => { - console.error("error", err); - } -); - -// 更新触发器 -const inputYML = 'serverless.yml'; -const yaml = require('js-yaml'); -const obj = yaml.load(fs.readFileSync(inputYML, {encoding: 'utf-8'})) -for(let vo of obj.inputs.events){ - let param = { - 'Type' : "timer", - 'TriggerDesc' : vo.timer.parameters.cronExpression, - 'CustomArgument' : vo.timer.parameters.argument, - 'Enable' : "true" - } - client.CreateTrigger(param).then( + console.log(`您一共填写了${vars.length}个环境变量`) + params = { + "FunctionName": process.env.TENCENT_FUNCTION_NAME, + "Environment": { + "Variables": vars + } + }; + await client.UpdateFunctionConfiguration(params).then( (data) => { console.log(data); }, @@ -76,4 +95,58 @@ for(let vo of obj.inputs.events){ console.error("error", err); } ); -} + let triggers = [] + params = { + "FunctionName": process.env.TENCENT_FUNCTION_NAME, + } + await client.ListTriggers(params).then( + (data) => { + console.log(data); + triggers = data.Triggers + }, + (err) => { + console.error("error", err); + } + ); + for(let vo of triggers){ + params = { + "FunctionName": process.env.TENCENT_FUNCTION_NAME, + "Type": "timer", + "TriggerName": vo.TriggerName + } + await client.DeleteTrigger(params).then( + (data) => { + console.log(data); + }, + (err) => { + console.error("error", err); + } + ); + } + // 更新触发器 + console.log(`去更新触发器`) + inputYML = 'serverless.yml'; + obj = yaml.load(fs.readFileSync(inputYML, {encoding: 'utf-8'})) + for(let vo of obj.inputs.events){ + let param = { + "FunctionName": process.env.TENCENT_FUNCTION_NAME, + "TriggerName": vo.timer.parameters.name, + 'Type' : "timer", + 'TriggerDesc' : vo.timer.parameters.cronExpression, + 'CustomArgument' : vo.timer.parameters.argument, + 'Enable' : "OPEN", + } + await client.CreateTrigger(param).then( + (data) => { + console.log(data); + }, + (err) => { + console.error("error", err); + } + ); + } + +})() + .catch((e) => console.log(e)) + .finally(async () => { + }) diff --git a/update_list.sh b/update_list.sh index d56877cd..4f32b5b4 100644 --- a/update_list.sh +++ b/update_list.sh @@ -10,7 +10,7 @@ JsList=($(cd $WorkDir; ls *.js | grep -E "j[drx]_")) FileReadme=$WorkDir/README.md UrlBlob=https://github.com/LXK9301/jd_scripts/blob/master/ UrlRaw=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/ -SheetHead="| 序号 | 名称 | blob文件链接 | raw文件链接 |\n| ---- | ------- | ------------ | ----------- |" +SheetHead="| 文件 | 名称 | 活动入口 |\n| - | - | - |" ## 删除标记行的内容 StartLine=$(($(grep -n "标记开始" "$FileReadme" | awk -F ":" '{print $1}') + 1)) @@ -23,8 +23,8 @@ cd $WorkDir Sheet=$SheetHead for ((i=0; i<${#JsList[*]}; i++)); do Name=$(grep "new Env" ${JsList[i]} | awk -F "'|\"" '{print $2}') - Blob="$UrlBlob${JsList[i]}" + Entry=$(grep -E "活动入口|活动地址" ${JsList[i]} | awk -F ":" '{print $2}') Raw="$UrlRaw${JsList[i]}" - Sheet="$Sheet\n| $(($i + 1)) | $Name | [${JsList[i]}]($Blob) | [${JsList[i]}]($Raw) |" + Sheet="$Sheet\n|[${JsList[i]}]($Raw)|$Name|$Entry|" done echo -e "$Sheet\n$Tail" >> $FileReadme \ No newline at end of file