mirror of
https://github.com/shufflewzc/faker3.git
synced 2026-04-04 00:44:07 +08:00
sync
This commit is contained in:
56
jd_share.js
Executable file → Normal file
56
jd_share.js
Executable file → Normal file
@@ -1,24 +1,41 @@
|
||||
/*
|
||||
关注 https://t.me/okyydsnb
|
||||
7 7 7 7 7 jd_share.js
|
||||
注意控制ck数量
|
||||
*/
|
||||
活动地址为:https://lzkjdz-isv.isvjcloud.com/wxShareActivity/activity/6432842?activityId=xxxxx
|
||||
一共有2个变量
|
||||
jd_fxyl_activityId 活动ID 必需
|
||||
|
||||
const $ = new Env("分享有礼");
|
||||
|
||||
其他变量:
|
||||
OWN_COOKIE_NUM 需要被助力的人数
|
||||
HELP_COOKIE_NUM 助力的人数
|
||||
|
||||
作者:小埋
|
||||
|
||||
cron:1 1 1 1 *
|
||||
============Quantumultx===============
|
||||
[task_local]
|
||||
#LZ分享有礼
|
||||
1 1 1 1 * jd_share.js, tag=LZ分享有礼, enabled=true
|
||||
|
||||
*/
|
||||
const $ = new Env("LZ分享有礼");
|
||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||
let cookiesArr = [], cookie = '', message = '';
|
||||
let authorCodeList = [];
|
||||
let ownCookieNum = 1;
|
||||
let ownCookieNum = 3;
|
||||
let helpCookieNum = 5;
|
||||
let isGetAuthorCodeList = true
|
||||
let activityId = '5da58c75d1204bd1a873c568567844a9'
|
||||
let activityId = ''
|
||||
let activityShopId = ''
|
||||
|
||||
if (process.env.OWN_COOKIE_NUM && process.env.OWN_COOKIE_NUM != 4) {
|
||||
if (process.env.HELP_COOKIE_NUM && process.env.HELP_COOKIE_NUM != 5) {
|
||||
helpCookieNum = process.env.HELP_COOKIE_NUM;
|
||||
}
|
||||
if (process.env.OWN_COOKIE_NUM && process.env.OWN_COOKIE_NUM != 3) {
|
||||
ownCookieNum = process.env.OWN_COOKIE_NUM;
|
||||
}
|
||||
if (process.env.ACTIVITY_ID && process.env.ACTIVITY_ID != "") {
|
||||
activityId = process.env.ACTIVITY_ID;
|
||||
if (process.env.jd_fxyl_activityId && process.env.jd_fxyl_activityId != "") {
|
||||
activityId = process.env.jd_fxyl_activityId;
|
||||
}
|
||||
|
||||
if ($.isNode()) {
|
||||
@@ -41,6 +58,7 @@ if ($.isNode()) {
|
||||
return;
|
||||
}
|
||||
isGetAuthorCodeList = true;
|
||||
console.log(`【入口:\nhttps://lzkjdz-isv.isvjcloud.com/wxShareActivity/activity/activity?activityId=${activityId}】`)
|
||||
for (let i = 0; i < ownCookieNum; i++) {
|
||||
if (cookiesArr[i]) {
|
||||
cookie = cookiesArr[i]
|
||||
@@ -68,13 +86,14 @@ if ($.isNode()) {
|
||||
$.activityShopId = ''
|
||||
$.activityUrl = `https://lzkjdz-isv.isvjcloud.com/wxShareActivity/activity/${$.authorNum}?activityId=${$.activityId}&friendUuid=${encodeURIComponent($.authorCode)}&shareuserid4minipg=null&shopid=${$.activityShopId}`
|
||||
await share();
|
||||
await $.wait(1000)
|
||||
activityShopId = $.venderId;
|
||||
}
|
||||
}
|
||||
isGetAuthorCodeList = false;
|
||||
console.log('需要助力助力码')
|
||||
console.log(authorCodeList)
|
||||
for (let i = 0; i < cookiesArr.length; i++) {
|
||||
for (let i = 0; i < helpCookieNum; i++) {
|
||||
if (cookiesArr[i]) {
|
||||
cookie = cookiesArr[i]
|
||||
originCookie = cookiesArr[i]
|
||||
@@ -82,7 +101,7 @@ if ($.isNode()) {
|
||||
$.index = i + 1;
|
||||
$.isLogin = true;
|
||||
$.nickName = '';
|
||||
$.errorMessage = ''
|
||||
$.errorMessage = ''
|
||||
await checkCookie();
|
||||
console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`);
|
||||
if (!$.isLogin) {
|
||||
@@ -105,15 +124,14 @@ if ($.isNode()) {
|
||||
for(let i in authorCodeList){
|
||||
$.authorCode = authorCodeList[i]
|
||||
console.log('去助力: '+$.authorCode)
|
||||
|
||||
await share();
|
||||
await $.wait(1000)
|
||||
if ($.errorMessage === '活动太火爆,还是去买买买吧') {
|
||||
break
|
||||
}
|
||||
// await $.wait(2000)
|
||||
|
||||
}
|
||||
}
|
||||
// await $.wait(2000)
|
||||
}
|
||||
for (let i = 0; i < ownCookieNum; i++) {
|
||||
if (cookiesArr[i]) {
|
||||
@@ -128,7 +146,7 @@ if ($.isNode()) {
|
||||
$.activityId = activityId
|
||||
$.activityShopId = activityShopId
|
||||
await getPrize();
|
||||
// await $.wait(2000)
|
||||
await $.wait(2000)
|
||||
}
|
||||
}
|
||||
})()
|
||||
@@ -149,7 +167,7 @@ async function share() {
|
||||
if ($.token) {
|
||||
await getMyPing();
|
||||
if ($.secretPin) {
|
||||
await $.wait(500)
|
||||
await $.wait(2000)
|
||||
await task('common/accessLogWithAD', `venderId=${$.activityShopId}&code=25&pin=${encodeURIComponent($.secretPin)}&activityId=${$.activityId}&pageUrl=${$.activityUrl}&subType=app&adSource=null`, 1);
|
||||
await task('activityContent', `activityId=${$.activityId}&pin=${encodeURIComponent($.secretPin)}&friendUuid=${encodeURIComponent($.authorCode)}`)
|
||||
} else {
|
||||
@@ -239,7 +257,7 @@ function taskUrl(function_id, body, isCommon) {
|
||||
'User-Agent': `jdapp;iPhone;9.5.4;13.6;${$.UUID};network/wifi;ADID/${$.ADID};model/iPhone10,3;addressid/0;appBuild/167668;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1`,
|
||||
Connection: 'keep-alive',
|
||||
Referer: $.activityUrl,
|
||||
Cookie: $.cookie
|
||||
Cookie: cookie
|
||||
},
|
||||
body: body
|
||||
|
||||
@@ -349,7 +367,7 @@ function getFirstLZCK() {
|
||||
}
|
||||
}
|
||||
}
|
||||
$.cookie = cookie
|
||||
$.cookie = cookie
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
|
||||
Reference in New Issue
Block a user