为什么总报this.setData is not a function错误
mifareClassic.transceive({
data: arrayBuffer02,
success: function(res) {
let that = this
let str01 = ""
let data = Array.from(new Uint8Array(res.data));
data.forEach(e => {
let item = e.toString(16)//转16进制字符串
if (item.length == 1) {
item = '0' + item
}
item = item.toUpperCase()
// console.log(item)
str01 += item
})
console.log('读取数据成功', res, str01,Array.from(new Uint8Array(res.data)));
that.setData({
blockdata:str01
})
},
fail (err) {
console.log('读取数据失败', err);
},
// complete(){
// mifareClassic.close({
// success(){
// console.log("关闭成功")
// }
// })
// }
}) 改几次都不行,用that,_this都试过了也是不行