fix: 🐛 修复ts运行环境下发送企业微信通知错误问题 (#1553)

This commit is contained in:
迷人的幽幽 2022-07-24 13:33:44 +08:00 committed by GitHub
parent 29f5134fb4
commit 1eb64720d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,6 +97,13 @@ let IGOT_PUSH_KEY = '';
let PUSH_PLUS_TOKEN = ''; let PUSH_PLUS_TOKEN = '';
let PUSH_PLUS_USER = ''; let PUSH_PLUS_USER = '';
// =======================================Cool Push设置区域=======================================
//官方文档https://cp.xuthus.cc/docs
//QQ_SKEY: Cool Push登录授权后推送消息的调用代码Skey
//QQ_MODE: 推送模式详情请登录获取QQ_SKEY后见https://cp.xuthus.cc/feat
let QQ_SKEY = '';
let QQ_MODE = '';
//==========================云端环境变量的判断与接收========================= //==========================云端环境变量的判断与接收=========================
if (process.env.GOTIFY_URL) { if (process.env.GOTIFY_URL) {
GOTIFY_URL = process.env.GOTIFY_URL; GOTIFY_URL = process.env.GOTIFY_URL;
@ -723,9 +730,9 @@ function qywxamNotify(text, desp) {
timeout, timeout,
}; };
$.post(options_accesstoken, (err, resp, data) => { $.post(options_accesstoken, (err, resp, data) => {
html = desp.replace(/\n/g, '<br/>'); let html = desp.replace(/\n/g, '<br/>');
var json = JSON.parse(data); let json = JSON.parse(data);
accesstoken = json.access_token; let accesstoken = json.access_token;
let options; let options;
switch (QYWX_AM_AY[4]) { switch (QYWX_AM_AY[4]) {