nfc使用wx.onHCEMessage(CALLBACK)问题
wx.startHCE({
aid_list: [‘F222222222’],
success: function (res) {
that.setData({
text: res.errMsg
})
wx.onHCEMessage(function (res) {
that.setData({
text: ‘res.data’
})
if (res.messageType === 1) {
that.setData({
text: ‘res.data’
})
wx.sendHCEMessage({ data: buffer })
}
})
}
})
用读卡设备对手机发送adpu指令后,text并没有显示’res.data’,应该怎么使用wx.onHCEMessage()