Browse Source

handleScanResult调用前增加为空判断

htc 10 months ago
parent
commit
c30190f035
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pagesHouse/Verification/checkApp.vue

+ 2 - 2
pagesHouse/Verification/checkApp.vue

@@ -97,7 +97,7 @@
 
 			this.initSDK();
 			globalEvent.addEventListener('readInfo', function(e) {
-				that.handleScanResult(e.Id,1,e.Name);
+				if(e.Id&&e.Name) that.handleScanResult(e.Id,1,e.Name);
 			});
 		},
 		filters: {
@@ -163,7 +163,7 @@
 						    // 扫描信息处理
 							let scanCode = intent.getStringExtra("barcodeData");
 							// 接收信息处理
-							that.handleScanResult(scanCode,0,'')
+							if(scanCode) that.handleScanResult(scanCode,0,'');
 						}
 					}
 				})