初接触微信小程序 本文只为加深下印象

当初用直接按照网上的方法 this.data.msg ,this.setData({ A : "1"})  会一直出

VM7561:1 thirdScriptError  Cannot read property 'data' of null;at pages

再次问度娘时 在自己写的函数里声明var that = this; 

var that = this; 

that.data.msg,

that.setData({ A : "1"}) 

 

注 在wx.request 回调函数里声明也不行

相关文章:

  • 2021-12-29
  • 2022-12-23
  • 2021-06-06
  • 2021-12-04
  • 2021-09-23
  • 2022-12-23
猜你喜欢
  • 2021-07-19
  • 2021-10-29
  • 2022-12-23
  • 2021-09-10
  • 2021-12-24
  • 2022-01-05
相关资源
相似解决方案