收藏
回答

NfcA.transceive写入数据成功为什么读取出来还是之前的数据?

            var buffer = t.stringToArrayBuffer('http://www.baidu.com?v=121212');
      console.log(buffer)
      console.log(t.arrayBufferToString(buffer))
      if (res.techs.includes(nfc.tech.nfcA)) {
        const nfcA = nfc.getNfcA();
        nfcA.connect({
          success(res1) {
            nfcA.transceive({
              data: buffer,
              complete(res) {
                console.log('res:', res)
                console.log(t.arrayBufferToString(res.data))
              }
            })
          }
        })
        // return

        nfcA.getAtqa({
          success(res2) {
            console.log(res2.atqa)
            
          },
          fail(res2) {


          }
        })
      }

回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签