mirror of
https://github.com/6dylan6/jdpro.git
synced 2026-03-22 11:18:59 +00:00
1
This commit is contained in:
parent
279da4b97d
commit
b9622b2274
@ -673,14 +673,13 @@ async function showMsg() {
|
||||
|
||||
ReturnMessage += `【账号信息】`;
|
||||
if ($.isPlusVip) {
|
||||
ReturnMessage += `Plus会员`;
|
||||
if ($.PlustotalScore)
|
||||
ReturnMessage += `(${$.PlustotalScore}分)`
|
||||
ReturnMessage += `Plus会员`;
|
||||
} else {
|
||||
ReturnMessage += `普通会员`;
|
||||
if ($.PlustotalScore)
|
||||
ReturnMessage += `(${$.PlustotalScore}分)`
|
||||
}
|
||||
}
|
||||
if ($.PlustotalScore)
|
||||
ReturnMessage += `(${$.PlustotalScore}分)`
|
||||
|
||||
ReturnMessage += `,京享值${$.JingXiang}\n`;
|
||||
}else{
|
||||
ReturnMessageTitle+= `\n`;
|
||||
@ -1273,54 +1272,57 @@ function getJingBeanBalanceDetail(page) {
|
||||
|
||||
function jingBeanDetail() {
|
||||
return new Promise(async resolve => {
|
||||
setTimeout(async () => {
|
||||
var strsign ="";
|
||||
if (epsignurl){
|
||||
strsign = await getepsign('jingBeanDetail', { "pageSize": "20", "page": "1" });
|
||||
strsign=strsign.body;
|
||||
}
|
||||
else
|
||||
strsign = await getSignfromNolan('jingBeanDetail', { "pageSize": "20", "page": "1" });
|
||||
|
||||
const options = {
|
||||
"url": `https://api.m.jd.com/client.action?functionId=jingBeanDetail`,
|
||||
"body": strsign,
|
||||
"headers": {
|
||||
'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
|
||||
'Host': 'api.m.jd.com',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Cookie': cookie,
|
||||
}
|
||||
}
|
||||
$.post(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} jingBeanDetail API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (data) {
|
||||
data = JSON.parse(data);
|
||||
if (data?.others?.jingBeanExpiringInfo?.detailList) {
|
||||
const { detailList = [] } = data?.others?.jingBeanExpiringInfo;
|
||||
detailList.map(item => {
|
||||
strGuoqi+=`【${(item['eventMassage']).replace("即将过期京豆","").replace("年","-").replace("月","-").replace("日","")}】过期${item['amount']}豆\n`;
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log(`jingBeanDetail 京东服务器返回空数据`)
|
||||
}
|
||||
setTimeout(async () => {
|
||||
var strsign = "";
|
||||
if (epsignurl) {
|
||||
strsign = await getepsign('jingBeanDetail', { "pageSize": "20", "page": "1" });
|
||||
strsign = strsign.body;
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
}, 0 * 1000);
|
||||
else
|
||||
strsign = await getSignfromNolan('jingBeanDetail', { "pageSize": "20", "page": "1" });
|
||||
|
||||
const options = {
|
||||
"url": `https://api.m.jd.com/client.action?functionId=jingBeanDetail`,
|
||||
"body": strsign,
|
||||
"headers": {
|
||||
'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
|
||||
'Host': 'api.m.jd.com',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Cookie': cookie,
|
||||
}
|
||||
}
|
||||
$.post(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} jingBeanDetail API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (data) {
|
||||
data = JSON.parse(data);
|
||||
if (data?.others?.jingBeanExpiringInfo?.detailList) {
|
||||
const { detailList = [] } = data?.others?.jingBeanExpiringInfo;
|
||||
detailList.map(item => {
|
||||
strGuoqi += `【${(item['eventMassage']).replace("即将过期京豆", "").replace("年", "-").replace("月", "-").replace("日", "")}】过期${item['amount']}豆\n`;
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log(`jingBeanDetail 京东服务器返回空数据`)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
if (epsignurl)
|
||||
$.logErr(e, resp)
|
||||
else
|
||||
console.log("因为没有指定带ep的Sign,获取过期豆子信息次数多了就会失败.")
|
||||
} finally {
|
||||
resolve(data);
|
||||
}
|
||||
})
|
||||
}, 0 * 1000);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function getepsign(n, o, t = "sign") {
|
||||
function getepsign(n, o, t = "sign") {
|
||||
let e = {
|
||||
url: epsignurl,
|
||||
form: {
|
||||
@ -1569,7 +1571,8 @@ function getCoupon() {
|
||||
|
||||
var decquota=parseFloat(useable[i].quota).toFixed(2);
|
||||
var decdisc= parseFloat(useable[i].discount).toFixed(2);
|
||||
|
||||
if (useable[i].quota>useable[i].discount+5 && useable[i].discount<2)
|
||||
continue
|
||||
$.message += `【全品类券】满${decquota}减${decdisc}元`;
|
||||
|
||||
if (useable[i].endTime < $.todayEndTime) {
|
||||
@ -2014,8 +2017,6 @@ function GetDateTime(date) {
|
||||
}
|
||||
|
||||
async function queryScores() {
|
||||
//if (!$.isPlusVip)
|
||||
// return
|
||||
let res = ''
|
||||
let url = {
|
||||
url: `https://rsp.jd.com/windControl/queryScore/v1?lt=m&an=plus.mobile&stamp=${Date.now()}`,
|
||||
|
||||
24
jd_dplh0618.js
Normal file
24
jd_dplh0618.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user