const buffer = new ArrayBuffer(1)
const dataView = new DataView(buffer)
dataView.setUint8(0, 0)
wx.startHCE({
success (res) {
wx.onHCEMessage(function(res) {
if (res.messageType === 1) {
wx.sendHCEMessage({data: buffer})
}
})
}
})
stratHCE需要穿这个
https://developers.weixin.qq.com/community/develop/doc/000a4641cac6d0df6ccb1571b5b800?_at=1617705333719