mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-05-07 03:48:44 +08:00
Update jd_bean_change.js
This commit is contained in:
parent
d931620861
commit
82a2f53b47
@ -334,6 +334,15 @@ if(DisableIndex!=-1){
|
|||||||
EnableCheckBean=false
|
EnableCheckBean=false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//点点券
|
||||||
|
let EnableCoupon=true;
|
||||||
|
DisableIndex=strDisableList.findIndex((item) => item === "点点券");
|
||||||
|
if(DisableIndex!=-1){
|
||||||
|
console.log("检测到设定关闭点点券查询");
|
||||||
|
EnableCoupon=false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
!(async() => {
|
!(async() => {
|
||||||
if (!cookiesArr[0]) {
|
if (!cookiesArr[0]) {
|
||||||
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {
|
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {
|
||||||
@ -361,7 +370,6 @@ if(DisableIndex!=-1){
|
|||||||
$.balance = 0;
|
$.balance = 0;
|
||||||
$.expiredBalance = 0;
|
$.expiredBalance = 0;
|
||||||
$.JdzzNum = 0;
|
$.JdzzNum = 0;
|
||||||
$.JdMsScore = 0;
|
|
||||||
$.JdFarmProdName = '';
|
$.JdFarmProdName = '';
|
||||||
$.JdtreeEnergy = 0;
|
$.JdtreeEnergy = 0;
|
||||||
$.JdtreeTotalEnergy = 0;
|
$.JdtreeTotalEnergy = 0;
|
||||||
@ -400,9 +408,10 @@ if(DisableIndex!=-1){
|
|||||||
$.PlustotalScore=0;
|
$.PlustotalScore=0;
|
||||||
$.CheckTime="";
|
$.CheckTime="";
|
||||||
$.beanCache=0;
|
$.beanCache=0;
|
||||||
|
|
||||||
TempBaipiao = "";
|
TempBaipiao = "";
|
||||||
strGuoqi="";
|
strGuoqi="";
|
||||||
|
$.CoupontotalAmount=0;
|
||||||
|
|
||||||
console.log(`******开始查询【京东账号${$.index}】${$.nickName || $.UserName}*********`);
|
console.log(`******开始查询【京东账号${$.index}】${$.nickName || $.UserName}*********`);
|
||||||
await TotalBean();
|
await TotalBean();
|
||||||
//await TotalBean2();
|
//await TotalBean2();
|
||||||
@ -493,6 +502,7 @@ if(DisableIndex!=-1){
|
|||||||
GetJxBeaninfo(), //喜豆查询
|
GetJxBeaninfo(), //喜豆查询
|
||||||
GetPigPetInfo(), //金融养猪
|
GetPigPetInfo(), //金融养猪
|
||||||
GetJoyRuninginfo(), //汪汪赛跑
|
GetJoyRuninginfo(), //汪汪赛跑
|
||||||
|
getCouponConfig(), //点点券
|
||||||
queryScores()
|
queryScores()
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -853,33 +863,12 @@ async function showMsg() {
|
|||||||
if ($.JdzzNum) {
|
if ($.JdzzNum) {
|
||||||
ReturnMessage += `【京东赚赚】${$.JdzzNum}币(≈${($.JdzzNum / 10000).toFixed(2)}元)\n`;
|
ReturnMessage += `【京东赚赚】${$.JdzzNum}币(≈${($.JdzzNum / 10000).toFixed(2)}元)\n`;
|
||||||
}
|
}
|
||||||
if ($.JdMsScore != 0) {
|
|
||||||
ReturnMessage += `【京东秒杀】${$.JdMsScore}币(≈${($.JdMsScore / 1000).toFixed(2)}元)\n`;
|
|
||||||
}
|
|
||||||
if($.ECardinfo)
|
if($.ECardinfo)
|
||||||
ReturnMessage += `【礼卡余额】${$.ECardinfo}\n`;
|
ReturnMessage += `【礼卡余额】${$.ECardinfo}\n`;
|
||||||
|
|
||||||
if ($.joylevel || $.jdCash || $.JoyRunningAmount) {
|
if ($.JoyRunningAmount)
|
||||||
ReturnMessage += `【其他信息】`;
|
ReturnMessage += `【汪汪赛跑】${$.JoyRunningAmount}元\n`;
|
||||||
if ($.joylevel) {
|
|
||||||
ReturnMessage += `汪汪:${$.joylevel}级`;
|
|
||||||
}
|
|
||||||
if ($.jdCash) {
|
|
||||||
if ($.joylevel) {
|
|
||||||
ReturnMessage += ",";
|
|
||||||
}
|
|
||||||
ReturnMessage += `领现金:${$.jdCash}元`;
|
|
||||||
}
|
|
||||||
if ($.JoyRunningAmount) {
|
|
||||||
if ($.joylevel || $.jdCash) {
|
|
||||||
ReturnMessage += ",";
|
|
||||||
}
|
|
||||||
ReturnMessage += `汪汪赛跑:${$.JoyRunningAmount}元`;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnMessage += `\n`;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($.JdFarmProdName != "") {
|
if ($.JdFarmProdName != "") {
|
||||||
if ($.JdtreeEnergy != 0) {
|
if ($.JdtreeEnergy != 0) {
|
||||||
@ -1000,6 +989,28 @@ async function showMsg() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($.joylevel || $.jdCash || $.CoupontotalAmount) {
|
||||||
|
ReturnMessage += `【其他信息】`;
|
||||||
|
if ($.joylevel) {
|
||||||
|
ReturnMessage += `汪汪:${$.joylevel}级`;
|
||||||
|
}
|
||||||
|
if ($.jdCash) {
|
||||||
|
if ($.joylevel) {
|
||||||
|
ReturnMessage += ",";
|
||||||
|
}
|
||||||
|
ReturnMessage += `领现金:${$.jdCash}元`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.CoupontotalAmount) {
|
||||||
|
if ($.joylevel || $.jdCash) {
|
||||||
|
ReturnMessage += ",";
|
||||||
|
}
|
||||||
|
ReturnMessage += `点点券:${$.CoupontotalAmount}元`;
|
||||||
|
}
|
||||||
|
ReturnMessage += `\n`;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if(strGuoqi){
|
if(strGuoqi){
|
||||||
ReturnMessage += `💸💸💸临期京豆明细💸💸💸\n`;
|
ReturnMessage += `💸💸💸临期京豆明细💸💸💸\n`;
|
||||||
ReturnMessage += `${strGuoqi}`;
|
ReturnMessage += `${strGuoqi}`;
|
||||||
@ -1291,41 +1302,102 @@ function apptaskUrl(functionId = "", body = "") {
|
|||||||
timeout: 10000
|
timeout: 10000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getSign(functionId, body) {
|
|
||||||
|
async function getCouponConfig() {
|
||||||
|
if (!EnableCoupon)
|
||||||
|
return;
|
||||||
|
let functionId = `getCouponConfig`;
|
||||||
|
let body = {
|
||||||
|
"childActivityUrl": "openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"couponCenter\"}",
|
||||||
|
"incentiveShowTimes": 0,
|
||||||
|
"monitorRefer": "",
|
||||||
|
"monitorSource": "ccresource_android_index_config",
|
||||||
|
"pageClickKey": "Coupons_GetCenter",
|
||||||
|
"rewardShowTimes": 0,
|
||||||
|
"sourceFrom": "1"
|
||||||
|
}
|
||||||
|
let sign = await getSign(functionId, body);
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
let data = {
|
$.post(CoupontaskUrl(functionId, sign), async(err, resp, data) => {
|
||||||
functionId,
|
|
||||||
body: JSON.stringify(body),
|
|
||||||
"client":"apple",
|
|
||||||
"clientVersion":"10.3.0"
|
|
||||||
}
|
|
||||||
let HostArr = ['jdsign.cf', 'signer.nz.lu']
|
|
||||||
let Host = HostArr[Math.floor((Math.random() * HostArr.length))]
|
|
||||||
let options = {
|
|
||||||
url: `https://cdn.nz.lu/ddo`,
|
|
||||||
body: JSON.stringify(data),
|
|
||||||
headers: {
|
|
||||||
Host,
|
|
||||||
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
|
|
||||||
},
|
|
||||||
timeout: 30 * 1000
|
|
||||||
}
|
|
||||||
$.post(options, (err, resp, data) => {
|
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(JSON.stringify(err))
|
console.log(`${JSON.stringify(err)}`);
|
||||||
console.log(`${$.name} getSign API请求失败,请检查网路重试`)
|
console.log(`${$.name} getCouponConfig API请求失败,请检查网路重试`);
|
||||||
} else {
|
} else {
|
||||||
|
if (data) {
|
||||||
|
data = JSON.parse(data);
|
||||||
|
if (data?.result?.couponConfig?.signNecklaceDomain?.roundData?.totalScore)
|
||||||
|
$.CoupontotalAmount = data.result.couponConfig.signNecklaceDomain.roundData.totalScore;
|
||||||
|
$.CoupontotalAmount=($.CoupontotalAmount/1000).toFixed(2)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$.logErr(e, resp)
|
$.logErr(e, resp)
|
||||||
} finally {
|
} finally {
|
||||||
resolve(data);
|
resolve();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getSign(functionId, body) {
|
||||||
|
var strsign = '';
|
||||||
|
let data = {
|
||||||
|
"fn":functionId,
|
||||||
|
"body": body
|
||||||
|
}
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
let url = {
|
||||||
|
url: 'https://api.nolanstore.top/sign',
|
||||||
|
body: JSON.stringify(data),
|
||||||
|
followRedirect: false,
|
||||||
|
headers: {
|
||||||
|
'Accept': '*/*',
|
||||||
|
"accept-encoding": "gzip, deflate, br",
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
timeout: 30000
|
||||||
|
}
|
||||||
|
$.post(url, async(err, resp, data) => {
|
||||||
|
try {
|
||||||
|
data = JSON.parse(data);
|
||||||
|
if (data && data.body) {
|
||||||
|
if (data.body)
|
||||||
|
strsign = data.body || '';
|
||||||
|
if (strsign != '')
|
||||||
|
resolve(strsign);
|
||||||
|
else
|
||||||
|
console.log("签名获取失败.");
|
||||||
|
} else {
|
||||||
|
console.log("签名获取失败.");
|
||||||
|
}
|
||||||
|
}catch (e) {
|
||||||
|
$.logErr(e, resp);
|
||||||
|
}finally {
|
||||||
|
resolve(strsign);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function CoupontaskUrl(functionId, body) {
|
||||||
|
return {
|
||||||
|
url: `${JD_API_HOST}?functionId=${functionId}`,
|
||||||
|
body,
|
||||||
|
headers: {
|
||||||
|
"Host": "api.m.jd.com",
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"User-Agent": "okhttp/3.12.1;jdmall;android;version/10.1.2;build/89743;screen/1080x2030;os/9;network/wifi;",
|
||||||
|
"Accept": "*/*",
|
||||||
|
"Referer": "https://h5.m.jd.com/rn/42yjy8na6pFsq1cx9MJQ5aTgu3kX/index.html",
|
||||||
|
"Accept-Encoding": "gzip, deflate",
|
||||||
|
"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
|
||||||
|
"Cookie": cookie,
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* function TotalBean() {
|
/* function TotalBean() {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
const options = {
|
const options = {
|
||||||
|
Loading…
Reference in New Issue
Block a user