onHCEMessage毫无反应并打印不出res
如果是 Bug:
* Bug 表现是什么?
onHCEMessage毫无反应,打印不出res,能解答一下吗?具体怎么跟卡交互的有简单的实例吗
wx.startHCE({
aid_list: ['F222222222']
success: function(res) { console.log(res.errMsg)
}
})
也少了个逗号,
官方文档的
const buffer = new ArrayBuffer(1)const dataView = new DataView(buffer)
dataView.setUint8(0, 0)
wx.startHCE({
success: function(res) {
wx.onHCEMessage({
success: function(res) { if (res.messageType === 1) {
wx.sendHCEMessage({data: buffer})
}
}
})
}
})
也少传了aid——list