From e8db5bbbf82a74832c999c254b95e22113b37c60 Mon Sep 17 00:00:00 2001 From: anonymous Date: Wed, 13 Jan 2021 10:28:00 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=8F=A3=E8=A2=8B=E4=B9=A6=E5=BA=97?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=B4=AD=E7=89=A9=E8=BD=A6=E5=BC=80=E5=85=B3?= =?UTF-8?q?=EF=BC=8C=E4=B8=8E=E4=B8=9C=E4=B8=9C=E5=B0=8F=E7=AA=9D=E5=85=B1?= =?UTF-8?q?=E4=BA=AB=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_bookshop.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/jd_bookshop.js b/jd_bookshop.js index fcf82081..a209fef7 100644 --- a/jd_bookshop.js +++ b/jd_bookshop.js @@ -25,6 +25,9 @@ const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; //IOS等用户直接用NobyDa的jd cookie let cookiesArr = [], cookie = '', message; const ACT_ID = 'dz2010100034444201', shareUuid = '28a699ac78d74aa3b31f7103597f8927' +let ADD_CART = false +ADD_CART = $.isNode() ? (process.env.PURCHASE_SHOPS ? process.env.PURCHASE_SHOPS : ADD_CART) : ($.getdata("ADD_CART") ? $.getdata("ADD_CART") : ADD_CART); +// 加入购物车开关,与东东小窝共享 let inviteCodes = [ '28a699ac78d74aa3b31f7103597f8927@2f14ee9c92954cf79829320dd482bf49@fdf827db272543d88dbb51a505c2e869@ce2536153a8742fb9e8754a9a7d361da@38ba4e7ba8074b78851e928af2b4f6b2', @@ -75,6 +78,7 @@ if ($.isNode()) { } await shareCodesFormat() await jdBeauty() + return } } })() @@ -98,6 +102,7 @@ async function jdBeauty() { await doHelpList() await getAllBook() await getMyBook() + await chargeGold() await getActContent(true) if ($.gold > 800) { console.log(`金币大于800,去抽奖`) @@ -107,8 +112,7 @@ async function jdBeauty() { $.gold -= 800 } } - if($.userInfo.storeGold) await chargeGold() - await helpFriends() + //await helpFriends() await showMsg(); } @@ -300,7 +304,7 @@ function getActContent(info = false, shareUuid = '') { if (!info) { const tasks = data.data.settingVo for (let task of tasks) { - if (['关注店铺', '加购商品'].includes(task.title)) { + if (['关注店铺'].includes(task.title)) { if (task.okNum < task.dayMaxNum) { console.log(`去做${task.title}任务`) await doTask(task.settings[0].type, task.settings[0].value) @@ -323,6 +327,11 @@ function getActContent(info = false, shareUuid = '') { await $.wait(500) } } + } else if (ADD_CART && ['加购商品'].includes(task.title)) { + if (task.okNum < task.dayMaxNum) { + console.log(`去做${task.title}任务`) + await doTask(task.settings[0].type, task.settings[0].value) + } } } } From db998ef271b49d8bd57d32287e5b365bc65c4f82 Mon Sep 17 00:00:00 2001 From: anonymous Date: Wed, 13 Jan 2021 10:29:32 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dqx=E3=80=81loon=E3=80=81s?= =?UTF-8?q?urge=E6=8A=A5=E9=94=99=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=8A=A9?= =?UTF-8?q?=E5=8A=9B=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_bookshop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jd_bookshop.js b/jd_bookshop.js index a209fef7..244b6072 100644 --- a/jd_bookshop.js +++ b/jd_bookshop.js @@ -102,7 +102,6 @@ async function jdBeauty() { await doHelpList() await getAllBook() await getMyBook() - await chargeGold() await getActContent(true) if ($.gold > 800) { console.log(`金币大于800,去抽奖`) @@ -112,7 +111,8 @@ async function jdBeauty() { $.gold -= 800 } } - //await helpFriends() + if($.userInfo.storeGold) await chargeGold() + await helpFriends() await showMsg(); } From 4bcf97e47a7c38b62d84bb2de20de2cd44fb0240 Mon Sep 17 00:00:00 2001 From: anonymous Date: Wed, 13 Jan 2021 10:30:47 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_bookshop.js | 1 - 1 file changed, 1 deletion(-) diff --git a/jd_bookshop.js b/jd_bookshop.js index 244b6072..0f927898 100644 --- a/jd_bookshop.js +++ b/jd_bookshop.js @@ -78,7 +78,6 @@ if ($.isNode()) { } await shareCodesFormat() await jdBeauty() - return } } })() From 709ef98a63a39446598f18b8dec22ca2ac553f49 Mon Sep 17 00:00:00 2001 From: anonymous Date: Wed, 13 Jan 2021 10:39:16 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=A2=86=E7=8E=B0=E9=87=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=80=9B=E9=9A=90=E8=97=8F=E4=BB=BB=E5=8A=A1=E5=BE=97?= =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E5=8A=A9=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd_cash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd_cash.js b/jd_cash.js index f094049e..18bb18df 100644 --- a/jd_cash.js +++ b/jd_cash.js @@ -128,7 +128,7 @@ function index(info=false) { await $.wait(5000) } } - else if (task.type === 16 || task.type===3 || task.type===5 || task.type===17) { + else if (task.type === 16 || task.type===3 || task.type===5 || task.type===17 || task.type===21) { for (let i = task.doTimes; i < task.times; ++i) { console.log(`去做${task.name}任务 ${i+1}/${task.times}`) await doTask(task.type, task.jump.params.url)