cuiqian2004
2025-06-19 619b47962e41f506baf7ce2b535b2de1fecc719e
pages/modal/3018_2.vue
@@ -544,50 +544,12 @@
         ontap(item) { //扫码功能
            // console.log("ontap",item);
            // 打开蓝牙适配器
            // uni.openBluetoothAdapter({
            //   success: function() {
            //    // 开始搜索蓝牙设备
            //    uni.startBluetoothDevicesDiscovery({
            //      success: function() {
            //       // 监听找到新设备的事件
            //       uni.onBluetoothDeviceFound(function(devices) {
            //         // 这里可以过滤出RFID芯片,连接并读取数据
            //         console.log(devices[0].deviceId);
            //       })
            //      }
            //    })
            //   }
            // });
            // 监听NFC功能是否可用
            // uni.getNFCAdapterState({
            //   success: function(res) {
            //    console.log(res);
            //     if (res.errCode === 0) {
            //       // NFC功能可用,开始监听
            //       uni.onNFCStart((res) => {
            //         if (res.errCode === 0) {
            //           // 开始NFC标签检测
            //           uni.makeNFCReaderStart({
            //             success: function() {
            //               // 监听NFC标签
            //               uni.onNFCTagDiscovered(function(res) {
            //                                 console.log(res);
            //                 // 这里可以处理NFC标签数据
            //               })
            //             }
            //           })
            //         }
            //       })
            //     }
            //   }
            // })
            this.focusOldFieldId = item.fieldId
            getApp().onScan((result) => {
               console.log(result);
               // uni.hideKeyboard();
               this.onScanValue(item, result.decodedata)
               this.onScanValue(item, result)
            })
         },
         onScanValue(item, value) {