diff --git a/jd_bean_sign.js b/jd_bean_sign.js index 5ab774c7..fb3fee0e 100644 --- a/jd_bean_sign.js +++ b/jd_bean_sign.js @@ -131,7 +131,7 @@ async function downFile () { async function changeFile (content) { console.log(`开始替换变量`) let newContent = content.replace(/var Key = ''/, `var Key = '${cookie}'`); - // newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`) + newContent = newContent.replace(/const NodeSet = 'CookieSet.json'/, `const NodeSet = '${NodeSet}'`) if (process.env.JD_BEAN_STOP && process.env.JD_BEAN_STOP !== '0') { newContent = newContent.replace(/var stop = 0/, `var stop = ${process.env.JD_BEAN_STOP * 1}`); } diff --git a/sendNotify.js b/sendNotify.js index e32a197b..b23e2e12 100644 --- a/sendNotify.js +++ b/sendNotify.js @@ -2,7 +2,7 @@ * @Author: lxk0301 https://github.com/lxk0301 * @Date: 2020-08-19 16:12:40 * @Last Modified by: lxk0301 - * @Last Modified time: 2020-12-21 13:52:54 + * @Last Modified time: 2021-1-5 17:52:54 */ const querystring = require("querystring"); const $ = new Env(); @@ -132,17 +132,21 @@ if (process.env.PUSH_PLUS_USER) { async function sendNotify(text, desp, params = {}) { //提供7种通知 - await serverNotify(text, desp);//微信server酱 - await pushPlusNotify(text, desp);//pushplus(推送加) + await Promise.all([ + serverNotify(text, desp),//微信server酱 + pushPlusNotify(text, desp)//pushplus(推送加) + ]) //由于上述两种微信通知需点击进去才能查看到详情,故text(标题内容)携带了账号序号以及昵称信息,方便不点击也可知道是哪个京东哪个活动 text = text.match(/.*?(?=\s?-)/g) ? text.match(/.*?(?=\s?-)/g)[0] : text; - await BarkNotify(text, desp, params);//iOS Bark APP - await tgBotNotify(text, desp);//telegram 机器人 - await ddBotNotify(text, desp);//钉钉机器人 - await qywxBotNotify(text, desp); //企业微信机器人 - await qywxamNotify(text, desp); //企业微信应用消息推送 - await iGotNotify(text, desp, params);//iGot - await CoolPush(text, desp);//QQ酷推 + await Promise.all([ + BarkNotify(text, desp, params),//iOS Bark APP + tgBotNotify(text, desp),//telegram 机器人 + ddBotNotify(text, desp),//钉钉机器人 + qywxBotNotify(text, desp), //企业微信机器人 + qywxamNotify(text, desp), //企业微信应用消息推送 + iGotNotify(text, desp, params),//iGot + CoolPush(text, desp)//QQ酷推 + ]) } function serverNotify(text, desp, timeout = 2100) {