mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
commit
06df9c2c5c
941
gua_opencard115.js
Normal file
941
gua_opencard115.js
Normal file
File diff suppressed because one or more lines are too long
786
gua_opencard117.js
Normal file
786
gua_opencard117.js
Normal file
File diff suppressed because one or more lines are too long
@ -75,7 +75,7 @@ RemainMessage += '【其他】京喜红包只能在京喜使用,其他同理';
|
|||||||
let WP_APP_TOKEN_ONE = "";
|
let WP_APP_TOKEN_ONE = "";
|
||||||
|
|
||||||
let TempBaipiao = "";
|
let TempBaipiao = "";
|
||||||
|
let llgeterror=false;
|
||||||
|
|
||||||
let doExJxBeans ="false";
|
let doExJxBeans ="false";
|
||||||
let time = new Date().getHours();
|
let time = new Date().getHours();
|
||||||
@ -360,13 +360,18 @@ if(DisableIndex!=-1){
|
|||||||
await getMs();
|
await getMs();
|
||||||
|
|
||||||
//东东农场
|
//东东农场
|
||||||
if(EnableJdFruit){
|
if (EnableJdFruit) {
|
||||||
await jdfruitRequest('taskInitForFarm', {
|
llgeterror = false;
|
||||||
"version": 14,
|
await getjdfruit();
|
||||||
"channel": 1,
|
if (llgeterror) {
|
||||||
"babelChannel": "120"
|
console.log(`东东农场API查询失败,等待10秒后再次尝试...`)
|
||||||
});
|
await $.wait(10 * 1000);
|
||||||
await getjdfruit();
|
await getjdfruit();
|
||||||
|
}
|
||||||
|
if (llgeterror) {
|
||||||
|
console.log(`东东农场API查询失败,有空重启路由器换个IP吧.`)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//极速金币
|
//极速金币
|
||||||
if(EnableJdSpeed)
|
if(EnableJdSpeed)
|
||||||
@ -709,14 +714,14 @@ async function showMsg() {
|
|||||||
ReturnMessage += `\n`;
|
ReturnMessage += `\n`;
|
||||||
|
|
||||||
if ($.beanCount){
|
if ($.beanCount){
|
||||||
ReturnMessage += `【当前京豆】${$.beanCount}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`;
|
ReturnMessage += `【当前京豆】${$.beanCount-$.beanChangeXi}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`;
|
||||||
strsummary+= `【当前京豆】${$.beanCount}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`;
|
strsummary+= `【当前京豆】${$.beanCount-$.beanChangeXi}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`;
|
||||||
} else {
|
} else {
|
||||||
if($.levelName || $.JingXiang)
|
if($.levelName || $.JingXiang)
|
||||||
ReturnMessage += `【当前京豆】获取失败,接口返回空数据\n`;
|
ReturnMessage += `【当前京豆】获取失败,接口返回空数据\n`;
|
||||||
else{
|
else{
|
||||||
ReturnMessage += `【当前京豆】${$.beanCount}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`;
|
ReturnMessage += `【当前京豆】${$.beanCount-$.beanChangeXi}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`;
|
||||||
strsummary += `【当前京豆】${$.beanCount}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`;
|
strsummary += `【当前京豆】${$.beanCount-$.beanChangeXi}豆(≈${(($.beanCount-$.beanChangeXi)/ 100).toFixed(2)}元)\n`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -956,7 +961,7 @@ async function showMsg() {
|
|||||||
if($.YunFeiQuan){
|
if($.YunFeiQuan){
|
||||||
var strTempYF="【免运费券】"+$.YunFeiQuan+"张";
|
var strTempYF="【免运费券】"+$.YunFeiQuan+"张";
|
||||||
if($.YunFeiQuanEndTime)
|
if($.YunFeiQuanEndTime)
|
||||||
strTempYF+=",有效期至"+$.YunFeiQuanEndTime;
|
strTempYF+="(有效期至"+$.YunFeiQuanEndTime+")";
|
||||||
strTempYF+="\n";
|
strTempYF+="\n";
|
||||||
ReturnMessage +=strTempYF
|
ReturnMessage +=strTempYF
|
||||||
strsummary +=strTempYF;
|
strsummary +=strTempYF;
|
||||||
@ -964,7 +969,7 @@ async function showMsg() {
|
|||||||
if($.YunFeiQuan2){
|
if($.YunFeiQuan2){
|
||||||
var strTempYF2="【免运费券】"+$.YunFeiQuan2+"张";
|
var strTempYF2="【免运费券】"+$.YunFeiQuan2+"张";
|
||||||
if($.YunFeiQuanEndTime2)
|
if($.YunFeiQuanEndTime2)
|
||||||
strTempYF+=",有效期至"+$.YunFeiQuanEndTime;
|
strTempYF+="(有效期至"+$.YunFeiQuanEndTime2+")";
|
||||||
strTempYF2+="\n";
|
strTempYF2+="\n";
|
||||||
ReturnMessage +=strTempYF2
|
ReturnMessage +=strTempYF2
|
||||||
strsummary +=strTempYF2;
|
strsummary +=strTempYF2;
|
||||||
@ -1827,10 +1832,13 @@ async function getjdfruit() {
|
|||||||
$.post(option, (err, resp, data) => {
|
$.post(option, (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log('\n东东农场: API查询请求失败 ‼️‼️');
|
if(!llgeterror){
|
||||||
console.log(JSON.stringify(err));
|
console.log('\n东东农场: API查询请求失败 ‼️‼️');
|
||||||
$.logErr(err);
|
console.log(JSON.stringify(err));
|
||||||
|
}
|
||||||
|
llgeterror = true;
|
||||||
} else {
|
} else {
|
||||||
|
llgeterror = false;
|
||||||
if (safeGet(data)) {
|
if (safeGet(data)) {
|
||||||
$.farmInfo = JSON.parse(data)
|
$.farmInfo = JSON.parse(data)
|
||||||
if ($.farmInfo.farmUserPro) {
|
if ($.farmInfo.farmUserPro) {
|
||||||
@ -1857,33 +1865,6 @@ async function getjdfruit() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function jdfruitRequest(function_id, body = {}, timeout = 1000) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
setTimeout(() => {
|
|
||||||
$.get(taskfruitUrl(function_id, body), (err, resp, data) => {
|
|
||||||
try {
|
|
||||||
if (err) {
|
|
||||||
console.log('\n东东农场: API查询请求失败 ‼️‼️')
|
|
||||||
console.log(JSON.stringify(err));
|
|
||||||
console.log(`function_id:${function_id}`)
|
|
||||||
$.logErr(err);
|
|
||||||
} else {
|
|
||||||
if (safeGet(data)) {
|
|
||||||
data = JSON.parse(data);
|
|
||||||
$.JDwaterEveryDayT = data.totalWaterTaskInit.totalWaterTaskTimes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
$.logErr(e, resp);
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
resolve(data);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}, timeout)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
async function PetRequest(function_id, body = {}) {
|
async function PetRequest(function_id, body = {}) {
|
||||||
await $.wait(3000);
|
await $.wait(3000);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
337
jd_ghnsjd.js
Normal file
337
jd_ghnsjd.js
Normal file
File diff suppressed because one or more lines are too long
319
jd_mofang_ex.js
319
jd_mofang_ex.js
File diff suppressed because one or more lines are too long
537
jd_mohe.js
537
jd_mohe.js
File diff suppressed because one or more lines are too long
169
jd_mohe_help.js
169
jd_mohe_help.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
555
jd_sendBeans.js
555
jd_sendBeans.js
File diff suppressed because one or more lines are too long
11
jd_wish.js
11
jd_wish.js
@ -25,8 +25,8 @@ let message = '', allMessage = '';
|
|||||||
//IOS等用户直接用NobyDa的jd cookie
|
//IOS等用户直接用NobyDa的jd cookie
|
||||||
let cookiesArr = [], cookie = '';
|
let cookiesArr = [], cookie = '';
|
||||||
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
||||||
let appIdArr = ["1GFNRxq8","1GVFUx6g", "1E1xZy6s", "1GVJWyqg","1GFRRyqo"];
|
let appIdArr = ['1EFRQwA','1FFVQyqw','1E1xZy6s'];
|
||||||
let appNameArr = ["新年宠粉","JOY年味之旅","PLUS生活特权", "虎娃迎福","过新潮年"];
|
let appNameArr = ['疯狂砸金蛋','1111点心动','PLUS生活特权'];
|
||||||
let appId, appName;
|
let appId, appName;
|
||||||
$.shareCode = [];
|
$.shareCode = [];
|
||||||
if ($.isNode()) {
|
if ($.isNode()) {
|
||||||
@ -78,12 +78,7 @@ if ($.isNode()) {
|
|||||||
await $.wait(1000)
|
await $.wait(1000)
|
||||||
res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/wish.json')
|
res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/wish.json')
|
||||||
}
|
}
|
||||||
let res2 = await getAuthorShareCode('https://raw.githubusercontent.com/zero205/updateTeam/main/shareCodes/wish.json')
|
$.shareCode = [...$.shareCode, ...(res || [])]
|
||||||
if (!res2) {
|
|
||||||
await $.wait(1000)
|
|
||||||
res2 = await getAuthorShareCode('https://raw.fastgit.org/zero205/updateTeam/main/shareCodes/wish.json')
|
|
||||||
}
|
|
||||||
$.shareCode = [...$.shareCode, ...(res || []), ...(res2 || [])]
|
|
||||||
for (let i = 0; i < cookiesArr.length; i++) {
|
for (let i = 0; i < cookiesArr.length; i++) {
|
||||||
if (cookiesArr[i]) {
|
if (cookiesArr[i]) {
|
||||||
cookie = cookiesArr[i];
|
cookie = cookiesArr[i];
|
||||||
|
101
sendNotify.js
101
sendNotify.js
@ -14,7 +14,7 @@ const querystring = require('querystring');
|
|||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
const $ = new Env();
|
const $ = new Env();
|
||||||
const timeout = 15000; //超时时间(单位毫秒)
|
const timeout = 15000; //超时时间(单位毫秒)
|
||||||
console.log("加载sendNotify,当前版本: 20220302");
|
console.log("加载sendNotify,当前版本: 20220306");
|
||||||
// =======================================go-cqhttp通知设置区域===========================================
|
// =======================================go-cqhttp通知设置区域===========================================
|
||||||
//gobot_url 填写请求地址http://127.0.0.1/send_private_msg
|
//gobot_url 填写请求地址http://127.0.0.1/send_private_msg
|
||||||
//gobot_token 填写在go-cqhttp文件设置的访问密钥
|
//gobot_token 填写在go-cqhttp文件设置的访问密钥
|
||||||
@ -1972,57 +1972,58 @@ function BarkNotify(text, desp, params = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tgBotNotify(text, desp) {
|
function tgBotNotify(text, desp) {
|
||||||
return new Promise((resolve) => {
|
return new Promise(resolve => {
|
||||||
if (TG_BOT_TOKEN && TG_USER_ID) {
|
if (TG_BOT_TOKEN && TG_USER_ID) {
|
||||||
const options = {
|
const options = {
|
||||||
url: `https://${TG_API_HOST}/bot${TG_BOT_TOKEN}/sendMessage`,
|
url: `https://${TG_API_HOST}/bot${TG_BOT_TOKEN}/sendMessage`,
|
||||||
body: `chat_id=${TG_USER_ID}&text=${text}\n\n${desp}&disable_web_page_preview=true`,
|
json: {
|
||||||
headers: {
|
chat_id: `${TG_USER_ID}`,
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
text: `${text}\n\n${desp}`,
|
||||||
},
|
disable_web_page_preview:true,
|
||||||
timeout,
|
},
|
||||||
};
|
headers: {
|
||||||
if (TG_PROXY_HOST && TG_PROXY_PORT) {
|
'Content-Type': 'application/json',
|
||||||
const tunnel = require('tunnel');
|
},
|
||||||
const agent = {
|
timeout
|
||||||
https: tunnel.httpsOverHttp({
|
}
|
||||||
proxy: {
|
if (TG_PROXY_HOST && TG_PROXY_PORT) {
|
||||||
host: TG_PROXY_HOST,
|
const tunnel = require("tunnel");
|
||||||
port: TG_PROXY_PORT * 1,
|
const agent = {
|
||||||
proxyAuth: TG_PROXY_AUTH,
|
https: tunnel.httpsOverHttp({
|
||||||
},
|
proxy: {
|
||||||
}),
|
host: TG_PROXY_HOST,
|
||||||
};
|
port: TG_PROXY_PORT * 1,
|
||||||
Object.assign(options, {
|
proxyAuth: TG_PROXY_AUTH
|
||||||
agent
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
$.post(options, (err, resp, data) => {
|
})
|
||||||
try {
|
|
||||||
if (err) {
|
|
||||||
console.log('telegram发送通知消息失败!!\n');
|
|
||||||
console.log(err);
|
|
||||||
} else {
|
|
||||||
data = JSON.parse(data);
|
|
||||||
if (data.ok) {
|
|
||||||
console.log('Telegram发送通知消息成功🎉。\n');
|
|
||||||
} else if (data.error_code === 400) {
|
|
||||||
console.log('请主动给bot发送一条消息并检查接收用户ID是否正确。\n');
|
|
||||||
} else if (data.error_code === 401) {
|
|
||||||
console.log('Telegram bot token 填写错误。\n');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
$.logErr(e, resp);
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
resolve(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
resolve();
|
|
||||||
}
|
}
|
||||||
});
|
Object.assign(options, {agent})
|
||||||
|
}
|
||||||
|
$.post(options, (err, resp, data) => {
|
||||||
|
try {
|
||||||
|
if (err) {
|
||||||
|
console.log('telegram发送通知消息失败!!\n')
|
||||||
|
console.log(err);
|
||||||
|
} else {
|
||||||
|
data = JSON.parse(data);
|
||||||
|
if (data.ok) {
|
||||||
|
console.log('Telegram发送通知消息成功<E68890>。\n')
|
||||||
|
} else if (data.error_code === 400) {
|
||||||
|
console.log('请主动给bot发送一条消息并检查接收用户ID是否正确。\n')
|
||||||
|
} else if (data.error_code === 401) {
|
||||||
|
console.log('Telegram bot token 填写错误。\n')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
$.logErr(e, resp);
|
||||||
|
} finally {
|
||||||
|
resolve(data);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
resolve()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function ddBotNotify(text, desp) {
|
function ddBotNotify(text, desp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user