This commit is contained in:
Faker 2023-07-12 18:31:40 +08:00
parent cc98db2b17
commit 0fb3f9cc40
2 changed files with 2322 additions and 2331 deletions

View File

@ -1,6 +1,5 @@
/*
cron "30 * * * *" jd_CheckCK.js, tag:京东CK检测by-ccwav
fix by faker
*/
//详细说明参考 https://github.com/ccwav/QLScript2.
const $ = new Env('京东CK检测');
@ -225,24 +224,24 @@ if ($.isNode() && process.env.CHECKCK_ALLNOTIFY) {
const DisableCkBody = await DisableCk(tempid);
if (DisableCkBody.code == 200) {
if ($.isNode() && WP_APP_TOKEN_ONE) {
strNotifyOneTemp = `京东账号: ${$.nickName || $.UserName2} 已失效,自动禁用成功!\n如果要继续挂机,请联系管理员重新登录账号账号有效期为30天.`
strNotifyOneTemp = `京东账号: ${$.nickName || $.UserName2} 已失效,自动禁用成功!\n如果要继续挂机,请联系管理员重新登录账号.`
if (strAllNotify)
strNotifyOneTemp += `\n` + strAllNotify;
await notify.sendNotifybyWxPucher(`${$.name}`, strNotifyOneTemp, `${$.UserName2}`);
await notify.sendNotifybyWxPucher(`${$.name}`, strNotifyOneTemp, `${$.UserName2}`,'\n\n本通知 By ccwav Mod',`账号过期通知`);
}
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已失效,自动禁用成功!\n`);
TempDisableMessage = ReturnMessageTitle + ` (自动禁用成功!)\n`;
TempErrorMessage = ReturnMessageTitle + ` 已失效,自动禁用成功!\n`;
} else {
if ($.isNode() && WP_APP_TOKEN_ONE) {
strNotifyOneTemp = `京东账号: ${$.nickName || $.UserName2} 已失效!\n如果要继续挂机,请联系管理员重新登录账号账号有效期为30天.`
strNotifyOneTemp = `京东账号: ${$.nickName || $.UserName2} 已失效!\n如果要继续挂机,请联系管理员重新登录账号.`
if (strAllNotify)
strNotifyOneTemp += `\n` + strAllNotify;
await notify.sendNotifybyWxPucher(`${$.name}`, strNotifyOneTemp, `${$.UserName2}`);
await notify.sendNotifybyWxPucher(`${$.name}`, strNotifyOneTemp, `${$.UserName2}`,'\n\n本通知 By ccwav Mod',`账号过期通知`);
}
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已失效,自动禁用失败!\n`);
TempDisableMessage = ReturnMessageTitle + ` (自动禁用失败!)\n`;
@ -259,14 +258,14 @@ if ($.isNode() && process.env.CHECKCK_ALLNOTIFY) {
const EnableCkBody = await EnableCk(tempid);
if (EnableCkBody.code == 200) {
if ($.isNode() && WP_APP_TOKEN_ONE) {
await notify.sendNotifybyWxPucher(`${$.name}`, `京东账号: ${$.nickName || $.UserName2} 已恢复,自动启用成功!\n祝您挂机愉快...`, `${$.UserName2}`);
await notify.sendNotifybyWxPucher(`${$.name}`, `京东账号: ${$.nickName || $.UserName2} 已恢复,自动启用成功!\n祝您挂机愉快...`, `${$.UserName2}`,'\n\n本通知 By ccwav Mod',`账号上线通知`);
}
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已恢复,自动启用成功!\n`);
TempEnableMessage = ReturnMessageTitle + ` (自动启用成功!)\n`;
TempSuccessMessage = ReturnMessageTitle + ` (自动启用成功!)\n`;
} else {
if ($.isNode() && WP_APP_TOKEN_ONE) {
await notify.sendNotifybyWxPucher(`${$.name}`, `京东账号: ${$.nickName || $.UserName2} 已恢复,但自动启用失败!\n请联系管理员处理...`, `${$.UserName2}`);
await notify.sendNotifybyWxPucher(`${$.name}`, `京东账号: ${$.nickName || $.UserName2} 已恢复,但自动启用失败!\n请联系管理员处理...`, `${$.UserName2}`,'\n\n本通知 By ccwav Mod',`账号上线失败通知`);
}
console.log(`京东账号${$.index} : ${$.nickName || $.UserName2} 已恢复,但自动启用失败!\n`);
TempEnableMessage = ReturnMessageTitle + ` (自动启用失败!)\n`;
@ -484,7 +483,7 @@ if ($.isNode() && process.env.CHECKCK_ALLNOTIFY) {
})()
.catch((e) => $.logErr(e))
.finally(() => $.done())
$.UA = require('./USER_AGENTS').UARAM();
function TotalBean() {
return new Promise(async resolve => {
const options = {
@ -494,7 +493,7 @@ function TotalBean() {
Accept: "*/*",
Connection: "keep-alive",
Cookie: cookie,
"User-Agent": $.UA,
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.42",
"Accept-Language": "zh-cn",
"Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&",
"Accept-Encoding": "gzip, deflate, br"
@ -545,7 +544,7 @@ function isLoginByX1a0He() {
headers: {
"Cookie": cookie,
"referer": "https://h5.m.jd.com/",
"User-Agent": $.UA,
"User-Agent": "jdapp;iPhone;10.1.2;15.0;network/wifi;Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
},
}
$.get(options, (err, resp, data) => {

File diff suppressed because it is too large Load Diff