1820c933 by liuhejuan

扫码验收,去掉条形码前面的0

1 parent c39f8841
...@@ -79,6 +79,10 @@ ...@@ -79,6 +79,10 @@
79 79
80 console.log(r+"条形码读取的数据");//返回二维码读取的数据 80 console.log(r+"条形码读取的数据");//返回二维码读取的数据
81 if(r){ 81 if(r){
82 r = r+"";
83 if(typeof r == 'string'){//去掉条形码前面的0
84 r = r.replace(/\b(0+)/gi,"");
85 }
82 var itemData = {barcode:r} 86 var itemData = {barcode:r}
83 itemData.currentSelected = selectTabs === 1 ? 'left': 'right'; 87 itemData.currentSelected = selectTabs === 1 ? 'left': 'right';
84 console.log(JSON.stringify(itemData)) 88 console.log(JSON.stringify(itemData))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!