This commit is contained in:
Faker 2022-04-11 15:46:01 +08:00
parent 674cc491e5
commit dcff26f250
11 changed files with 1020 additions and 264 deletions

178
jd_10_4.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -7,17 +7,17 @@
===================quantumultx================ ===================quantumultx================
[task_local] [task_local]
#京东手机狂欢城助力 #京东手机狂欢城助力
10 0,8 * * * https://raw.githubusercontent.com/KingRan/KR/main/jd_carnivalcity_help.js, tag=京东手机狂欢城助力, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true 10 0,8 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_carnivalcity_help.js, tag=京东手机狂欢城助力, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
=====================Loon================ =====================Loon================
[Script] [Script]
cron "10 0,8 * * *" script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_carnivalcity_help.js, tag=京东手机狂欢城助力 cron "10 0,8 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_carnivalcity_help.js, tag=京东手机狂欢城助力
====================Surge================ ====================Surge================
京东手机狂欢城助力 = type=cron,cronexp=10 0,8 * * *,wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_carnivalcity_help.js 京东手机狂欢城助力 = type=cron,cronexp=10 0,8 * * *,wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_carnivalcity_help.js
============小火箭========= ============小火箭=========
京东手机狂欢城助力 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_carnivalcity_help.js, cronexpr="10 0,8 * * *", timeout=3600, enable=true 京东手机狂欢城助力 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_carnivalcity_help.js, cronexpr="10 0,8 * * *", timeout=3600, enable=true
*/ */
const $ = new Env('京东手机狂欢城内部互助'); const $ = new Env('京东手机狂欢城内部互助');
const notify = $.isNode() ? require('./sendNotify') : ''; const notify = $.isNode() ? require('./sendNotify') : '';

View File

@ -3,14 +3,14 @@
============Quantumultx=============== ============Quantumultx===============
[task_local] [task_local]
#店铺签到 #店铺签到
15 2,14 * * * https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.js, tag=店铺签到, enabled=true 15 2,14 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js, tag=店铺签到, enabled=true
===========Loon============ ===========Loon============
[Script] [Script]
cron "15 2,14 * * *" script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.js,tag=店铺签到 cron "15 2,14 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js,tag=店铺签到
============Surge============= ============Surge=============
店铺签到 = type=cron,cronexp="15 2,14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.js 店铺签到 = type=cron,cronexp="15 2,14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js
===========小火箭======== ===========小火箭========
店铺签到 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_shop_sign.jss, cronexpr="15 2,14 * * *", timeout=3600, enable=true 店铺签到 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.jss, cronexpr="15 2,14 * * *", timeout=3600, enable=true
*/ */
const $ = new Env('店铺签到'); const $ = new Env('店铺签到');
const notify = $.isNode() ? require('./sendNotify') : ''; const notify = $.isNode() ? require('./sendNotify') : '';
@ -25,30 +25,22 @@ let vender=''
let num=0 let num=0
let shopname='' let shopname=''
const token = [ const token = [
"FEACDDFEABE7E6F5F52E32E79ACB0126", "30F88897B3C194F5BB7535E62640E00B",
"113946C00C676DD5141D46EF6194E281",
"4BF0331BCB845ABC79145753E605E9C3", "4BF0331BCB845ABC79145753E605E9C3",
"8C00826D27DA33A520F06E5C5C2E302B",
"490047103854B8B5E17D3D76C2C65D1D", "490047103854B8B5E17D3D76C2C65D1D",
"F4132FED0919E26A040981E77C3FD009", "F4132FED0919E26A040981E77C3FD009",
"3068C74A35718BF761F8E10F52824696", "3068C74A35718BF761F8E10F52824696",
"AF994FA00C2086F08849D5FB7122E79F", "AF994FA00C2086F08849D5FB7122E79F",
"8C172B547FA75FEADBF342CDEBE14C36", "8C172B547FA75FEADBF342CDEBE14C36",
"BA1063C108CD0642AD3A5C21A6952136", "97CE35E23187041CD746CA5B4E7F4B38",
"E20BD5091D8F70B4649D529A09183F04", "E20BD5091D8F70B4649D529A09183F04",
"88ECFB91288FD2DE93DDBDDAA9409D8E", "88ECFB91288FD2DE93DDBDDAA9409D8E",
"1B2F8250713AD30F335B092B70A4DBF5", "1B2F8250713AD30F335B092B70A4DBF5",
"642395217049DBC4F56F105B3FBA0633", "642395217049DBC4F56F105B3FBA0633",
"2593927DBC99178C9E835A607D67482C",
"8E3E6081738C9C30446C20F347516649", "8E3E6081738C9C30446C20F347516649",
"C7671CB73E0BE699998307ADB36D8708",
"A795246AE4063905815D7748001C0A58",
"57B5F1912B8A5F7C3913EEB0CFA9130B", "57B5F1912B8A5F7C3913EEB0CFA9130B",
"C5F5FF51E040B2415A435D5BFDA15348", "C5F5FF51E040B2415A435D5BFDA15348",
"664227400540BC20B0160DE112BE806C",
"B5BD9A190DD6AD49A6E3646CB2700863",
"CA4DE825AAE4DCAEC7979216EF6D3451", "CA4DE825AAE4DCAEC7979216EF6D3451",
"3C17106279994F61484D172F388DDC1D",
"7C21504827C3A3923BFAEEC850810301", "7C21504827C3A3923BFAEEC850810301",
"EA281B5F2CD68CDA09EE992B1FEA8DDA" "EA281B5F2CD68CDA09EE992B1FEA8DDA"
] ]

