请问我在执行nfc连接的时候,这个setTimeout有什么用?我这里写的代码timeout: 500000,并不会阻塞getSak的执行,那么在nfc的setTimeout有什么用?
this.nfca.connect({
success: (res) => {
this.nfca.setTimeout({
timeout: 500000,
success: (res) => {
console.log(res);
this.nfca.getSak({
success: (res) => {
console.log(res.sak);
},
});
},
});
console.log(res);
this.nfca.getMaxTransceiveLength({
success: (res) => {
console.log(res.length);
},
});
this.nfca.getAtqa({
success: (res) => {
console.log(res.atqa);
},
});
this.nfca.isConnected({
success: (res) => {
console.log(res);
},
});
},
});