diff --git a/components/tpx-physics-scan/tpx-physics-scan.vue b/components/tpx-physics-scan/tpx-physics-scan.vue index 871e0a4..38bc339 100644 --- a/components/tpx-physics-scan/tpx-physics-scan.vue +++ b/components/tpx-physics-scan/tpx-physics-scan.vue @@ -31,12 +31,8 @@ } }, created() { - let { hongWaiSwitch } = getSessionSystemInfo() - // 红外开启,才可使用该功能 - if(hongWaiSwitch) { - this.initScan() - this.startScan(); - } + this.initScan() + this.startScan(); }, onHide() { // this.stopScan(); @@ -88,6 +84,12 @@ // #endif }, queryCode: function(code) { + let { hongWaiSwitch } = getSessionSystemInfo() + // 红外开启,才可使用该功能 + if(!hongWaiSwitch) { + return false; + } + let that = this; // #ifdef APP console.log('queryCode');