NFC无法发送数据
let str = "10001";
let buf = new ArrayBuffer(str.length); // 每个字符占用2个字节
let bufView = new Uint8Array(buf);
for (var i=0, strLen=str.length; i<strLen; i++) {
bufView[i] = str.charCodeAt(i);
}
console.log(buf);
nfcA.transceive({
data:buf,
success:function(res){
console.log("transceive success");
console.log(res);
},
fail:function(res){
console.log("transceive fail");
console.log(res);
},
complete:function(res){
console.log("transceive complete");
console.log(res);
}
});
https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcB.transceive.html 错误信息:{errMsg: "transceive:fail:system internal error", errCode: 13017} NFC的文档是否完善一下,完全靠自己摸索