337
jd_gjlh.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

337
jd_mncryyj.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -4,14 +4,14 @@
============Quantumultx=============== ============Quantumultx===============
[task_local] [task_local]
#极速版抢卷 #极速版抢卷
58 59 7,10,13,15,19 * * * https://raw.githubusercontent.com/KingRan/KR/main/jd_10_4.js, tag=极速版抢卷, enabled=true 58 59 7,10,13,15,19 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_10_4.js, tag=极速版抢卷, enabled=true
================Loon============== ================Loon==============
[Script] [Script]
cron "58 59 7,10,13,15,19 * * *" script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_10_4.js,tag=极速版抢卷 cron "58 59 7,10,13,15,19 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_10_4.js,tag=极速版抢卷
===============Surge================= ===============Surge=================
极速版抢卷 = type=cron,cronexp="58 59 7,10,13,15,19 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_10_4.js 极速版抢卷 = type=cron,cronexp="58 59 7,10,13,15,19 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_10_4.js
============小火箭========= ============小火箭=========
极速版抢卷 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_10_4.js, cronexpr="58 59 7,10,13,15,19 * * *", timeout=3600, enable=true 极速版抢卷 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_10_4.js, cronexpr="58 59 7,10,13,15,19 * * *", timeout=3600, enable=true
*/ */
const $ = new Env('抢极速版全品卷10-4'); const $ = new Env('抢极速版全品卷10-4');
const moment = require('moment'); const moment = require('moment');

View File

@ -4,14 +4,14 @@
============Quantumultx=============== ============Quantumultx===============
[task_local] [task_local]
#极速版抢卷 #极速版抢卷
58 59 6,9,14,17,20 * * * https://raw.githubusercontent.com/KingRan/KR/main/jd_19_6.js, tag=极速版抢卷, enabled=true 58 59 6,9,14,17,20 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_19_6.js, tag=极速版抢卷, enabled=true
================Loon============== ================Loon==============
[Script] [Script]
cron "58 59 6,9,14,17,20 * * *" script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_19_6.js,tag=极速版抢卷 cron "58 59 6,9,14,17,20 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_19_6.js,tag=极速版抢卷
===============Surge================= ===============Surge=================
极速版抢卷 = type=cron,cronexp="58 59 6,9,14,17,20 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_19_6.js 极速版抢卷 = type=cron,cronexp="58 59 6,9,14,17,20 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_19_6.js
============小火箭========= ============小火箭=========
极速版抢卷 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_19_6.js, cronexpr="58 59 6,9,14,17,20 * * *", timeout=3600, enable=true 极速版抢卷 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_19_6.js, cronexpr="58 59 6,9,14,17,20 * * *", timeout=3600, enable=true
*/ */
const $ = new Env('抢极速版全品卷19-6'); const $ = new Env('抢极速版全品卷19-6');
const moment = require('moment'); const moment = require('moment');

View File

