|
@@ -641,6 +641,39 @@ function ToolKit(scriptName, scriptId, options) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ pushWxMsg(summary, content, url) {
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ appToken: "AT_rTc93GQYIdMU8XLRnoJaSea8WkfhSzhX",
|
|
|
|
|
+ content: content,
|
|
|
|
|
+ summary: summary,
|
|
|
|
|
+ contentType: 1,
|
|
|
|
|
+ topicIds: [],
|
|
|
|
|
+ uids: [
|
|
|
|
|
+ "UID_6P4B00X6Zv8U2oKC0I2R09emxtqq"
|
|
|
|
|
+ ],
|
|
|
|
|
+ url: "",
|
|
|
|
|
+ verifyPay: false
|
|
|
|
|
+ };
|
|
|
|
|
+ let options = {
|
|
|
|
|
+ url: 'https://wxpusher.zjiecode.com/api/send/message',
|
|
|
|
|
+ body: JSON.stringify(data),
|
|
|
|
|
+ };
|
|
|
|
|
+ this.post(options, async (error, _response, rdata) => {
|
|
|
|
|
+ if (!error) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ let ret = JSON.parse(rdata);
|
|
|
|
|
+ if (ret.success) {
|
|
|
|
|
+ console.log(`微信推送成功`);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log(`微信推送失败:${rdata}`);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
getVal(key, defaultValue = "") {
|
|
getVal(key, defaultValue = "") {
|
|
|
let value
|
|
let value
|
|
|
if (this.isSurge() || this.isLoon() || this.isStash()) {
|
|
if (this.isSurge() || this.isLoon() || this.isStash()) {
|