this关键字,不能直接在请求的回调函数里写this,应该在请求外声明一个变量,接收onload函数的this,这样就不会报错了

或者尝试使用ES6的箭头函数

小程序填坑--TypeError: this.setData is not a function

 

相关文章:

  • 2021-11-24
  • 2021-09-10
  • 2022-02-02
  • 2021-07-27
  • 2021-11-29
  • 2021-09-23
猜你喜欢
  • 2022-01-25
  • 2021-08-16
  • 2021-07-10
  • 2022-01-18
  • 2021-05-02
  • 2022-01-08
相关资源
相似解决方案