报错信息:transceive:fail:system internal error: Call connect() first
一链接标签,为什么会报错先调用connect
具体代码
ndef.connect({
success:function(resco){
// console.log(resco, 'connect')
console.log('nfc连卡成功:'+JSON.stringify(resco));
var arr = [0x30, 0x01];
var arrayBuffer = new Int8Array(arr).buffer;
nfca.transceive({
data: arrayBuffer,
complete(resup) {
console.log('resup:', resup)
}
})
},
})
你好,
请先参考:https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/wx.getNFCAdapter.html