mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
update
This commit is contained in:
parent
cdd12f8f6c
commit
de9d17caa7
344
jd_618_red.js
Normal file
344
jd_618_red.js
Normal file
File diff suppressed because one or more lines are too long
@ -115,13 +115,12 @@ function getCart_xh() {
|
||||
}
|
||||
$.get(option, async (err, resp, data) => {
|
||||
try {
|
||||
let content = getSubstr(data, "window.cartData = ", "window._PFM_TIMING").replace(/\s*/g, "");
|
||||
data = JSON.parse(content);
|
||||
data = JSON.parse(data.match(/window\.cartData = ([^;]*)/)[1])
|
||||
$.areaId = data.areaId; // locationId的传值
|
||||
$.traceId = data.traceId; // traceid的传值
|
||||
venderCart = data.cart.venderCart;
|
||||
postBody = 'pingouchannel=0&commlist=';
|
||||
$.beforeRemove = data.cartJson.num
|
||||
$.beforeRemove = data.cart.currentCount ? data.cart.currentCount : 0;
|
||||
console.log(`获取到购物车数据 ${$.beforeRemove} 条`)
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
@ -205,13 +204,6 @@ function removeCart() {
|
||||
})
|
||||
}
|
||||
|
||||
function getSubstr(str, leftStr, rightStr) {
|
||||
let left = str.indexOf(leftStr);
|
||||
let right = str.indexOf(rightStr, left);
|
||||
if (left < 0 || right < left) return '';
|
||||
return str.substring(left + leftStr.length, right);
|
||||
}
|
||||
|
||||
function TotalBean() {
|
||||
return new Promise(async resolve => {
|
||||
const options = {
|
||||
|
@ -170,65 +170,6 @@ function getJxFactory(){
|
||||
})
|
||||
}
|
||||
|
||||
function getJxNc(){
|
||||
const JXNC_API_HOST = "https://wq.jd.com/";
|
||||
|
||||
function JXNC_taskurl(function_path, body) {
|
||||
return {
|
||||
url: `${JXNC_API_HOST}cubeactive/farm/${function_path}?${body}&farm_jstoken=&phoneid=×tamp=&sceneval=2&g_login_type=1&_=${Date.now()}&g_ty=ls`,
|
||||
headers: {
|
||||
Cookie: cookie,
|
||||
Accept: `*/*`,
|
||||
Connection: `keep-alive`,
|
||||
Referer: `https://st.jingxi.com/pingou/dream_factory/index.html`,
|
||||
'Accept-Encoding': `gzip, deflate, br`,
|
||||
Host: `wq.jd.com`,
|
||||
'Accept-Language': `zh-cn`,
|
||||
"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")
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/* return new Promise(resolve => {
|
||||
$.get(
|
||||
JXNC_taskurl('query', `type=1`),
|
||||
async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`);
|
||||
console.log(`京喜农场 API请求失败,请检查网路重试`);
|
||||
} else {
|
||||
data = data.match(/try\{Query\(([\s\S]*)\)\;\}catch\(e\)\{\}/)[1];
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data["ret"] === 0) {
|
||||
if (data.active) {
|
||||
let shareCodeJson = {
|
||||
'smp': data.smp,
|
||||
'active': data.active,
|
||||
'joinnum': data.joinnum,
|
||||
};
|
||||
console.log(`注意:京喜农场 种植种子发生变化的时候,互助码也会变!!`);
|
||||
console.log(`【京东账号${$.index}(${$.UserName})京喜农场】` + JSON.stringify(shareCodeJson));
|
||||
} else {
|
||||
console.log(`【京东账号${$.index}(${$.UserName})京喜农场】未选择种子,请先去京喜农场选择种子`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(`京喜农场返回值解析异常:${JSON.stringify(data)}`);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
} finally {
|
||||
resolve()
|
||||
}
|
||||
}
|
||||
);
|
||||
}) */
|
||||
|
||||
}
|
||||
|
||||
function getJdPet(){
|
||||
const JDPet_API_HOST = "https://api.m.jd.com/client.action";
|
||||
|
||||
@ -653,7 +594,6 @@ async function getShareCode() {
|
||||
await getPlantBean()
|
||||
await getJdFactory()
|
||||
await getJxFactory()
|
||||
await getJxNc()
|
||||
await getJdZZ()
|
||||
await getJoy()
|
||||
await getSgmh()
|
||||
|
543
jd_joyopen.js
Normal file
543
jd_joyopen.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user