charge2.html 2.6 KB
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>我要充值</title>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <script type="text/javascript" src="__TMPL__/static/js/base.js"></script>
    <link rel="stylesheet" type="text/css" href="__TMPL__/static/assets/css/weui.min.css" />
    <link rel="stylesheet" type="text/css" href="__TMPL__/static/assets/css/swiper-3.4.2.min.css" />
    <link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_773803_6y9erxzbkn2.css" />
    <script type="text/javascript" src="__TMPL__/static/assets/font/iconfont.js">
    </script>
    <link rel="stylesheet" href="__TMPL__/static/css/myWallet.css" />
    <script src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
</head>

<body>
<div class="out">
    <div class="btns">
        <div class="pay">
            充值套餐
        </div>
        <div class="activie">
            <a href="{:url('Center/charge')}">
                <div class="activity">普通充值</div>
            </a>
            <div class="ordinary">活动专享</div>
        </div>

        <div class="btnlist">
            <volist name="data" id="vo" key="k">
                <div data-id="{$vo.id}" class="btn <if condition="$k eq '1'">active one</if>">¥{$vo.denomination}送{$vo.bonus}</div>
            </volist>
    </div>
</div>

</div>
<div class="footer ok">
    一键充值
</div>
</body>

</html>
<script type="text/javascript" src="__TMPL__/static/assets/js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="__TMPL__/static/assets/js/swiper-3.4.2.min.js"></script>
<script type="text/javascript" src="__TMPL__/static/assets/js/weui.js"></script>
<script>
    $('.btn').click(function(){
        $(this).attr('class','btn active one');
        $(this).siblings().attr('class','btn');
    })

    wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
        appId: '{$js_sdk.appId}', // 必填,公众号的唯一标识
        timestamp: '{$js_sdk.timestamp}', // 必填,生成签名的时间戳
        nonceStr: '{$js_sdk.nonceStr}', // 必填,生成签名的随机串
        signature: '{$js_sdk.signature}',// 必填,签名
        jsApiList: [
            'chooseWXPay'
        ] // 必填,需要使用的JS接口列表
    });
    
    $(".ok").click(function () {
        var id = $(".active").attr('data-id')
        alert(id);
    })

</script>