This commit is contained in:
Faker 2022-07-19 10:27:57 +08:00
parent 7c34d0431e
commit fd0036e477
16 changed files with 1869 additions and 405 deletions

View File

@ -9,19 +9,13 @@
变量
## 入会开卡
//export VENDER_ID=""
## 最小入会值 默认10
//export OPENCARD_BEAN=""
cron:10 10 10 10 *
============Quantumultx===============
[task_local]
#入会开卡领取礼包(通用)
1 1 1 1 * jd_OpenCard_Force.js, tag=入会开卡领取礼包(通用), enabled=true
## 最小入会值 默认5
1 1 1 1 1 1 jd_OpenCard_Force.js, tag=入会开卡领取礼包(通用), enabled=true
*/
const $ = new Env('入会开卡领取礼包通用');
const $ = new Env('入会开卡领取礼包');
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
const notify = $.isNode() ? require('./sendNotify') : '';
//IOS等用户直接用NobyDa的jd cookie
@ -29,7 +23,7 @@ CryptoScripts()
$.CryptoJS = $.isNode() ? require('crypto-js') : CryptoJS;
var timestamp = new Date().getTime()
const VENDER_ID = process.env.VENDER_ID || "";
const OPENCARD_BEAN = process.env.OPENCARD_BEAN || "10";
const OPENCARD_BEAN = process.env.OPENCARD_BEAN || "5";
let cookiesArr = [],
cookie = '';

