mirror of https://github.com/KingRan/KR.git
parent
39a591d0af
commit
9d426e3e15
|
@ -58,44 +58,45 @@ let tasks = [], shareCodes = [], first = true;
|
||||||
})()
|
})()
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
tasks = await detail();
|
tasks = await detail();
|
||||||
console.log('tasks:++++++++++'+tasks);
|
for (let i = 0; i < tasks.length; i++) {
|
||||||
for (let i = 0; i < tasks.length; i++) {
|
let product_info_vos = []
|
||||||
let product_info_vos = []
|
let task_vos = tasks[i]
|
||||||
let task_vos = tasks[i]
|
switch (task_vos.task_name) {
|
||||||
switch (task_vos.task_name) {
|
case '连签得金币':
|
||||||
case '连签得金币':
|
if (task_vos.status === '1')
|
||||||
if (task_vos.status === '1')
|
await do_task(task_vos.simple_record_info_vo.task_token, task_vos.task_id, task_vos.task_type)
|
||||||
await do_task(task_vos.simple_record_info_vo.task_token, task_vos.task_id, task_vos.task_type)
|
continue
|
||||||
continue
|
case '邀请好友助力':
|
||||||
case '邀请好友助力':
|
await getShareCode(task_vos.assist_task_detail_vo.task_token)
|
||||||
await getShareCode(task_vos.assist_task_detail_vo.task_token)
|
await $.wait(2000)
|
||||||
await $.wait(2000)
|
|
||||||
|
|
||||||
await getAssist()
|
await getAssist()
|
||||||
await $.wait(2000)
|
await $.wait(2000)
|
||||||
|
|
||||||
console.log(`第${$.index}个账号${$.UserName}去助力第${Math.floor(($.index - 1) / 6) + 1}个账号。`)
|
console.log(`第${$.index}个账号${$.UserName}去助力第${Math.floor(($.index - 1) / 6) + 1}个账号。`)
|
||||||
await doAssist()
|
await doAssist()
|
||||||
continue
|
continue
|
||||||
case '去浏览精彩会场': case '去关注特色频道' :
|
case '去浏览精彩会场': case '去关注特色频道' :
|
||||||
product_info_vos = task_vos['shopping_activity_vos']
|
product_info_vos = task_vos['shopping_activity_vos']
|
||||||
break
|
break
|
||||||
case '去关注优质好店':
|
case '去关注优质好店':
|
||||||
product_info_vos = task_vos['follow_shop_vo']
|
product_info_vos = task_vos['follow_shop_vo']
|
||||||
break
|
break
|
||||||
default:
|
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
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) {
|
function getShareCode(token) {
|
||||||
|
|
Loading…
Reference in New Issue