shawenguan 2 ani în urmă
părinte
comite
39a6d9a09a

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Scripts/gandart/gandartComposite.js


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Scripts/gandart/gandartGrab.js


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Scripts/gandart/gandartHelper.js


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Scripts/gandart/gandartLock.js


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Scripts/gandart/gandartOrder.js


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Scripts/gandart/gandartPay.js


+ 25 - 0
Scripts/util/ToolKit.js

@@ -659,6 +659,7 @@ function ToolKit(scriptName, scriptId, options) {
             let options = {
                 url: 'https://wxpusher.zjiecode.com/api/send/message',
                 body: JSON.stringify(data),
+                headers: this.getJsonDoneHeaders(),
             };
             this.post(options, async (error, _response, rdata) => {
                 if (!error) {
@@ -1072,5 +1073,29 @@ function ToolKit(scriptName, scriptId, options) {
             }
             return newObj;
         }
+
+
+        getBaseDoneHeaders(mixHeaders = {}) {
+            return Object.assign(
+                {
+                    'Access-Control-Allow-Origin': '*',
+                    'Access-Control-Allow-Methods': 'POST,GET,OPTIONS,PUT,DELETE',
+                    'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept'
+                },
+                mixHeaders
+            )
+        }
+
+        getHtmlDoneHeaders() {
+            return this.getBaseDoneHeaders({
+                'Content-Type': 'text/html;charset=UTF-8'
+            })
+        }
+        
+        getJsonDoneHeaders() {
+            return this.getBaseDoneHeaders({
+                'Content-Type': 'text/json; charset=utf-8'
+            })
+        }
     })(scriptName, scriptId, options)
 }

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
Scripts/util/ToolKit.min.js


Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff