补充下:PC机调试的时候
Uncaught (in promise) TypeError: l(...) ?wx.login({ success(res) { if (res.code) { //发起网络请求 wx.request({ url: 'http://localhost:7788/test', data :{ code : res.code }, method: 'GET', timeout: 0, success: (result) => { let str = result.statusCode wx.showToast({ title: str, }) }, fail: (err) => { console.log(err) }, complete: (res) => { }, }) } else { console.log('登录失败!' + res.errMsg) } } }) [图片] 能简单的代码,也有返回,就是返回后console报错
09-27