master
parent
77ac700546
commit
183dce4186
|
@ -152,10 +152,18 @@ async function run() {
|
||||||
}else{
|
}else{
|
||||||
console.log('已全部开卡')
|
console.log('已全部开卡')
|
||||||
}
|
}
|
||||||
|
$.log("加购: " + $.addSku)
|
||||||
console.log(`${$.score}值`)
|
if(!$.addSku && !$.outFlag){
|
||||||
|
flag = true
|
||||||
|
await takePostRequest('addSku');
|
||||||
|
await $.wait(parseInt(Math.random() * 1000 + 5000, 10))
|
||||||
|
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
await takePostRequest('activityContent');
|
||||||
|
}
|
||||||
$.runFalag = true
|
$.runFalag = true
|
||||||
let count = parseInt($.score/100)
|
let count = parseInt($.score/1)
|
||||||
console.log(`抽奖次数为:${count}`)
|
console.log(`抽奖次数为:${count}`)
|
||||||
for(m=1;count--;m++){
|
for(m=1;count--;m++){
|
||||||
console.log(`第${m}次抽奖`)
|
console.log(`第${m}次抽奖`)
|
||||||
|
@ -185,7 +193,7 @@ async function run() {
|
||||||
await $.wait(parseInt(Math.random() * 1000 + 5000, 10))
|
await $.wait(parseInt(Math.random() * 1000 + 5000, 10))
|
||||||
if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10))
|
if(flag) await $.wait(parseInt(Math.random() * 1000 + 10000, 10))
|
||||||
if($.index % 3 == 0) console.log('休息1分钟,别被黑ip了\n可持续发展')
|
if($.index % 3 == 0) console.log('休息1分钟,别被黑ip了\n可持续发展')
|
||||||
if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 60000, 10))
|
if($.index % 3 == 0) await $.wait(parseInt(Math.random() * 5000 + 30000, 10))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
@ -240,7 +248,7 @@ async function takePostRequest(type) {
|
||||||
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}`
|
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}`
|
||||||
break;
|
break;
|
||||||
case 'startDraw':
|
case 'startDraw':
|
||||||
url = `${domain}/joint/order/draw`;
|
url = `${domain}/dingzhi/fashion/union/draw`;
|
||||||
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&drawType=1`
|
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}&actorUuid=${$.actorUuid}&drawType=1`
|
||||||
break;
|
break;
|
||||||
case 'followShop':
|
case 'followShop':
|
||||||
|
@ -251,7 +259,7 @@ async function takePostRequest(type) {
|
||||||
case 'sign':
|
case 'sign':
|
||||||
case 'addCart':
|
case 'addCart':
|
||||||
case 'browseGoods':
|
case 'browseGoods':
|
||||||
url = `${domain}/dingzhi/linkgame/${type}`;
|
url = `${domain}/dingzhi/fashion/union/saveTask`;
|
||||||
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}`
|
body = `activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}`
|
||||||
if(type == 'browseGoods') body += `&value=${$.visitSkuValue}`
|
if(type == 'browseGoods') body += `&value=${$.visitSkuValue}`
|
||||||
break;
|
break;
|
||||||
|
@ -268,7 +276,7 @@ async function takePostRequest(type) {
|
||||||
case 'visitSku':
|
case 'visitSku':
|
||||||
case 'toShop':
|
case 'toShop':
|
||||||
case 'addSku':
|
case 'addSku':
|
||||||
url = `${domain}/dingzhi/opencard/${type}`;
|
url = `${domain}/dingzhi/fashion/union/saveTask`;
|
||||||
let taskType = ''
|
let taskType = ''
|
||||||
let taskValue = ''
|
let taskValue = ''
|
||||||
if(type == 'viewVideo'){
|
if(type == 'viewVideo'){
|
||||||
|
@ -278,11 +286,11 @@ async function takePostRequest(type) {
|
||||||
taskType = 5
|
taskType = 5
|
||||||
taskValue = $.visitSkuValue || 5
|
taskValue = $.visitSkuValue || 5
|
||||||
}else if(type == 'toShop'){
|
}else if(type == 'toShop'){
|
||||||
taskType = 14
|
taskType = 12
|
||||||
taskValue = $.toShopValue || 14
|
taskValue = $.toShopValue || 74956
|
||||||
}else if(type == 'addSku'){
|
}else if(type == 'addSku'){
|
||||||
taskType = 2
|
taskType = 21
|
||||||
taskValue = $.addSkuValue || 2
|
taskValue = $.addSkuValue || 21
|
||||||
}else if(type == 'toMainActive'){
|
}else if(type == 'toMainActive'){
|
||||||
taskType = 12
|
taskType = 12
|
||||||
taskValue = 3
|
taskValue = 3
|
||||||
|
@ -302,7 +310,7 @@ async function takePostRequest(type) {
|
||||||
body = `activityId=${$.activityId}`
|
body = `activityId=${$.activityId}`
|
||||||
break;
|
break;
|
||||||
case '抽奖':
|
case '抽奖':
|
||||||
url = `${domain}/dingzhi/opencard/draw`;
|
url = `${domain}/dingzhi/fashion/union/draw`;
|
||||||
body = `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.Pin)}`
|
body = `activityId=${$.activityId}&actorUuid=${$.actorUuid}&pin=${encodeURIComponent($.Pin)}`
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -408,7 +416,8 @@ async function dealReturn(type, data) {
|
||||||
if(res.result && res.result === true){
|
if(res.result && res.result === true){
|
||||||
$.endTime = res.data.endTime || (res.data.activityVo && res.data.activityVo.endTime) || res.data.activity.endTime || 0
|
$.endTime = res.data.endTime || (res.data.activityVo && res.data.activityVo.endTime) || res.data.activity.endTime || 0
|
||||||
$.hasEnd = res.data.hasEnd || false
|
$.hasEnd = res.data.hasEnd || false
|
||||||
$.score = res.data.assistCount || 0
|
$.score = res.data.score || 0
|
||||||
|
$.addSku = res.data.skuAddCart || false
|
||||||
$.actorUuid = res.data.actorUuid || ''
|
$.actorUuid = res.data.actorUuid || ''
|
||||||
$.followShop = res.data.followShopStatus || ''
|
$.followShop = res.data.followShopStatus || ''
|
||||||
$.signStatus = res.data.signStatus || false
|
$.signStatus = res.data.signStatus || false
|
||||||
|
|
Loading…
Reference in New Issue