Commit 51b6750cfdfe2743115c7ea2531dd8b5162cd27a
1 parent
e8c0bf5b
条形码扫码的优化
Showing
2 changed files
with
2 additions
and
2 deletions
components/qr_code/qr_code.js
... | ... | @@ -35,7 +35,7 @@ Component({ |
35 | 35 | this.setData({q_show: 1,object:e,barcode_canvas:list,qrcode_canvas:list,is_fw:e.is_fw }); |
36 | 36 | var val=e.val; |
37 | 37 | |
38 | - barcode('barcode'+this.data.index,val, 620, 160,this); | |
38 | + barcode('barcode'+this.data.index,val+"", 620, 160,this); | |
39 | 39 | qrcode('qrcode'+this.data.index, val, 520, 520,this); |
40 | 40 | } |
41 | 41 | }, | ... | ... |
utils/barcode.js
... | ... | @@ -197,7 +197,7 @@ function stringToCode128(text) { |
197 | 197 | //ok some type of shift is nessecary |
198 | 198 | if (shifter != -1) { |
199 | 199 | result.push(shifter); |
200 | - result.push(codeValue(chr2)); | |
200 | + result.push(codeValue(chr1)); | |
201 | 201 | } |
202 | 202 | else { |
203 | 203 | if (currcs == CODESET.C) { | ... | ... |