KingRan 2022-02-15 14:03:29 +08:00
parent 39a591d0af
commit 9d426e3e15
1 changed files with 36 additions and 35 deletions

View File

@ -58,44 +58,45 @@ let tasks = [], shareCodes = [], first = true;
})()
async function main() {
tasks = await detail();
console.log('tasks++++++++++'+tasks);
for (let i = 0; i < tasks.length; i++) {
let product_info_vos = []
let task_vos = tasks[i]
switch (task_vos.task_name) {
case '连签得金币':
if (task_vos.status === '1')
await do_task(task_vos.simple_record_info_vo.task_token, task_vos.task_id, task_vos.task_type)
continue
case '邀请好友助力':
await getShareCode(task_vos.assist_task_detail_vo.task_token)
await $.wait(2000)
tasks = await detail();
for (let i = 0; i < tasks.length; i++) {
let product_info_vos = []
let task_vos = tasks[i]
switch (task_vos.task_name) {
case '连签得金币':
if (task_vos.status === '1')
await do_task(task_vos.simple_record_info_vo.task_token, task_vos.task_id, task_vos.task_type)
continue
case '邀请好友助力':
await getShareCode(task_vos.assist_task_detail_vo.task_token)
await $.wait(2000)
await getAssist()
await $.wait(2000)
await getAssist()
await $.wait(2000)
console.log(`${$.index}个账号${$.UserName}去助力第${Math.floor(($.index - 1) / 6) + 1}个账号。`)
await doAssist()
continue
case '去浏览精彩会场': case '去关注特色频道' :
product_info_vos = task_vos['shopping_activity_vos']
break
case '去关注优质好店':
product_info_vos = task_vos['follow_shop_vo']
break
default:
""
}
let taskId = task_vos.task_id, taskType = task_vos.task_type;
for (let t of product_info_vos) {
if (t.status === '1') {
console.log(`开始任务:${task_vos.task_name}`)
let res = await do_task(t.task_token, taskId, taskType)
await $.wait(2000)
}
}
console.log(`${$.index}个账号${$.UserName}去助力第${Math.floor(($.index - 1) / 6) + 1}个账号。`)
await doAssist()
continue
case '去浏览精彩会场': case '去关注特色频道' :
product_info_vos = task_vos['shopping_activity_vos']
break
case '去关注优质好店':
product_info_vos = task_vos['follow_shop_vo']
break
default:
""
}
let taskId = task_vos.task_id, taskType = task_vos.task_type;
if(product_info_vos = ){
for (let t of product_info_vos) {
if (t.status === '1') {
console.log(`开始任务:${task_vos.task_name}`)
let res = await do_task(t.task_token, taskId, taskType)
await $.wait(1000)
}
}
}
}
}
function getShareCode(token) {