下载weapp-qrcode.js(链接https://pan.baidu.com/s/1kIO4ey8SV8DhvVg8y5trdQ
提取码:Andy )
首先引入qrCode.js文件
import qrCode from ‘…/…/common/weapp-qrcode.js’
通过后台返回的qrCode
couponQrCode() {
let that = this;
new qrCode(‘couponQrcode’, {
text: qrCode,
width: 190,
height: 190,
colorDark: “#000”,
colorLight: “#FFFFFF”,
correctLevel: qrCode.CorrectLevel.H
})
},