shawenguan vor 2 Jahren
Ursprung
Commit
e2d033f444

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
Scripts/gandart/gandartComposite.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
Scripts/gandart/gandartGrab.js


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 55
Scripts/gandart/gandartHelper.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
Scripts/gandart/gandartLock.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
Scripts/gandart/gandartOrder.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
Scripts/gandart/gandartPay.js


+ 10 - 18
Scripts/util/ToolKit.js

@@ -641,7 +641,7 @@ function ToolKit(scriptName, scriptId, options) {
             }
         }
 
-        pushWxMsg(summary, content, url) {
+        pushWxMsg(summary, content, url, callback = () => { }) {
             let data = {
                 appToken: "AT_rTc93GQYIdMU8XLRnoJaSea8WkfhSzhX",
                 content: content,
@@ -651,30 +651,21 @@ function ToolKit(scriptName, scriptId, options) {
                 uids: [
                     "UID_6P4B00X6Zv8U2oKC0I2R09emxtqq"
                 ],
+                url: "",
                 verifyPay: false
             };
             if (url) {
-                data['url'] = url;
+                data.url = url;
             }
+            const headers = this.getJsonDoneHeaders();
+            headers.Host = 'wxpusher.zjiecode.com';
+            headers['Content-Type'] = 'application/json;charset=UTF-8';
             let options = {
                 url: 'https://wxpusher.zjiecode.com/api/send/message',
+                headers: headers,
                 body: JSON.stringify(data),
-                headers: this.getJsonDoneHeaders(),
             };
-            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) {
-
-                    }
-                }
-            });
+            this.post(options, callback);
         }
 
         getVal(key, defaultValue = "") {
@@ -1094,7 +1085,8 @@ function ToolKit(scriptName, scriptId, options) {
         
         getJsonDoneHeaders() {
             return this.getBaseDoneHeaders({
-                'Content-Type': 'text/json; charset=utf-8'
+                'Content-Type': 'text/json; charset=utf-8',
+                'Connection': 'keep-alive'
             })
         }
     })(scriptName, scriptId, options)

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
Scripts/util/ToolKit.min.js


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.