拿不到that.data中的数据是为什么?setData也不生效,后面的语句不执行

小程序 文章 2021-03-04 17:01 453 0 全屏看文

AI助手支持GPT4.0

拿不到that.data中的数据是为什么?setData也不生效,后面的语句不执行Why can't I get the data in that.data? setData does not take effect, and the following statement is not executed

拿不到that.data中的数据是为什么?setData也不生效,后面的语句不执行

回答:

Brother斌🎈:

this指向的问题? 试一下 var that=this放到db外,然后db里面的this全部改成that

lxc:解决了,谢谢
😮😮:

把 success 变成箭头函数 应该也可以拿到

微盟:

this问题  可以尝试使用try catch  抓一下报错就可以看到了

-EOF-

AI助手支持GPT4.0