diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf index 173897f6..1c9762ab 100644 --- a/Loon/lxk0301_LoonTask.conf +++ b/Loon/lxk0301_LoonTask.conf @@ -145,9 +145,6 @@ cron "50 8 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd # 东东萌宠 cron "15 6-18/6 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pet.js,tag=东东萌宠 -# 聚宝盆投狗粮辅助 -http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_petTreasureBox.js, requires-body=true, timeout=3600, tag=聚宝盆投狗粮辅助 - # 金融养猪 cron "12 * * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pigPet.js, tag=京东金融养猪猪 diff --git a/QuantumultX/lxk0301_cookies.conf b/QuantumultX/lxk0301_cookies.conf index 2e648010..517e14b9 100644 --- a/QuantumultX/lxk0301_cookies.conf +++ b/QuantumultX/lxk0301_cookies.conf @@ -12,8 +12,5 @@ https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion url script-request-hea # 宠汪汪赛跑 ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= url script-request-header https://gitee.com/lxk0301/jd_scripts/raw/master/jd_joy_run.js -# 聚宝盆投狗粮辅助 -^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox url script-response-body https://gitee.com/lxk0301/jd_scripts/raw/master/jd_petTreasureBox.js - # 小米运动 ^https:\/\/account\.huami\.com\/v2\/client\/login url script-response-body https://gitee.com/lxk0301/jd_scripts/raw/master/backUp/xmSports.js diff --git a/README.md b/README.md index 6aae3601..6fd677d3 100644 --- a/README.md +++ b/README.md @@ -77,23 +77,22 @@ |45|[jd_nian_sign.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_nian_sign.js)|京东炸年兽签到任务🧨|京东app左侧浮动窗口| |46|[jd_nian_wechat.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_nian_wechat.js)|京东炸年兽小程序🧨|京东小程序-炸年兽| |47|[jd_pet.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pet.js)|东东萌宠|京东APP我的-更多工具-东东萌宠| -|48|[jd_petTreasureBox.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_petTreasureBox.js)|聚宝盆投狗粮辅助|京东APP我的-更多工具-宠汪汪| -|49|[jd_pigPet.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pigPet.js)|金融养猪|京东金融养猪猪| -|50|[jd_plantBean.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js)|京东种豆得豆|京东APP我的-更多工具-种豆得豆| -|51|[jd_rankingList.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_rankingList.js)|京东排行榜|京东APP首页-更多频道-排行榜-悬浮按钮| -|52|[jd_redPacket.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_redPacket.js)|京东全民开红包|京东APP首页-领券-锦鲤红包| -|53|[jd_sgmh.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_sgmh.js)|闪购盲盒|京东APP首页-闪购-闪购盲盒| -|54|[jd_shop.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_shop.js)|进店领豆|京东APP首页-领京豆-进店领豆| -|55|[jd_small_home.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_small_home.js)|东东小窝|京东APP我的-游戏与更多-东东小窝| -|56|[jd_speed.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_speed.js)|✈️天天加速|京东APP我的-更多工具-天天加速| -|57|[jd_super_box.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js)|京东超级盒子|[活动地址](https://prodev.m.jd.com/mall/active/21uMxFV5yiP4ivdSbmHqv5f2aXFK/index.html?tttparams=TiOY=woeyJnTG5nIjoiMTIwLjg3NTY0MSIsImdMYXQiOiIzMS4yODMxMzYifQ7==)| -|58|[jd_superMarket.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js)|东东超市|京东APP首页-京东超市-底部东东超市| -|59|[jd_syj.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js)|赚京豆|赚京豆(微信小程序)-赚京豆-签到领京豆| -|60|[jd_unbind.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unbind.js)|注销京东会员卡|| -|61|[jd_unsubscribe.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unsubscribe.js)|取关京东店铺和商品|| -|62|[jd_xg.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_xg.js)|小鸽有礼|[活动地址](https://snsdesign.jd.com/babelDiy/Zeus/4N5phvUAqZsGWBNGVJWmufXoBzpt/index.html?channel=lingsns003&scope=0&sceneid=9001&btnTips=&hideApp=0)| -|63|[jd_xgyl.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_xgyl.js)|小鸽有礼2|[活动地址](https://jingcai-h5.jd.com/#/dialTemplate?activityCode=1354740864131276800)| -|64|[jx_sign.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jx_sign.js)|京喜签到|| +|48|[jd_pigPet.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pigPet.js)|金融养猪|京东金融养猪猪| +|49|[jd_plantBean.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js)|京东种豆得豆|京东APP我的-更多工具-种豆得豆| +|50|[jd_rankingList.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_rankingList.js)|京东排行榜|京东APP首页-更多频道-排行榜-悬浮按钮| +|51|[jd_redPacket.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_redPacket.js)|京东全民开红包|京东APP首页-领券-锦鲤红包| +|52|[jd_sgmh.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_sgmh.js)|闪购盲盒|京东APP首页-闪购-闪购盲盒| +|53|[jd_shop.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_shop.js)|进店领豆|京东APP首页-领京豆-进店领豆| +|54|[jd_small_home.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_small_home.js)|东东小窝|京东APP我的-游戏与更多-东东小窝| +|55|[jd_speed.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_speed.js)|✈️天天加速|京东APP我的-更多工具-天天加速| +|56|[jd_super_box.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js)|京东超级盒子|[活动地址](https://prodev.m.jd.com/mall/active/21uMxFV5yiP4ivdSbmHqv5f2aXFK/index.html?tttparams=TiOY=woeyJnTG5nIjoiMTIwLjg3NTY0MSIsImdMYXQiOiIzMS4yODMxMzYifQ7==)| +|57|[jd_superMarket.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js)|东东超市|京东APP首页-京东超市-底部东东超市| +|58|[jd_syj.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js)|赚京豆|赚京豆(微信小程序)-赚京豆-签到领京豆| +|59|[jd_unbind.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unbind.js)|注销京东会员卡|| +|60|[jd_unsubscribe.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unsubscribe.js)|取关京东店铺和商品|| +|61|[jd_xg.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_xg.js)|小鸽有礼|[活动地址](https://snsdesign.jd.com/babelDiy/Zeus/4N5phvUAqZsGWBNGVJWmufXoBzpt/index.html?channel=lingsns003&scope=0&sceneid=9001&btnTips=&hideApp=0)| +|62|[jd_xgyl.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_xgyl.js)|小鸽有礼2|[活动地址](https://jingcai-h5.jd.com/#/dialTemplate?activityCode=1354740864131276800)| +|63|[jx_sign.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jx_sign.js)|京喜签到|| diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule index 76ec1e6f..071797ce 100644 --- a/Surge/lxk0301_Task.sgmodule.sgmodule +++ b/Surge/lxk0301_Task.sgmodule.sgmodule @@ -54,7 +54,6 @@ crazyJoy任务 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,scrip 京东炸年兽签到任务🧨 = type=cron,cronexp="30 8 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_nian_sign.js 京东炸年兽小程序🧨 = type=cron,cronexp="50 8 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_nian_wechat.js 东东萌宠 = type=cron,cronexp="15 6-18/6 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pet.js -聚宝盆投狗粮辅助 = type=http-response,pattern=^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox,requires-body=1,max-size=0,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_petTreasureBox.js 京东金融养猪猪 = type=cron,cronexp="12 * * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pigPet.js 京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js 京东全民开红包 = type=cron,cronexp=1 1 * * *,wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_redPacket.js diff --git a/jd_petTreasureBox.js b/activity/jd_petTreasureBox.js similarity index 100% rename from jd_petTreasureBox.js rename to activity/jd_petTreasureBox.js diff --git a/docker/default_task.sh b/docker/default_task.sh index ee813713..21166632 100644 --- a/docker/default_task.sh +++ b/docker/default_task.sh @@ -98,7 +98,7 @@ echo "删除原有docker_entrypoint.sh任务" sed -ie '/'docker_entrypoint.sh'/d' ${mergedListFile} -current_min=$(date +%M) +current_min=$(date +%-M) echo "当前分钟:${current_min}" #当前分钟大于1,则随机一个小于当前分钟的,否则为59 diff --git a/jd_5g.js b/jd_5g.js index bb7f96d0..669b3aa0 100644 --- a/jd_5g.js +++ b/jd_5g.js @@ -746,7 +746,7 @@ function jsonParse(str) { } } } -function updateShareCodes(url = 'https://gitee.com/lxk0301/updateTeam/raw/master/jd_818.json') { +function updateShareCodes(url = 'https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_818.json') { return new Promise(resolve => { $.get({url, headers:{"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")} diff --git a/jd_818.js b/jd_818.js index 8cc3ba59..86668068 100644 --- a/jd_818.js +++ b/jd_818.js @@ -65,6 +65,7 @@ let helpCode = [] return; } $.temp = []; + await updateShareCodesCDN(); for (let i = 0; i < cookiesArr.length; i++) { if (cookiesArr[i]) { cookie = cookiesArr[i]; @@ -589,7 +590,6 @@ async function doHelp() { } // await updateShareCodes(); // if (!$.updatePkActivityIdRes) await updateShareCodesCDN(); - await updateShareCodesCDN(); if ($.updatePkActivityIdRes && $.updatePkActivityIdRes['shareCodes']) tempCode = $.updatePkActivityIdRes['shareCodes']; console.log(`是否大于当天九点🕘:${nowTime > new Date(nowTime).setHours(9, 0, 0, 0)}`) //当天大于9:00才从API里面取收集的助力码 @@ -858,10 +858,10 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/LXK9301/updat }) }) } -function updateShareCodesCDN(url = 'https://gitee.com/lxk0301/updateTeam/raw/master/jd_shareCodes.json') { +function updateShareCodesCDN(url = 'https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_shareCodes.json') { return new Promise(resolve => { //https://cdn.jsdelivr.net/gh/LXK9301/updateTeam@master/jd_shareCodes.json - $.get({url}, async (err, resp, data) => { + $.get({url , headers:{"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")}}, async (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) diff --git a/jd_bean_home.js b/jd_bean_home.js index 11401989..65ba1faf 100644 --- a/jd_bean_home.js +++ b/jd_bean_home.js @@ -188,7 +188,7 @@ function getAuthorShareCode() { } function getAuthorShareCode2() { return new Promise(resolve => { - $.get({url: "https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateBeanHome.json",headers:{ + $.get({url: "https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_updateBeanHome.json",headers:{ "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88" }}, async (err, resp, data) => { try { diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js index 77a12eac..11ea4bce 100644 --- a/jd_dreamFactory.js +++ b/jd_dreamFactory.js @@ -1373,7 +1373,7 @@ function shareCodesFormat() { } function requireConfig() { return new Promise(async resolve => { - await updateTuanIdsCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateFactoryTuanId.json'); + await updateTuanIdsCDN('https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_updateFactoryTuanId.json'); if ($.tuanIdS && $.tuanIdS.tuanActiveId) { tuanActiveId = $.tuanIdS.tuanActiveId; } diff --git a/jd_jdzz.js b/jd_jdzz.js index 22a922e2..4701029c 100644 --- a/jd_jdzz.js +++ b/jd_jdzz.js @@ -53,7 +53,7 @@ const inviteCodes = [ $.tuanList = [] await requireConfig(); if (helpAuthor) await getAuthorShareCode('https://gitee.com/shylocks/updateTeam/raw/main/jd_zz.json'); - if (helpAuthor) await getAuthorShareCode('https://gitee.com/lxk0301/updateTeam/raw/master/jd_zz.json'); + if (helpAuthor) await getAuthorShareCode('https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_zz.json'); 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; diff --git a/jd_moneyTree.js b/jd_moneyTree.js index 9f35847c..f434c6e1 100644 --- a/jd_moneyTree.js +++ b/jd_moneyTree.js @@ -336,23 +336,28 @@ function signIndex() { } function signEveryDay() { return new Promise(async (resolve) => { - let signIndexRes = await signIndex(); - if (signIndexRes.resultCode === 0) { - console.log(`每日签到条件查询:${signIndexRes.resultData.data.canSign === 2 ? '可以签到' : '已经签到过了'}`); - if (signIndexRes.resultData && signIndexRes.resultData.data.canSign == 2) { - console.log('准备每日签到') - let signOneRes = await signOne(signIndexRes.resultData.data.signDay); - console.log(`第${signIndexRes.resultData.data.signDay}日签到结果:${JSON.stringify(signOneRes)}`); - if (signIndexRes.resultData.data.signDay === 7) { - let getSignAwardRes = await getSignAward(); - console.log(`店铺券(49-10)领取结果:${JSON.stringify(getSignAwardRes)}`) - if (getSignAwardRes.resultCode === 0 && getSignAwardRes.data.code === 0) { - message += `【7日签到奖励领取】${getSignAwardRes.datamessage}\n` + try { + let signIndexRes = await signIndex(); + if (signIndexRes.resultCode === 0) { + console.log(`每日签到条件查询:${signIndexRes.resultData.data.canSign === 2 ? '可以签到' : '已经签到过了'}`); + if (signIndexRes.resultData && signIndexRes.resultData.data.canSign == 2) { + console.log('准备每日签到') + let signOneRes = await signOne(signIndexRes.resultData.data.signDay); + console.log(`第${signIndexRes.resultData.data.signDay}日签到结果:${JSON.stringify(signOneRes)}`); + if (signIndexRes.resultData.data.signDay === 7) { + let getSignAwardRes = await getSignAward(); + console.log(`店铺券(49-10)领取结果:${JSON.stringify(getSignAwardRes)}`) + if (getSignAwardRes.resultCode === 0 && getSignAwardRes.data.code === 0) { + message += `【7日签到奖励领取】${getSignAwardRes.datamessage}\n` + } } } } + } catch (e) { + $.logErr(e); + } finally { + resolve() } - resolve() }) } function signOne(signDay) { diff --git a/jd_newYearMoney.js b/jd_newYearMoney.js index 3ecd3f9c..16210dda 100644 --- a/jd_newYearMoney.js +++ b/jd_newYearMoney.js @@ -49,8 +49,8 @@ if ($.isNode()) { } const JD_API_HOST = 'https://api.m.jd.com/client.action'; const inviteCodes = [ - `oMZeX-5M9YkGAOtiP7Rz_yglorV31MmxRvuK5Itar4d2t7V2@oMZeXbBAqIJUAbA3ZrZ2rsve9AyA3Kq-6R23UrqYSIOwFRDm@sM1uBLkXpYMbT64xe_w8_kRvuJH61i9EFx9HXw@oMZeXu5Nod1UAbY1ZrB4_Hors4ZLQ_-Owd64xO5a5HY66IcF`, - `oMZeX-5M9YkGAOtiP7Rz_yglorV31MmxRvuK5Itar4d2t7V2@oMZeXbBAqIJUAbA3ZrZ2rsve9AyA3Kq-6R23UrqYSIOwFRDm@sM1uBLkXpYMbT64xe_w8_kRvuJH61i9EFx9HXw@oMZeXu5Nod1UAbY1ZrB4_Hors4ZLQ_-Owd64xO5a5HY66IcF`, + `oMZeX-5M9YkGAOtiP7Rz_yglorV31MmxRvuK5Itar4d2t7V2@oMZeXbBAqIJUAbA3ZrZ2rsve9AyA3Kq-6R23UrqYSIOwFRDm@vcZZM4U-2s49fLxMRfA8s9Ob_ZkZ7O0QtnrKtPOtbZhSjA@oMZeXOZOoY9eUOFiZrFxrKwAOXx25LYPCj8I_sDK6tbv4jls@oMZeXe9Kod0DCrE5M7Z1qcr4t7hsbJF9IrJMdgiso95xHVqC`, + `oMZeX-5M9YkGAOtiP7Rz_yglorV31MmxRvuK5Itar4d2t7V2@oMZeXbBAqIJUAbA3ZrZ2rsve9AyA3Kq-6R23UrqYSIOwFRDm@vcZZM4U-2s49fLxMRfA8s9Ob_ZkZ7O0QtnrKtPOtbZhSjA@oMZeXOZOoY9eUOFiZrFxrKwAOXx25LYPCj8I_sDK6tbv4jls@oMZeXe9Kod0DCrE5M7Z1qcr4t7hsbJF9IrJMdgiso95xHVqC`, ]; !(async () => { await requireConfig(); @@ -152,7 +152,7 @@ async function helpFriends() { if (!code) continue await helpFriend(code) if (!$.canHelp) return - await $.wait(3000) + await $.wait(4000) } } diff --git a/jd_nian.js b/jd_nian.js index 4b570825..974411ab 100644 --- a/jd_nian.js +++ b/jd_nian.js @@ -46,8 +46,8 @@ if ($.isNode()) { } const JD_API_HOST = 'https://api.m.jd.com/client.action'; const inviteCodes = [ - `cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZ9_MZ8gByP7FZ368dN8oTZBwGieaH5HvtnvXuK1Epn_KK8yol8OYGw7h3M2j_PxSZvYA`, - `cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZdTXtIumO4w2cDgSqvYcqHwjaAzLxu0S371Dh_fctFJtN0tXYzdR7JaY` + `cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZdTXtIL-L7FzMAQCqvap-CydslPKkAn5-YquhVOdq2fHQPxbVJ4pskHs`, + `cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZdTXtIL-L7FzMAQCqvap-CydslPKkAn5-YquhVOdq2fHQPxbVJ4pskHs` ]; const pkInviteCodes = [ 'IgNWdiLGaPadvlqJQnnKp27-YpAvKvSYNTSkTGvZylf_0wcvqD9EMkohENk@IgNWdiLGaPaZskfACQyhgLSpZWps-WtQEW3McibT@IgNWdiLGaPaAvmHPAQf769XqjJjMyRirPzN9-AS-WHY9Y_G7t9Cwe5gdiI2qEvDf@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hJTS2SQzU0vulL0fHeULJaIfgqHFd7f_a0 @IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hLRjZBAJLHzBpcl18AeskNYctp_9A', @@ -344,7 +344,7 @@ function getHomeData(info = false) { $.secretp = null return } - console.log(`当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore - $.userInfo.raiseInfo.curLevelStartScore}🧨`) + console.log(`\n\n当前等级:${$.userInfo.raiseInfo.curMaxLevel}\n当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore - $.userInfo.raiseInfo.curLevelStartScore}🧨\n\n`) if (info) { message += `当前爆竹${$.userInfo.raiseInfo.remainScore}🧨\n` @@ -619,7 +619,7 @@ function getTaskList(body = {}) { if (data.data.bizCode === 0) { if (JSON.stringify(body) === "{}") { $.taskVos = data.data.result.taskVos;//任务列表 - console.log(`您的好友助力码为${data.data.result.inviteId}`) + console.log(`\n\n您的好友助力码为${data.data.result.inviteId}\n\n`) } // $.userInfo = data.data.result.userInfo; } @@ -838,7 +838,7 @@ function pkInfo() { if (safeGet(data)) { data = JSON.parse(data); if (data.code === 0 && data.data && data.data.bizCode === 0) { - console.log(`\n您的好友PK助力码为${data.data.result.groupInfo.groupAssistInviteId}\n注:此pk邀请码每天都变!`) + console.log(`\n\n您的好友PK助力码为${data.data.result.groupInfo.groupAssistInviteId}\n注:此pk邀请码每天都变!\n\n`) let info = data.data.result.groupPkInfo console.log(`预计分得:${data.data.result.groupInfo.personalAward}红包`) if (info.dayAward) diff --git a/jd_small_home.js b/jd_small_home.js index d847cda3..cd1b85e1 100644 --- a/jd_small_home.js +++ b/jd_small_home.js @@ -88,6 +88,7 @@ const JD_API_HOST = 'https://lkyl.dianpusoft.cn/api'; await smallHome(); } } + await updateInviteCodeCDN('https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_updateSmallHomeInviteCode.json'); for (let i = 0; i < cookiesArr.length; i++) { if (cookiesArr[i]) { cookie = cookiesArr[i]; @@ -148,9 +149,8 @@ async function doChannelsListTask(taskId, taskType) { } } async function helpFriends() { - await updateInviteCode(); + // await updateInviteCode(); // if (!$.inviteCodes) await updateInviteCodeCDN(); - await updateInviteCodeCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateSmallHomeInviteCode.json'); if ($.inviteCodes && $.inviteCodes['inviteCode']) { for (let item of $.inviteCodes.inviteCode) { if (!item) continue @@ -806,7 +806,7 @@ function updateInviteCode(url = 'https://raw.githubusercontent.com/LXK9301/updat } function updateInviteCodeCDN(url) { return new Promise(async resolve => { - $.get({url}, async (err, resp, data) => { + $.get({url, headers:{"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")}}, async (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`)