The WeChat applet can be debugged in the developer tool, and the solution for debugging and previewing no data on the real machine

The WeChat applet can request data using wx.request on the developer tools and on Apple, but it is useless after changing to an Android machine. The final discovery is to add a step of data conversion.
Just add this to wx.request.

 var json = res.data
        if (typeof json != 'object') {
    
    
          if (json != null) {
    
    
            json = json.replace("\ufeff", "")
            json = JSON.parse(json)
          }
        } 

Guess you like

Origin blog.csdn.net/qq_43811879/article/details/112069958