mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
35 lines
1.3 KiB
JavaScript
35 lines
1.3 KiB
JavaScript
(function(vc) {
|
|
|
|
vc.extends({
|
|
data: {
|
|
inspectionPointQrCodeInfo: {
|
|
url: '',
|
|
inspectionName: '',
|
|
}
|
|
},
|
|
_initMethod: function() {},
|
|
_initEvent: function() {
|
|
vc.on('inspectionPointQrCode', 'openInspectionPointQrCodeModal', function(_param) {
|
|
vc.copyObject(_param, $that.inspectionPointQrCodeInfo);
|
|
$('#inspectionPointQrCodeModel').modal('show');
|
|
$that._viewQr($that.inspectionPointQrCodeInfo.url);
|
|
});
|
|
},
|
|
methods: {
|
|
// 两分钟后显示遮罩层
|
|
_viewQr: function(_url) {
|
|
document.getElementById("qrcode").innerHTML = "";
|
|
let qrcode = new QRCode(document.getElementById("qrcode"), {
|
|
text: "213", //你想要填写的文本
|
|
width: 200, //生成的二维码的宽度
|
|
height: 200, //生成的二维码的高度
|
|
colorDark: "#000000", // 生成的二维码的深色部分
|
|
colorLight: "#ffffff", //生成二维码的浅色部分
|
|
correctLevel: QRCode.CorrectLevel.L
|
|
});
|
|
qrcode.makeCode(_url);
|
|
}
|
|
}
|
|
});
|
|
|
|
})(window.vc); |