Blame view

public/js/home/myqrcode.page.js 466 Bytes
陈峰 authored
1
let $ = require('yoho-jquery');
zzzzzzz authored
2
3
require('common');
4
zzzzzzz authored
5
// 生成二维码
6
setTimeout(function() {
陈峰 authored
7
    let text = $('.myqrcode_qr').attr('qr-data'),
zzzzzzz authored
8 9 10 11 12 13
        width = $('.myqrcode_qr').css('width');

    require('yoho-jquery-qrcode');
    $('.myqrcode_qr').qrcode({
        render: 'canvas', // 显示方式,canvas,image和div
        text: text, // 二维码的内容
毕凯 authored
14 15
        size: parseInt(width, 10), // 大小
        ecLevel: 'H', // 纠错级别
zzzzzzz authored
16
    });
17
}, 0);