onSocketMessage 回调函数调用setData失败

发布于 6 年前作者 hwu18203 次浏览最后编辑 6 年前来自 ask

onSocketMessage 回调函数调用setData赋值刷新时,一直出错提示:“ Cannot read property ‘setData’ of null;at pages/index/index drawTarget function;at onSocketMessage callback function


TypeError: Cannot read property ‘setData’ of null ”,这是什么原因,回调函数有什么要求?

1 回复
guiying52
guiying521 楼4 年前

wx.onSocketMessage((res)=>{

})

刚谁赞的。。