https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/Ndef.html
-------------------------------代码---------------------------------------
NfcAd.onDiscovered((e)=>{
this.setData({nfcData:'UID :'+this.ab2hex(e.id)+'\n技术标准:'+e.techs});
ndef=NfcAd.getNdef();
ndef.connect({
complete:e=>{
console.log('ndef connect');
console.log(e);
}
});
ndef.onNdefMessage(e=>{
console.log("onNdefMessage");
console.log(e);
});
ndef.writeNdefMessage({
uris:['https://blog.csdn.net/qq_32595453/article/details/79516787'],
complete(res) {
console.log('res:', res)
}
});
});
---------------------------------------------------------------------------------------------------
什么时候才出发 onNdefMessage这个函数呢,标签是有ndef数据的,
另外,写ndef的包如图中日志的错误。
请问怎么解决。
函数去掉