onlinePayment.js 2.32 KB
$(function () {
    layui.use('element', function () {
        let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
    });
    addTabs('#wssq')
    setAcceptFlow(GetQueryString('bsm_slsq'),GetQueryString('businessno'));
    layui.use('laytpl', function () {
        laytpl = layui.laytpl;
        var getTpl = document.getElementById('progress').innerHTML
            , view = document.getElementById('app_progress');
        laytpl(getTpl).render(data, function (html) {
            view.innerHTML = html;
        });

        layui.use(['element'], function () {
            var element = layui.element;
            //初始化动态元素,一些动态生成的元素如果不设置初始化,将不会有默认的动态效果
            element.init();
        });
    });
    // 
    $('.payment_channel_con li').click(function () {
        $('.payment_channel_con li').removeClass('payActive');
        $(this).addClass('payActive');
        let index = $(this).index()
        $('.codeShowImg').show()
        if (index ==0) {
            $('.codeShowImg').attr('src','../staticImages/weixinShow.png')
            $('.paymentText').text('打开手机微信')
        }else {
            $('.codeShowImg').attr('src','../staticImages/alipayShow.png')
            $('.paymentText').text('打开手机支付宝')
        }
    })
    layui.use('layer', function () {
        layer.open({
            type: 1,
            title: false,
            closeBtn: 0,
            shade:0,
            shadeClose: true,
            skin: 'paymentSuccess',
            btn: ['下一步'],
            yes : function() {
                skipNextPage(GetQueryString('bsm_slsq'),GetQueryString('businessno'));
            },
            content: '<ul>'
                + '<li><img src="../../staticImages/xuanzhong.png"></li>'
                + '<li>支付成功</li>'
                + '<li class="info"><span>支付流水号:</span><p>9898989989</p></li>'
                + '<li class="info"><span>支付时间:</span><p>2023255-102-13</p></li>'
                + '<li class="info"><span>支付金额:</span><p>600元</p></li>'
                + '</ul>'
        });
    })

    $('.payment_channel_con li').click(function () {
        $('.payment_channel_con li').removeClass()
        $(this).addClass('payActive')
    })
})