diff --git a/components/qr_code/qr_code.js b/components/qr_code/qr_code.js index 812d7c8..2d4833d 100644 --- a/components/qr_code/qr_code.js +++ b/components/qr_code/qr_code.js @@ -35,7 +35,7 @@ Component({ this.setData({q_show: 1,object:e,barcode_canvas:list,qrcode_canvas:list,is_fw:e.is_fw }); var val=e.val; - barcode('barcode'+this.data.index,val, 620, 160,this); + barcode('barcode'+this.data.index,val+"", 620, 160,this); qrcode('qrcode'+this.data.index, val, 520, 520,this); } }, diff --git a/utils/barcode.js b/utils/barcode.js index 57fca94..737e2f4 100644 --- a/utils/barcode.js +++ b/utils/barcode.js @@ -197,7 +197,7 @@ function stringToCode128(text) { //ok some type of shift is nessecary if (shifter != -1) { result.push(shifter); - result.push(codeValue(chr2)); + result.push(codeValue(chr1)); } else { if (currcs == CODESET.C) {