1
0
mirror of https://github.com/okyyds/yyds.git synced 2026-07-13 22:11:18 +08:00
This commit is contained in:
ooo
2022-10-28 13:53:54 +08:00
parent 67da3f5d31
commit 5fc0326fe1

View File

@@ -55,7 +55,8 @@ if ($.isNode()) {
$.ADID = getUUID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1); $.ADID = getUUID("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1);
$.UUID = getUUID("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); $.UUID = getUUID("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
authorCodeList = [ authorCodeList = [
'ab46b82d02ed4863a28f63d2de74e0b7' // '23c1d161082447178ea1e63c2da678e0',
'ab46b82d02ed4863a28f63d2de74e0b7',
]; ];
// $.authorCode = authorCodeList[random(0, authorCodeList.length)]; // $.authorCode = authorCodeList[random(0, authorCodeList.length)];
$.authorCode = ownCode ? ownCode : authorCodeList[random(0, authorCodeList.length)] $.authorCode = ownCode ? ownCode : authorCodeList[random(0, authorCodeList.length)]
@@ -63,7 +64,7 @@ if ($.isNode()) {
$.randomCode = random(1000000, 9999999); $.randomCode = random(1000000, 9999999);
$.activityId = "dzlhkk8846956f17f1445392e7f72c"; $.activityId = "dzlhkk8846956f17f1445392e7f72c";
$.activityShopId = "1000087843"; $.activityShopId = "1000087843";
$.activityUrl = `https://lzdz1-isv.isvjcloud.com/dingzhi/customized/common/activity/${$.authorNum}?activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}&adsource=null&shareuserid4minipg=null&shopid=undefined&lng=00.000000&lat=00.000000&sid=&un_area=`; $.activityUrl = `https://lzdz1-isv.isvjcloud.com/dingzhi/customized/common/activity/${$.authorNum}?activityId=${$.activityId}&shareUuid=${encodeURIComponent($.authorCode)}&adsource=SD&shareuserid4minipg=${encodeURIComponent($.secretPin)}&shopid=undefined&lng=00.000000&lat=00.000000&sid=&un_area=`;
await member(); await member();
await $.wait(5000); await $.wait(5000);
if ($.bean > 0) { if ($.bean > 0) {
@@ -90,6 +91,7 @@ async function member() {
$.token = null; $.token = null;
$.secretPin = null; $.secretPin = null;
$.openCardActivityId = null; $.openCardActivityId = null;
$.addScore = 1
lz_cookie = {}; lz_cookie = {};
await getFirstLZCK(); await getFirstLZCK();
await getToken(); await getToken();
@@ -108,7 +110,6 @@ async function member() {
// await task("taskact/common/drawContent", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`); // await task("taskact/common/drawContent", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}`);
await task("linkgame/checkOpenCard", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`); await task("linkgame/checkOpenCard", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`);
$.log("加入店铺会员"); $.log("加入店铺会员");
$.log("加入店铺会员");
if ($.openCardList) { if ($.openCardList) {
for (const vo of $.openCardList) { for (const vo of $.openCardList) {
// console.log(vo) // console.log(vo)
@@ -119,8 +120,9 @@ async function member() {
// await getToken(); // await getToken();
if (vo.status == 0) { if (vo.status == 0) {
await getShopOpenCardInfo({ venderId: `${vo.venderId}`, channel: "401" }, vo.venderId); await getShopOpenCardInfo({ venderId: `${vo.venderId}`, channel: "401" }, vo.venderId);
await bindWithVender({ venderId: `${vo.venderId}`, bindByVerifyCodeFlag: 1, registerExtend: {}, writeChildFlag: 0, activityId: $.openCardActivityId, channel: 401 }, vo.venderId); // console.log($.openCardActivityId)
await $.wait(2000); await bindWithVender({ venderId: `${vo.venderId}`, bindByVerifyCodeFlag: 1, registerExtend: {}, writeChildFlag: 0, activityId: 2317870, channel: 401 }, vo.venderId);
await $.wait(1000);
} else { } else {
$.log(`>>> 已经是会员`); $.log(`>>> 已经是会员`);
} }
@@ -128,9 +130,16 @@ async function member() {
} else { } else {
$.log("没有获取到对应的任务。\n"); $.log("没有获取到对应的任务。\n");
} }
// $.taskList = []
// await dsb($.openCardList)
// await Promise.all($.taskList)
await $.wait(1000);
await task("linkgame/checkOpenCard", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`); await task("linkgame/checkOpenCard", `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`);
console.log("去助力 -> " + $.authorCode); console.log("去助力 -> " + $.authorCode);
await $.wait(1000);
await task("linkgame/assist/status", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`); await task("linkgame/assist/status", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`);
await $.wait(1000);
await task("linkgame/assist", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`); await task("linkgame/assist", `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&shareUuid=${$.authorCode}`);
// await task('linkgame/help/list', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`) // await task('linkgame/help/list', `pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}`)
@@ -154,6 +163,23 @@ async function member() {
} }
} }
function dsb(openCardList){
if (openCardList) {
for (const vo of openCardList) {
// console.log(vo)
$.log(`>>> 去加入${vo.name} ${vo.venderId}`);
if (vo.status == 0) {
// bindWithVender({ venderId: `${vo.venderId}`, bindByVerifyCodeFlag: 1, registerExtend: {}, writeChildFlag: 0, activityId: 2317870, channel: 401 }, vo.venderId);
$.taskList.push(bindWithVender({ venderId: `${vo.venderId}`, bindByVerifyCodeFlag: 1, registerExtend: {}, writeChildFlag: 0, activityId: 2317870, channel: 401 }, vo.venderId))
} else {
$.log(`>>> 已经是会员`);
}
}
} else {
$.log("没有获取到对应的任务。\n");
}
}
function task(function_id, body, isCommon = 0, own = 0) { function task(function_id, body, isCommon = 0, own = 0) {
return new Promise((resolve) => { return new Promise((resolve) => {
$.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => { $.post(taskUrl(function_id, body, isCommon), async (err, resp, data) => {
@@ -185,14 +211,18 @@ function task(function_id, body, isCommon = 0, own = 0) {
} else { } else {
$.log("活动已经结束"); $.log("活动已经结束");
} }
// console.log(data)
break; break;
case "linkgame/task/opencard/info": case "linkgame/checkOpenCard":
$.openCardList = data.data.followShopList; $.openCardList = data.data.openCardList;
$.openCardStatus = data.data; $.openCardStatus = data.data;
// console.log(data) // console.log(data)
break; break;
case "opencard/follow/shop": case "opencard/follow/shop":
console.log(data); console.log(data);
if (data.data) {
$.addScore = data.data.addScore
}
break; break;
case "linkgame/sign": case "linkgame/sign":
console.log(data); console.log(data);