confirmorder.html 4.7 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>确认订单</title>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_ycnvxk1als.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/diseaseColumn.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/shop.css">
    <script src="__TMPL__/public/assets/js/fontsize.js"></script>
</head>
<body style="background: #F5F6FA;">
<div class="order_box">
    <div class="order_info">
        <div class="address_box">
            <div class="address_info">
                <div>
                    <text class="name">向昱筱</text>
                    <text class="tel">13252648165</text>
                </div>
                <div class="address_detail">天津市和平区气象台路1088号中环公寓</div>
            </div>
            <div class="iconfont icon-jiantou1"></div>
        </div>
    </div>
    <!-- begin:订单信息 -->
    <div class="order_info">
        <h2>订单信息</h2>
        <div class="order_ul">
            <div class="order_item">
                <div class="order_item">
                    <div class="info_left"><img src="{:cmf_get_image_url($good.thumbnail)}"></div>
                    <div class="info_right">
                        <p class="info_txt1">{$good.name}</p>
                        <p class="info_txt2"></p>
                        <p class="info_num"><span>{$good.fee}</span>积分</p>
                    </div>
                </div>
                <div class="info_number">X{$good.num}</div>
            </div>
        </div>
    </div>
    <!-- begin:支付方式 -->
    <div class="order_info">
        <ul class="order_pay order_detail">
            <li class="order_item label">
                <span>配送方式</span>
                <div class="order_label right">包邮</div>
            </li>
            <li class="order_item label">
                <span>支付方式</span>
                <div class="order_label right">积分</div>
            </li>
        </ul>
    </div>
    <!---->
    <div class="order_info">
        <ul class="order_pay order_detail">
            <li class="order_item label">
                <span>商品金额</span>
                <div class="order_label right">{$good.fee}积分</div>
            </li>
            <li class="order_item label">
                <span>运费</span>
                <div class="order_label right">¥0</div>
            </li>
        </ul>
    </div>
    <div class="order_info">
        <ul class="order_pay">
            <li class="total">
                <span>留言</span>
                <textarea class="content" placeholder="给买家留言(45字以内)"></textarea>
            </li>
        </ul>
    </div>
</div>
<!-- begin:支付订单 -->
<div class="null_box"></div>
<div class="bottom_box">
    <p class="orser_txt1">实付:<span><text class="money_icon">{$total_fee}</text>积分 </span></p>
    <div class="order_btn">支付订单</div>
</div>
<script type="text/javascript" src="__TMPL__/public/assets/js/jquery-2.1.0.js   "></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script type="application/javascript">
    wx.config({$sdk});
    $('.order_btn').click(function (res) {
        var num = {$good.num};
        var name = $('.name').html();
        var tel = $('.tel').html();
        var address_detail = $('.address_detail').html();
        var id = {$good.id};
        var content = $('.content').val();
        $.ajax({
            type: 'POST',
            url: '{:url('confirmOrder')}',
            data: {
                num: num,
                id: id,
                content: content,
                address: address_detail,
                tel:tel,
                name:name,
            },
            success:function (res) {
                if (res.code==1){
                    alert(res.msg);
                    window.location.href='{:url('/')}'
                }else {
                    alert(res.msg);
                }
            }
        })
    })
    wx.openAddress({
        success: function (res) {
           alert(JSON.stringify(res));
        }
    });
    $('.address_info').click(function () {
        wx.openAddress({
            success: function (res) {
                $('.name').text(res.userName);
                $('.tel').text(res.telNumber);
                $('.address_detail').text(res.detailInfo);
            }
        });
    })
</script>
</body>
</html>