jeromeetienne / jquery-qrcode

qrcode generation standalone (doesn't depend on external services)
http://blog.jetienne.com/blog/2011/04/07/jquery-qrcode/
MIT License
4.84k stars 2.5k forks source link

Cannot display the QRCode in FireFox #79

Closed FrankBian closed 8 years ago

FrankBian commented 8 years ago

this is the Html :

        <div id="wePay" class="tab-pane fade in active">
            <p class="err-text"></p>
            <dl class="dl-horizontal content-area">
                <dt>
                    <img src="/static/img/WePayLogo.png" style="widows: 100px;height: 30px;"
                         alt="微信支付">
                </dt>
                <dd>
                    <div id="wePay-qrcode"></div>
                    <img src="/static/img/WePayDesc.png" style="width: 100px;height: 30px;">
                </dd>
            </dl>
        </div>

and the js code is below :

function getWechatPayUrl() {
    $.ajax({
        url: "/payments/wechat?orderId=" + orderId,
        type: "GET",
        success: function (res) {
            if (res.code == 200) {
                $("#wePay-qrcode").qrcode({width: 64,height: 64,text: res.data});
                $(".content-area").show();
            } else {
                $(".err-text").text(res.msg);
                $(".content-area").hide();
            }
        }
    })
}

the FireBug show that Ajax request is success ,and the result return like that :

{"code":200,"msg":"操作成功","timestamp":"2016-01-19 15:22:05","data":"weixin://wxpay/bizpayurl?pr\u003dx0p6QsZ"
}

but , the QRCode is not shown.

FrankBian commented 8 years ago

It's my mistake. so sorry