zoukankan      html  css  js  c++  java
  • 将字符串装换成二维码

    function handleResult(url, res, data, isDeposit) {
        if (res.code === 0) {
            if ('SCAN_WEIXIN' === data.field.payMethodType || 'SCAN_ALIPAY' === data.field.payMethodType) {
                $("#qrCode").append('<div id="code" style="margin-top: 25px;"></div>');
                jQuery('#code').qrcode({
                    render: "table",
                    text: res.data.respMap.payInfo
                });
                layer.open({
                    title: '请扫描二维码支付',
                    type: 1,
                    content: $('#code'),
                    yes: function () {
                        $('#code').empty();
                        layer.closeAll();
                    },
                    cancel: function () {
                        $('#code').empty();
                        layer.closeAll();
                    }
                });
            }else if ('CODEPAY_W' === data.field.payMethodType) {
                layer.open({
                    title: '提示信息',
                    content: res.data.respMap.payStatus,
                    yes: function () {           
                        layer.closeAll();
                    },
                    cancel: function () {
                        layer.closeAll();
                    }
                });
    

     通过这个方法即可将二维码串转换成二维码的形式。

  • 相关阅读:
    家庭记账本_2
    家庭记账本_1
    安卓学习进度_25
    安卓软件学习进度_24
    对体温上报app的总结
    安卓软件学习进度_23
    安卓软件学习进度_22
    安卓开发
    安卓开发
    安卓开发
  • 原文地址:https://www.cnblogs.com/jourage/p/10444251.html
Copyright © 2011-2022 走看看