1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <title>精美时尚</title>
- <link href="css/global.css?v=3f8cf811" rel="stylesheet"><link href="css/pay.css?v=3f8cf811" rel="stylesheet"></head>
- <body>
- <div class="container">
- <div>
- <div class="h1">正在购买《xxxx》</div>
- <div class='buytip' id="open">
- <p>查看购买说明</p>
- </div>
- <div class="list">
- <a class="item active" bind-id="item" href="#">
- <p>购买10本</p>
- <p>¥6</p>
- </a>
- <a class="item" bind-id="item" href="#">
- <p>购买10本</p>
- <p>¥6</p>
- </a>
- <a class="item" bind-id="item" href="#">
- <p>购买10本</p>
- <p>¥6</p>
- </a>
- </div>
- </div>
- <div class='fix-footer'>
- <a href="javascript:history.go(-1)" class='back-btn'>返回</a>
- <a href="javascript:;" id="dopay" class="fix-button">确认购买</a>
- </div>
- </div>
- <div class="mask fn-hide" id="layer">
- <div class="layer ">
- <h3 class="title">购买说明</h3>
- <div class="richtext">asdfsdf</div>
- <div class="btn-wrapper">
- <div class="button opposite" node-act="close">我知道了</div>
- </div>
- </div>
- </div>
- <div class="mask fn-hide" id="pay-layer">
- <div class="layer buy-result">
- <h3 class="title">购买提示</h3>
- <div class="res" id="buyyes">您已成功购买1000本电子刊</div>
- <div class="btn-wrapper">
- <a href="codedetail.html" class="button" id="viewcode">查看兑换码</a>
- <div class="button" node-act="close">继续购买</div>
- </div>
- </div>
- </div>
- <div id="pay"></div>
- <script type="text/javascript" src="js/global.js?v=3f8cf811"></script><script type="text/javascript" src="js/pay.js?v=3f8cf811"></script></body>
- <script>
-
- var payStatus = false;
- $(document).on('click', '[bind-id="item"]', function(){
- $(this).addClass('active').siblings('.item').removeClass('active');
- //$('#pay-layer').show();
- });
- $('#dopay').on('click',function(){
- if (payStatus == false) {
- $(this).html('支付中...');
- var url = $('.active').attr('data-pay');
- payStatus = true;
- pay(url);
- }
- });
- $('#open').on('click',function(){
- $('#layer').show();
- });
- $('[node-act="close"]').on('click',function(){
- $(this).closest('.mask').hide();
- });
- function pay(url)
- {
- $.get(url, function(t) {
- $("#pay").html(t);
- payStatus = false;
- $('#dopay').html('确认购买');
- })
- }
- </script>
- </html>
|