Commit 864c00105dd3b8ecddaaa39fad619d7a652593a1

Authored by 宋庆平
1 parent 4f6047af
Exists in zfb_waibu_linshi

兼容2.x高版本的请求返回

Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
wxsdk/http/SDKHttp.ts
... ... @@ -39,6 +39,9 @@ export default class SDKHttp {
39 39 if (xhr.status >= 200 && xhr.status < 400) {
40 40 let responseText: any = xhr.responseText;
41 41 // cc.log("responseText"+ responseText)
  42 + if(typeof responseText == "object") {
  43 + responseText = JSON.stringify(responseText);
  44 + }
42 45 try {
43 46 responseText = JSON.parse(responseText);
44 47 // cc.log("responseText22", responseText)
... ...