Ver Fonte

update goajax

jason.lu há 6 anos atrás
pai
commit
153b36e80b
1 ficheiros alterados com 9 adições e 2 exclusões
  1. 9 2
      sourcecode/h5app/vue/src/connector/basic-service.js

+ 9 - 2
sourcecode/h5app/vue/src/connector/basic-service.js

@@ -59,11 +59,18 @@ var BasicFunction = new (function () {
 
 
     this.goajax = function (jqObject) {
+        if(typeof jqObject.data !== "string"){
+            if(jqObject.toString().indexOf("FromData") !== -1) {
+                return fetch(jqObject.url, {
+                    method: 'POST',
+                    body: jqObject.data
+                });
+            }
+        }
         return fetch(jqObject.url, {
             method: 'POST',
             headers: {
-                'Content-Type': 'application/json',
-                //'x-doiby-authenticate' : 'CISICMIEINAOQPMDPWIDNENU'
+                'Content-Type': 'application/json'
             },
             body: jqObject.data
         });