@ -4,14 +4,14 @@
============Quantumultx=============== ============Quantumultx===============
[task_local] [task_local]
#极速版抢卷 #极速版抢卷
58 59 8,11,14,16,19 * * * https://raw.githubusercontent.com/KingRan/KR/main/jd_29_8.js, tag=极速版抢卷, enabled=true 58 59 8,11,14,16,19 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_29_8.js, tag=极速版抢卷, enabled=true
================Loon============== ================Loon==============
[Script] [Script]
cron "58 59 8,11,14,16,19 * * *" script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_29_8.js,tag=极速版抢卷 cron "58 59 8,11,14,16,19 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_29_8.js,tag=极速版抢卷
===============Surge================= ===============Surge=================
极速版抢卷 = type=cron,cronexp="58 59 8,11,14,16,19 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_29_8.js 极速版抢卷 = type=cron,cronexp="58 59 8,11,14,16,19 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_29_8.js
============小火箭========= ============小火箭=========
极速版抢卷 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_29_8.js, cronexpr="58 59 8,11,14,16,19 * * *", timeout=3600, enable=true 极速版抢卷 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_29_8.js, cronexpr="58 59 8,11,14,16,19 * * *", timeout=3600, enable=true
*/ */
const $ = new Env('抢极速版全品卷29-8'); const $ = new Env('抢极速版全品卷29-8');
const moment = require('moment'); const moment = require('moment');

View File

@ -4,14 +4,14 @@
============Quantumultx=============== ============Quantumultx===============
[task_local] [task_local]
#极速版抢卷 #极速版抢卷
58 59 6,9,14,17,20 * * * https://raw.githubusercontent.com/KingRan/KR/main/jd_5_2.js, tag=极速版抢卷, enabled=true 58 59 6,9,14,17,20 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_5_2.js, tag=极速版抢卷, enabled=true
================Loon============== ================Loon==============
[Script] [Script]
cron "58 59 6,9,14,17,20 * * *" script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_5_2.js,tag=极速版抢卷 cron "58 59 6,9,14,17,20 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_5_2.js,tag=极速版抢卷
===============Surge================= ===============Surge=================
极速版抢卷 = type=cron,cronexp="58 59 6,9,14,17,20 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_5_2.js 极速版抢卷 = type=cron,cronexp="58 59 6,9,14,17,20 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_5_2.js
============小火箭========= ============小火箭=========
极速版抢卷 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/KR/main/jd_5_2.js, cronexpr="58 59 6,9,14,17,20 * * *", timeout=3600, enable=true 极速版抢卷 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_5_2.js, cronexpr="58 59 6,9,14,17,20 * * *", timeout=3600, enable=true
*/ */
const $ = new Env('抢极速版全品卷5-2'); const $ = new Env('抢极速版全品卷5-2');
const moment = require('moment'); const moment = require('moment');

View File

@ -5,17 +5,17 @@
===============Quantumultx=============== ===============Quantumultx===============
[task_local] [task_local]
#众筹许愿池 #众筹许愿池
40 0,2 * * * https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true 40 0,2 * * * https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js, tag=众筹许愿池, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true
================Loon============== ================Loon==============
[Script] [Script]
cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js,tag=众筹许愿池 cron "40 0,2 * * *" script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js,tag=众筹许愿池
===============Surge================= ===============Surge=================
众筹许愿池 = type=cron,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js 众筹许愿池 = type=cron,cronexp="40 0,2 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js
============小火箭========= ============小火箭=========
众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/222222/sync/jd_scripts/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true 众筹许愿池 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_wish.js, cronexpr="40 0,2 * * *", timeout=3600, enable=true
*/ */
const $ = new Env('众筹许愿池'); const $ = new Env('众筹许愿池');
const notify = $.isNode() ? require('./sendNotify') : ''; const notify = $.isNode() ? require('./sendNotify') : '';
@ -25,8 +25,8 @@ let message = '', allMessage = '';
//IOS等用户直接用NobyDa的jd cookie //IOS等用户直接用NobyDa的jd cookie
let cookiesArr = [], cookie = ''; let cookiesArr = [], cookie = '';
const JD_API_HOST = 'https://api.m.jd.com/client.action'; const JD_API_HOST = 'https://api.m.jd.com/client.action';
let appIdArr = ['1EFdRwqyF','1EFZWxKqP','1FFVQyqw','1EFRQwA','1EFRWxKuG', '1E1xZy6s']; let appIdArr = ['1FFVQyqw','1EFRWxKuG', '1E1xZy6s'];
let appNameArr = ['春尚','新品来袭','1111点心动','疯狂砸金蛋','许愿抽好礼', 'PLUS生活特权']; let appNameArr = ['1111点心动','许愿抽好礼', 'PLUS生活特权'];
let appId, appName; let appId, appName;
$.shareCode = []; $.shareCode = [];
if ($.isNode()) { if ($.isNode()) {
@ -72,12 +72,7 @@ if ($.isNode()) {
if ($.isNode()) await notify.sendNotify($.name, allMessage); if ($.isNode()) await notify.sendNotify($.name, allMessage);
$.msg($.name, '', allMessage) $.msg($.name, '', allMessage)
} }
let res = await getAuthorShareCode('https://raw.githubusercontent.com/222222/11111128/master/shareCodes/11111127') let res = await getAuthorShareCode('https://gitee.com/KingRan521/JD-Scripts/raw/master/shareCodes/wish.json')
if (!res) {
$.http.get({url: 'https://purge.jsdelivr.net/gh/222222/11111128@master/shareCodes/11111127'}).then((resp) => {}).catch((e) => console.log('刷新CDN异常', e));
await $.wait(1000)
res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/222222/11111128@master/shareCodes/11111127')
}
$.shareCode = [...$.shareCode, ...(res || [])] $.shareCode = [...$.shareCode, ...(res || [])]
for (let i = 0; i < cookiesArr.length; i++) { for (let i = 0; i < cookiesArr.length; i++) {
if (cookiesArr[i]) { if (cookiesArr[i]) {
@ -136,7 +131,6 @@ async function jd_wish() {
await interact_template_getLotteryResult() await interact_template_getLotteryResult()
await $.wait(2000) await $.wait(2000)
} }
if (message) allMessage += `京东账号${$.index} ${$.nickName || $.UserName}\n${appName}\n${message}${$.index !== cookiesArr.length ? '\n\n' : ''}`
} catch (e) { } catch (e) {
$.logErr(e) $.logErr(e)
@ -145,6 +139,7 @@ async function jd_wish() {
async function healthyDay_getHomeData(type = true) { async function healthyDay_getHomeData(type = true) {
return new Promise(async resolve => { return new Promise(async resolve => {
// console.log(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }));
$.post(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }), async (err, resp, data) => { $.post(taskUrl('healthyDay_getHomeData', { "appId": appId, "taskToken": "", "channelId": 1 }), async (err, resp, data) => {
try { try {
if (err) { if (err) {
@ -153,25 +148,50 @@ async function healthyDay_getHomeData(type = true) {
} else { } else {
if (safeGet(data)) { if (safeGet(data)) {
data = JSON.parse(data); data = JSON.parse(data);
// console.log(data);
if (type) { if (type) {
for (let key of Object.keys(data.data.result.hotTaskVos).reverse()) {
let vo = data.data.result.hotTaskVos[key]
if (vo.status !== 2) {
if (vo.taskType === 12) {
console.log(`点击热区`)
await harmony_collectScore({"appId":appId,"taskToken":vo.simpleRecordInfoVo.taskToken,"taskId":vo.taskId,"actionType":"0"}, vo.taskType)
}
}else {
console.log(`${vo.taskName}】已完成\n`)
}
}
for (let key of Object.keys(data.data.result.taskVos).reverse()) { for (let key of Object.keys(data.data.result.taskVos).reverse()) {
let vo = data.data.result.taskVos[key] let vo = data.data.result.taskVos[key]
if (vo.status !== 2 && vo.status !== 0) { if (vo.status !== 2) {
if (vo.taskType === 13 || vo.taskType === 12) { if (vo.taskType === 13 || vo.taskType === 12) {
console.log(`签到`) console.log(`签到`)
await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType) await harmony_collectScore({ "appId": appId, "taskToken": vo.simpleRecordInfoVo.taskToken, "taskId": vo.taskId, "actionType": "0" }, vo.taskType)
} else if (vo.taskType === 1) { } else if (vo.taskType === 1) {
$.complete = false;
for (let key of Object.keys(vo.followShopVo)) { for (let key of Object.keys(vo.followShopVo)) {
let followShopVo = vo.followShopVo[key] let followShopVo = vo.followShopVo[key]
if (followShopVo.status !== 2) { if (followShopVo.status !== 2) {
console.log(`${followShopVo.shopName}${vo.subTitleName}`) console.log(`${followShopVo.shopName}${vo.subTitleName}`)
await harmony_collectScore({ "appId": appId, "taskToken": followShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" }) await harmony_collectScore({ "appId": appId, "taskToken": followShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" })
if ($.complete) break; }
}
} else if (vo.taskType === 5) {
for (let key of Object.keys(vo.browseShopVo)) {
let browseShopVo = vo.browseShopVo[key]
if (browseShopVo.status !== 2) {
console.log(`${browseShopVo.skuName}${vo.subTitleName}`)
await harmony_collectScore({ "appId": appId, "taskToken": browseShopVo.taskToken, "taskId": vo.taskId, "actionType": "0" })
}
}
} else if (vo.taskType === 15) {
for (let key of Object.keys(vo.productInfoVos)) {
let productInfoVos = vo.productInfoVos[key]
if (productInfoVos.status !== 2) {
console.log(`${productInfoVos.skuName}${vo.subTitleName}`)
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
} }
} }
} else if (vo.taskType === 8) { } else if (vo.taskType === 8) {
$.complete = false;
for (let key of Object.keys(vo.productInfoVos)) { for (let key of Object.keys(vo.productInfoVos)) {
let productInfoVos = vo.productInfoVos[key] let productInfoVos = vo.productInfoVos[key]
if (productInfoVos.status !== 2) { if (productInfoVos.status !== 2) {
@ -179,11 +199,12 @@ async function healthyDay_getHomeData(type = true) {
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "1" }) await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "1" })
await $.wait(vo.waitDuration * 1000) await $.wait(vo.waitDuration * 1000)
await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" }) await harmony_collectScore({ "appId": appId, "taskToken": productInfoVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
if ($.complete) break;
} }
} }
} else if (vo.taskType === 27 && vo.taskId === 18) {
console.log(`${vo.subTitleName}`)
await harmony_collectScore({ "appId": appId, "taskToken": vo.productInfoVos[0].taskToken, "taskId": vo.taskId, "actionType": "0" })
} else if (vo.taskType === 9 || vo.taskType === 26) { } else if (vo.taskType === 9 || vo.taskType === 26) {
$.complete = false;
for (let key of Object.keys(vo.shoppingActivityVos)) { for (let key of Object.keys(vo.shoppingActivityVos)) {
let shoppingActivityVos = vo.shoppingActivityVos[key] let shoppingActivityVos = vo.shoppingActivityVos[key]
if (shoppingActivityVos.status !== 2) { if (shoppingActivityVos.status !== 2) {
@ -193,7 +214,6 @@ async function healthyDay_getHomeData(type = true) {
await $.wait(vo.waitDuration * 1000) await $.wait(vo.waitDuration * 1000)
} }
await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" }) await harmony_collectScore({ "appId": appId, "taskToken": shoppingActivityVos.taskToken, "taskId": vo.taskId, "actionType": "0" })
if ($.complete) break;
} }
} }
} else if (vo.taskType === 14) { } else if (vo.taskType === 14) {
@ -234,7 +254,7 @@ function harmony_collectScore(body = {}, taskType = '') {
if (data && data.data && data.data.bizCode === 0) { if (data && data.data && data.data.bizCode === 0) {
if (taskType === 13) { if (taskType === 13) {
console.log(`签到成功:获得${data.data.result.score}金币\n`) console.log(`签到成功:获得${data.data.result.score}金币\n`)
} else if (body.taskId == 6) { } else if (body.taskId == 5) {
console.log(`助力成功:您的好友获得${data.data.result.score}金币\n`) console.log(`助力成功:您的好友获得${data.data.result.score}金币\n`)
} else { } else {
console.log(`完成任务:获得${data.data.result.score}金币\n`) console.log(`完成任务:获得${data.data.result.score}金币\n`)
@ -242,13 +262,12 @@ function harmony_collectScore(body = {}, taskType = '') {
} else { } else {
if (taskType === 13) { if (taskType === 13) {
console.log(`签到失败:${data.data.bizMsg}\n`) console.log(`签到失败:${data.data.bizMsg}\n`)
} else if (body.taskId == 6) { } else if (body.taskId == 5) {
console.log(`助力失败:${data.data.bizMsg || data.msg}\n`) console.log(`助力失败:${data.data.bizMsg || data.msg}\n`)
if (data.code === -30001 || (data.data && data.data.bizCode === 108)) $.canHelp = false if (data.code === -30001 || (data.data && data.data.bizCode === 108)) $.canHelp = false
if (data.data.bizCode === 103) $.delcode = true if (data.data.bizCode === 103) $.delcode = true
} else { } else {
console.log(body.actionType === "0" ? `完成任务失败:${data.data.bizMsg}\n` : data.data.bizMsg) console.log(body.actionType === "0" ? `完成任务失败:${data.data.bizMsg}\n` : data.data.bizMsg)
if (data.data.bizMsg === "任务已完成") $.complete = true;
} }
} }
} }
@ -261,6 +280,7 @@ function harmony_collectScore(body = {}, taskType = '') {
}) })
}) })
} }
function interact_template_getLotteryResult() { function interact_template_getLotteryResult() {
return new Promise(resolve => { return new Promise(resolve => {
$.post(taskUrl('interact_template_getLotteryResult', {"appId":appId}), (err, resp, data) => { $.post(taskUrl('interact_template_getLotteryResult', {"appId":appId}), (err, resp, data) => {