读取NFC标签ID
接口说明
把芯片放上去,再调用此JSAPI,即可读取。此接口不需要先调用 startNFC() 以及 stopNFC() 接口。
HWH5.readNFCTagId
请求参数
无。
返回结果
参数 | 类型 | 说明 |
---|---|---|
tagId | string | 芯片ID |
请求示例
- ES6版本
HWH5.readNFCTagId()
.then((data) => {
console.log(data);
})
.catch((error) => {
console.log(error);
});
- ES5版本
HWH5.readNFCTagId()
.then(function(data) {
console.log(data);
})
.catch(function(error) {
console.log(error);
});