1096
jd_cjzdgf.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,16 @@
/*
店铺签到
15 2,14 * * * jd_dpqd.js
店铺签到各类店铺签到有新的店铺直接添加token即可
============Quantumultx===============
[task_local]
#店铺签到
15 2,14 * * * https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js, tag=店铺签到, enabled=true
===========Loon============
[Script]
cron "15 2,14 * * *" script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js,tag=店铺签到
============Surge=============
店铺签到 = type=cron,cronexp="15 2,14 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.js
===========小火箭========
店铺签到 = type=cron,script-path=https://raw.githubusercontent.com/shufflewzc/faker2/main/jd_shop_sign.jss, cronexpr="15 2,14 * * *", timeout=3600, enable=true
*/
const $ = new Env('店铺签到');
const notify = $.isNode() ? require('./sendNotify') : '';
@ -15,20 +25,17 @@ let vender=''
let num=0
let shopname=''
const token = [
"374951B8D50E5D4E01E40153413F00E9",
"7B5E686A0CAF1C144620A3FFE04AFF1E",
"44C33E9D3144110A9FEE634A4888D31B",
"3949F55A02AA8A345409AFD9821C861F",
"C387DE3A3F4381FB3E451F0C40069FE6",
"05451231AF1DE95AC10FC3A56C3F8A73",
"A92269DC92DDD73CC5EB38B3BACF51E3",
"94C7B64A6137E339AAA79DC3A6465C1B",
"2ED2F283E4640130BA5128E8BBDC3DDA",
"1DD46671387EAC6FDC14B753E01D5E30",
"BD0D2682B13A75E0AAF7D8E78844F07C",
"662E62C629FB6B20CED938E41A0DC026",
"F573A078062F9F18BFCC39080864D7F5",
"D7DCB5D6D847EB0167C2B0A180B95F68",
"D9831E95344C483C6B6B7D8FB314E0D7",
"582EA3EA048A3D49961766498A136F9C",
"2B9B07D1D14E821744F7BA63F94CD6F2",
"67D2D5824D043A5C2EA9C53B900B932C",
@ -38,8 +45,6 @@ const token = [
"205E1E703925C48276C0DEBF16C6CBAD",
"D35923E942C11178C38BD29E783695B8",
"921478C146E5C60F2444E3978AC8E94F",
"F327D3978F47808803FD532F19BE3696",
"DCD4903E0278DBA70A302612F411876F",
"DB872465EDEB653BB501819F9B9DD326",
"D4BE8025929E6D662FBCB9F946BF4215",
"BC28601FD2C5B9A5D50038825C842358"
@ -73,7 +78,7 @@ if ($.isNode()) {
$.isLogin = true;
$.nickName = '';
message = '';
await TotalBean();
//await TotalBean();
console.log(`\n******开始【京东账号${$.index}${$.nickName || $.UserName}*********\n`);
if (!$.isLogin) {
$.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"});

78
jd_opencardDPLHTY.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

467
jd_share2.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,5 @@
/*
2 10 7 6 * m_jd_fav_shop_gift.js
*/
let mode = __dirname.includes('magic')
const {Env} = mode ? require('./function/magic') : require('./function/magic')
const {Env} = mode ? require('./magic') : require('./magic')
const $ = new Env('M收藏有礼');
$.favShopArgv = process.env.M_FAV_SHOP_ARGV
? process.env.M_FAV_SHOP_ARGV
@ -67,7 +63,7 @@ $.logic = async function () {
}
await DelShopFav()
};
$.run({wait: [300, 1000],whitelist: ['1-5']})
$.run({wait: [300, 1000],whitelist: ['1-99']})
.catch(reason => $.log(reason))
async function GiveShopGift() {

View File

@ -1,5 +1,5 @@
/*
7 7 7 7 7 m_jd_follow_shop.js
1 1 1 1 1 1 m_jd_follow_shop.js
*/
let mode = __dirname.includes('magic')
const {Env} = mode ? require('./magic') : require('./magic')
@ -59,7 +59,7 @@ $.after = async function () {
$.msg.push($.activityUrl);
}
}
$.run({whitelist: ['1-5'], wait: [1000, 3000]}).catch(reason => $.log(reason))
$.run({whitelist: ['1-99'], wait: [1000, 3000]}).catch(reason => $.log(reason))
async function drawShopGift() {
$.log('店铺信息', $.shopId, $.venderId, $.activityId)
@ -122,4 +122,3 @@ async function getShopHomeActivityInfo() {
let {status, data} = await $.request(url, headers, newVar.sign);
return data;
}

View File

@ -1,7 +1,10 @@
//问题反馈:https://t.me/Wall_E_Channel
/*
7 7 7 7 7 m_jd_wx_addCart.js
1 1 1 1 * m_jd_wx_addCart.js, tag=M加购有礼, enabled=true
*/
//问题反馈:https://t.me/Wall_E_Channel
let mode = __dirname.includes('magic')
const {Env} = mode ? require('./magic') : require('./magic')
const $ = new Env('M加购有礼');
@ -178,5 +181,5 @@ $.after = async function () {
|| ''}\n`);
$.msg.push($.activityUrl)
}
$.run({whitelist: ['1-5'], wait: [3000, 5000]}).catch(
$.run({whitelist: ['1-99'], wait: [3000, 5000]}).catch(
reason => $.log(reason));

View File

@ -1,51 +1,48 @@
//问题反馈:https://t.me/Wall_E_Channel
/*
7 7 7 7 7 m_jd_wx_collectCard.js
cron:1 1 1 1 1 1
*/
let mode = __dirname.includes('magic')
const {Env} = mode ? require('./magic') : require('./magic')
const $ = new Env('M集卡抽奖');
$.lz = 'LZ_TOKEN_KEY=lztokef1eb8494b0af868bd18bdaf8;LZ_TOKEN_VALUE=Aa5RE8RuY4X3zA==;';
$.activityUrl = process.env.M_WX_COLLECT_CARD_URL
? process.env.M_WX_COLLECT_CARD_URL
: '';
//最多几个集卡的,其余只助力
let leaders = process.env.M_WX_COLLECT_CARD_LEADERS
? process.env.M_WX_COLLECT_CARD_LEADERS * 1
: 5;
if (mode) {
$.activityUrl = 'https://lzkjdz-isv.isvjcloud.com/wxCollectCard/activity/2149304?activityId=84a8b50d3a0c48f9bc7804be9da5deac'
$.activityUrl = 'https://lzkjdz-isv.isvjcloud.com/wxCollectCard/activity/1193422?activityId=cb4d9c7ca992427db5a52ec1c0bcc42e'
$.activityUrl = 'https://lzkjdz-isv.isvjcloud.com/wxCollectCard/activity/3839759?activityId=2a47604ff73b47b5b432a06dc2226b70'
}
$.activityUrl = $.match(
/(https?:\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|])/,
$.activityUrl)
$.domain = $.match(/https?:\/\/([^/]+)/, $.activityUrl)
$.activityId = $.getQueryString($.activityUrl, 'activityId')
$.shareUuid = ''
let stop = false;
let shopInfo = ''
$.s = 1
const all = new Set();
$.logic = async function () {
if (stop) {
return;
}
$.activityUrl = $.activityUrl.replace("#","&")
$.activityId = $.getQueryString($.activityUrl, 'activityId')
if (!$.activityId || !$.activityUrl) {
stop = true;
$.putMsg(`activityId|activityUrl不存在`);
$.log(`活动id不存在`);
return
}
$.log(`活动url: ${$.activityUrl} ${await $._algo() || ""}`)
$.UA = $.ua();
let token = await $.isvObfuscator();
$.log(`活动id: ${$.activityId}`, `活动url: ${$.activityUrl}`)
$.domain = $.activityUrl.match(/https?:\/\/([^/]+)/) && $.activityUrl.match(
/https?:\/\/([^/]+)/)[1] || ''
$.UA = `jdapp;iPhone;10.2.2;13.1.2;${$.uuid()};M/5.0;network/wifi;ADID/;model/iPhone8,1;addressid/2308460611;appBuild/167863;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1;`
await getLzToken()
$.domain.includes('lzkj-isv.isvjcloud.com') ? await api(
'wxCommonInfo/initActInfo', `activityId=${$.activityId}`) : ''
let token = await getToken();
if (token.code !== '0') {
$.putMsg(`获取Token失败`);
return
}
$.Token = token?.token
let actInfo = await $.api('customer/getSimpleActInfoVo',
let actInfo = await api('customer/getSimpleActInfoVo',
`activityId=${$.activityId}`);
if (!actInfo.result || !actInfo.data) {
$.log(`获取活动信息失败`);
@ -55,17 +52,15 @@ $.logic = async function () {
$.shopId = actInfo.data.shopId;
$.activityType = actInfo.data.activityType;
let myPing = await $.api('customer/getMyPing',
let myPing = await api('customer/getMyPing',
`userId=${$.venderId}&token=${$.Token}&fromType=APP`)
if (!myPing.result) {
$.putMsg(`获取pin失败`);
return
}
$.Pin = $.domain.includes('cjhy') ? encodeURIComponent(
encodeURIComponent(myPing.data.secretPin)) : encodeURIComponent(
myPing.data.secretPin);
$.Pin = myPing.data.secretPin;
shopInfo = await $.api(`wxCollectCard/shopInfo`,
shopInfo = await api(`wxCollectCard/shopInfo`,
`activityId=${$.activityId}`);
if (!shopInfo.result) {
$.putMsg('获取不到店铺信息,结束运行')
@ -73,17 +68,16 @@ $.logic = async function () {
}
$.shopName = shopInfo?.data?.shopName
await $.api(
await api(
`common/${$.domain.includes('cjhy') ? 'accessLog' : 'accessLogWithAD'}`,
`venderId=${$.venderId}&code=${$.activityType}&pin=${
$.Pin}&activityId=${$.activityId}&pageUrl=${encodeURIComponent(
$.activityUrl)}&subType=app&adSource=`);
`venderId=${$.venderId}&code=${$.activityType}&pin=${encodeURIComponent(
$.Pin)}&activityId=${$.activityId}&pageUrl=${$.activityUrl}&subType=app&adSource=`);
$.index > 1 ? $.log(`去助力${$.shareUuid}`) : ''
let activityContent = await $.api(
let activityContent = await api(
'wxCollectCard/activityContent',
`activityId=${$.activityId}&pin=${
$.Pin}&uuid=${$.shareUuid}`);
`activityId=${$.activityId}&pin=${encodeURIComponent(
$.Pin)}&uuid=${$.shareUuid}`);
if (!activityContent.result && !activityContent.data) {
$.putMsg(activityContent.errorMessage || '活动可能已结束')
return
@ -93,41 +87,17 @@ $.logic = async function () {
&& $.match(/每人每天可获得(\d+)次/, activityContent.data.rule) * 1 || 5
console.log('openCard', activityContent.data.openCard);
$.shareUuid = $.shareUuid || activityContent.data.uuid
if ($.index % 5 === 0) {
$.log('执行可持续发展之道')
await $.wait(1000, 6000)
}
let drawContent = await $.api('wxCollectCard/drawContent',
let drawContent = await api('wxCollectCard/drawContent',
`activityId=${$.activityId}`);
if (drawContent.result && drawContent.data) {
$.content = drawContent.data.content || []
}
let memberInfo = await $.api($.domain.includes('cjhy')
? 'mc/new/brandCard/common/shopAndBrand/getOpenCardInfo'
: 'wxCommonInfo/getActMemberInfo',
$.domain.includes('cjhy')
? `venderId=${$.venderId}&buyerPin=${$.Pin}&activityType=${$.activityType}`
:
`venderId=${$.venderId}&activityId=${$.activityId}&pin=${
$.Pin}`);
//没开卡 需要开卡
if ($.domain.includes('cjhy')) {
//没开卡 需要开卡
if (memberInfo.result && !memberInfo.data?.openCard
&& memberInfo.data?.openCardLink) {
$.putMsg('需要开卡,跳过')
return
}
} else {
if (memberInfo.result && !memberInfo.data?.openCard
&& memberInfo.data?.actMemberStatus === 1) {
$.putMsg('需要开卡,跳过')
return
}
}
debugger
$.shareUuid = $.shareUuid || activityContent.data.uuid
let userInfo = await $.api('wxActionCommon/getUserInfo',
`pin=${$.Pin}`);
let userInfo = await api('wxActionCommon/getUserInfo',
`pin=${encodeURIComponent($.Pin)}`);
if (!userInfo.result || !userInfo.data) {
$.putMsg(`获取getUserInfo失败`);
return
@ -136,33 +106,24 @@ $.logic = async function () {
$.attrTouXiang = userInfo.data.yunMidImageUrl
|| 'https://img10.360buyimg.com/imgzone/jfs/t1/21383/2/6633/3879/5c5138d8E0967ccf2/91da57c5e2166005.jpg'
await $.api('crm/pageVisit/insertCrmPageVisit',
await api('crm/pageVisit/insertCrmPageVisit',
`venderId=${$.venderId}&elementId=${encodeURIComponent(
'邀请')}&pageId=${$.activityId}&pin=${$.Pin}`);
await $.api('wxCollectCard/drawCard',
`sourceId=${$.shareUuid}&activityId=${$.activityId}&type=1&pinImg=${encodeURIComponent(
$.attrTouXiang)}&pin=${$.Pin}&jdNick=${encodeURIComponent(
$.nickname)}`);
if ($.index > leaders) {
return
}
let saveSource = await $.api('wxCollectCard/saveSource',
'邀请')}&pageId=${$.activityId}&pin=${encodeURIComponent($.Pin)}`);
let saveSource = await api('wxCollectCard/saveSource',
`activityId=${$.activityId}&pinImg=${encodeURIComponent(
$.attrTouXiang)}&pin=${
$.Pin}&jdNick=${encodeURIComponent($.nickname)}`);
$.attrTouXiang)}&pin=${encodeURIComponent(
$.Pin)}&jdNick=${encodeURIComponent($.nickname)}`);
if (!saveSource.result || !saveSource.data) {
$.putMsg(`初始化shareuuid失败`);
return
}
$.shareUuid = $.shareUuid || saveSource.data
for (let i = 0; i < drawCount; i++) {
let prize = await $.api(`wxCollectCard/drawCard`,
let prize = await api(`wxCollectCard/drawCard`,
`sourceId=${saveSource.data}&activityId=${$.activityId}&type=0`);
$.log(JSON.stringify(prize))
if (prize.result) {
// $.putMsg(prize.data.reward.cardName);
$.putMsg(prize.data.reward.cardName);
} else {
if (prize.errorMessage.includes('上限')) {
$.putMsg('上限');
@ -175,24 +136,24 @@ $.logic = async function () {
}
$.log(`${prize}`);
}
await $.api('crm/pageVisit/insertCrmPageVisit',
await api('crm/pageVisit/insertCrmPageVisit',
`venderId=${$.venderId}&elementId=${encodeURIComponent(
'抽卡')}&pageId=${$.activityId}&pin=${
$.Pin}`);
'抽卡')}&pageId=${$.activityId}&pin=${encodeURIComponent(
$.Pin)}`);
await $.wait(1000,2000)
}
activityContent = await $.api(
activityContent = await api(
'wxCollectCard/activityContent',
`activityId=${$.activityId}&pin=${
$.Pin}&uuid=${$.shareUuid}`);
if (!activityContent.result || !activityContent.data) {
`activityId=${$.activityId}&pin=${encodeURIComponent(
$.Pin)}&uuid=${$.shareUuid}`);
if (!activityContent.result && !activityContent.data) {
$.putMsg(activityContent.errorMessage || '活动可能已结束')
return
}
if (activityContent.data.canDraw) {
let prize = await $.api(`wxCollectCard/getPrize`,
`activityId=${$.activityId}&pin=${$.Pin}`);
let prize = await api(`wxCollectCard/getPrize`,
`activityId=${$.activityId}&pin=${encodeURIComponent($.Pin)}`);
$.log(JSON.stringify(prize))
if (!prize.result) {
let msg = prize.data.drawOk ? prize.data.name
@ -207,11 +168,11 @@ $.logic = async function () {
}
}
} else {
activityContent = await $.api(
activityContent = await api(
'wxCollectCard/activityContent',
`activityId=${$.activityId}&pin=${
$.Pin}&uuid=${$.shareUuid}`);
if (!activityContent.result || !activityContent.data) {
`activityId=${$.activityId}&pin=${encodeURIComponent(
$.Pin)}&uuid=${$.shareUuid}`);
if (!activityContent.result && !activityContent.data) {
$.putMsg(activityContent.errorMessage || '活动可能已结束')
return
}
@ -222,6 +183,7 @@ $.logic = async function () {
}
$.putMsg(Array.from(has).join(','))
}
}
$.after = async function () {
if ($.msg.length > 0) {
@ -237,5 +199,68 @@ $.after = async function () {
$.msg.push($.activityUrl);
}
}
$.run({whitelist: ['1-5'], wait: [1000, 3000]}).catch(
reason => $.log(reason));
$.run().catch(reason => $.log(reason));
async function api(fn, body, isv) {
let url = `https://${$.domain}/${fn}`
let ck = $.lz + ($.Pin && "AUTH_C_USER=" + $.Pin + ";" || "")
ck = isv ? `IsvToken=${$.Token};` + ck : ck;
let headers = {
"Host": $.domain,
"Accept": "application/json",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-cn",
"Connection": "keep-alive",
"Content-Type": "application/x-www-form-urlencoded",
"Origin": `https://${$.domain}`,
"Cookie": ck,
"Referer": `${$.activityUrl}`,
"User-Agent": $.UA
}
let {data} = await $.request(url, headers, body)
$.log(JSON.stringify(data))
await $.wait(200, 300)
return data;
}
async function getToken() {
let url = `https://api.m.jd.com/client.action?functionId=isvObfuscator`
let body = ''
switch ($.domain) {
case 'cjhy-isv.isvjcloud.com':
body = 'body=%7B%22url%22%3A%22https%3A//cjhy-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&uuid=920cd9b12a1e621d91ca2c066f6348bb5d4b586b&client=apple&clientVersion=10.1.4&st=1633916729623&sv=102&sign=9eee1d69b69daf9e66659a049ffe075b'
break
case 'lzkj-isv.isvjcloud.com':
body = 'body=%7B%22url%22%3A%22https%3A//lzkj-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&uuid=925ce6441339525429252488722251fff6b10499&client=apple&clientVersion=10.1.4&st=1633777078141&sv=111&sign=00ed6b6f929625c69f367f1a0e5ad7c7'
break
case 'cjhydz-isv.isvjcloud.com':
body = 'adid=7B411CD9-D62C-425B-B083-9AFC49B94228&area=16_1332_42932_43102&body=%7B%22url%22%3A%22https%3A%5C/%5C/cjhydz-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167541&client=apple&clientVersion=9.4.0&d_brand=apple&d_model=iPhone8%2C1&eid=eidId10b812191seBCFGmtbeTX2vXF3lbgDAVwQhSA8wKqj6OA9J4foPQm3UzRwrrLdO23B3E2wCUY/bODH01VnxiEnAUvoM6SiEnmP3IPqRuO%2By/%2BZo&isBackground=N&joycious=48&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=2f7578cb634065f9beae94d013f172e197d62283&osVersion=13.1.2&partner=apple&rfs=0000&scope=11&screen=750%2A1334&sign=60bde51b4b7f7ff6e1bc1f473ecf3d41&st=1613720203903&sv=110&uts=0f31TVRjBStG9NoZJdXLGd939Wv4AlsWNAeL1nxafUsZqiV4NLsVElz6AjC4L7tsnZ1loeT2A8Z5/KfI/YoJAUfJzTd8kCedfnLG522ydI0p40oi8hT2p2sNZiIIRYCfjIr7IAL%2BFkLsrWdSiPZP5QLptc8Cy4Od6/cdYidClR0NwPMd58K5J9narz78y9ocGe8uTfyBIoA9aCd/X3Muxw%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D&wifiBssid=9cf90c586c4468e00678545b16176ed2'
break
default:
body = 'adid=7B411CD9-D62C-425B-B083-9AFC49B94228&area=16_1332_42932_43102&body=%7B%22url%22%3A%22https%3A%5C/%5C/cjhydz-isv.isvjcloud.com%22%2C%22id%22%3A%22%22%7D&build=167541&client=apple&clientVersion=9.4.0&d_brand=apple&d_model=iPhone8%2C1&eid=eidId10b812191seBCFGmtbeTX2vXF3lbgDAVwQhSA8wKqj6OA9J4foPQm3UzRwrrLdO23B3E2wCUY/bODH01VnxiEnAUvoM6SiEnmP3IPqRuO%2By/%2BZo&isBackground=N&joycious=48&lang=zh_CN&networkType=wifi&networklibtype=JDNetworkBaseAF&openudid=2f7578cb634065f9beae94d013f172e197d62283&osVersion=13.1.2&partner=apple&rfs=0000&scope=11&screen=750%2A1334&sign=60bde51b4b7f7ff6e1bc1f473ecf3d41&st=1613720203903&sv=110&uts=0f31TVRjBStG9NoZJdXLGd939Wv4AlsWNAeL1nxafUsZqiV4NLsVElz6AjC4L7tsnZ1loeT2A8Z5/KfI/YoJAUfJzTd8kCedfnLG522ydI0p40oi8hT2p2sNZiIIRYCfjIr7IAL%2BFkLsrWdSiPZP5QLptc8Cy4Od6/cdYidClR0NwPMd58K5J9narz78y9ocGe8uTfyBIoA9aCd/X3Muxw%3D%3D&uuid=hjudwgohxzVu96krv/T6Hg%3D%3D&wifiBssid=9cf90c586c4468e00678545b16176ed2'
}
let headers = {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-cn",
"Connection": "keep-alive",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "api.m.jd.com",
"Cookie": $.cookie,
"User-Agent": $.UA,
}
let {data} = await $.request(url, headers, body)
return data;
}
async function getLzToken() {
let url = `https://${$.domain}/wxTeam/activity?activityId=${$.activityId}`
return await $.request(url, {
'Accept-Encoding': 'gzip, deflate, br',
'Connection': 'keep-alive',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Mobile/15E148 Safari/604.1",
'Accept-Language': 'zh-cn',
'Cookie': $.cookie
});
}

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,9 @@ let testMode = process.env.TEST_MODE?.includes('on') ? true
let mode = process.env.MODE ? process.env.MODE : "local"
let apiToken = process.env.M_API_TOKEN ? process.env.M_API_TOKEN : ""
let apiSignUrl = process.env.M_API_SIGN_URL ? process.env.M_API_SIGN_URL : "http://ailoveu.eu.org:19840/sign"
let wxBlackCookiePin = process.env.M_WX_BLACK_COOKIE_PIN
? process.env.M_WX_BLACK_COOKIE_PIN : ''
@ -851,14 +854,13 @@ class Env {
async sign(fn, body = {}) {
let b = {"fn": fn, "body": body};
let h = {"key": "fMQ8sw1y5zF4RZgT"}
let h = {"token": apiToken}
try {
let {data} = await this.request(`http://140.238.59.174:17840/sign`,
h, b);
let {data} = await this.request(apiSignUrl, h, b);
console.log(data)
return {fn: data.fn, sign: data.body};
} catch (e) {
console.log("sign接口异常")
//console.log("请自行配置sign实现")
}
return {fn: "", sign: ""};
}