var requestTask = wx.request({
url:"https://xxx.xxx.xxx/xx/xxx",
timeout: 15000,
responseType: "text",
method: "GET",
enableChunked: true,
header: {
token
},
data: {},
success: (response) => {
console.log(response);
},
fail: (error) => {}});
微信小程序PC端使用wx.request配置enableChunked:true时报错 "Uncaught ReferenceError: global is not defined",如果不配置enableChunked:true就不会报错
我也遇到了这个问题