<!--{include file="<!--{$mpath}-->block_header.tpl"}-->
<!--loading页开始-->
<div class="loading">
    <div class="loader">
        <div class="loader-inner pacman">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</div>
<!--loading页结束-->
<body>
<header class="mui-bar mui-bar-nav report-header box-s" id="header">
    <a href="javascript:history.go(-1)  "><i class="iconfont icon-fanhui fl"></i></a>
    <p>确认订单</p>
</header>
<div id="main" class="mui-clearfix" style="padding-top: 53px; padding-bottom: 57px;">
    <div class="plist confirm clearfloat">
        <ul>
            <!--{if empty(<!--{$addressinfo}-->)}-->
            <input type="hidden" id="addressid" value=""/>
            <input type="hidden" id="goodsid" value="<!--{$goodsid}-->"/>
            <input type="hidden" id="num" value="<!--{$num}-->"/>
            <li class="clearfloat">
                <a href="index.php?c=user&a=user_address&res=1&type=1&id=<!--{$goodsid}-->&num=<!--{$num}-->">
                    <i class="iconfont icon-dizhi icon-dizhitwo fl"></i>
                    <p class="fl">新增收货地址</p>
                    <i class="iconfont icon-qianjin fr"></i>
                </a>
            </li>
            <!--{else}-->
            <input type="hidden" id="addressid" value="<!--{$addressinfo.id}-->"/>
            <input type="hidden" id="goodsid" value="<!--{$goodsid}-->"/>
            <input type="hidden" id="num" value="<!--{$num}-->"/>
            <li class="clearfloat">
                <a href="index.php?c=user&a=user_address&res=1&type=1&id=<!--{$goodsid}-->&num=<!--{$num}-->">
                    <i class="iconfont icon-dizhi icon-dizhitwo fl" style="margin-top: 20px;"></i>
                    <p class="fl"><!--{$addressinfo.name}-->&nbsp;&nbsp;<!--{$addressinfo.phone}-->
                    </p>
                    <p class="fl"><!--{$addressinfo.province}--><!--{$addressinfo.city}--><!--{$addressinfo.county}--><!--{$addressinfo.address}-->
                    </p>
                    <i class="iconfont icon-qianjin fr" style="margin-top: -15px;"></i>
                </a>
            </li>
            <!--{/if}-->


        </ul>
    </div>

    <div class="order-list order-listtwo clearfloat">
        <!--{foreach $data as $volist}-->
        <div class="list clearfloat fl box-s">
            <a href="index.php?c=integral&a=detail&id=<!--{$volist.productid}-->">
                <div class="tu fl clearfloat">
                    <img src="<!--{$volist.uploadfiles}-->"/>
                </div>
                <div class="middle clearfloat fl">
                    <p class="tit"><!--{$volist.productname}--></p>
                    <p class="fu-tit">
                        商品分类：<!--{$volist.catname}-->
                    </p>
                    <p class="price clearfloat">
                        <span class="xprice fl">积分：<!--{$volist.bprice}--></span>
                        <span class="shu">×<!--{$volist.productnum}--></span>
                    </p>
                </div>
            </a>
        </div>
        <!--{/foreach}-->

        <div class="confirm-total clearfloat box-s">
            <ul>
                <li>共计<span><!--{$goodsnum}--></span>件商品</li>

            </ul>
        </div>
    </div>
    <!--
        <div class="plist clearfloat data confirm-list box-s contaniner">
            <ul>
                <li class="clearfloat" onClick="toshare()">
                    <a href="#">
                        <p class="fl">配送方式</p>
                        <i class="fr iconfont icon-right icon-qianjin"></i>
                    </a>
                </li>-->
    <!--这里是配送方式内容-->
    <!--	<div class="am-share">
            <h3 class="am-share-title">配送方式</h3>
            <div class="am-share-sns box-s">
                <div class="am-list">
                    <div class="addlist clearfloat">
                        <div class="bottom clearfloat box-s">
                            <section class="shopcar clearfloat">
                                <span class="fl">自提点自提</span>
                                <div class="shopcar-checkbox fr">
                                    <label for="shopcar" onselectstart="return false" class="shopcar-checkd"></label>
                                    <input type="checkbox" id="shopcar"/>
                                </div>
                            </section>
                        </div>
                    </div>
                </div>
                <div class="am-list">
                    <div class="addlist clearfloat">
                        <div class="bottom clearfloat box-s">
                            <section class="shopcar clearfloat">
                                <span class="fl">快递</span>
                                <div class="shopcar-checkbox fr">
                                    <label for="shopcar" onselectstart="return false"></label>
                                    <input type="checkbox" id="shopcar"/>
                                </div>
                            </section>
                        </div>
                    </div>
                </div>
            </div>
            <div class="am-share-footer"><button class="share_btn">关闭</button></div>
        </div>
        <li class="clearfloat">
            <a href="#">
                <p class="fl">订单留言</p>
                <input type="text" class="fr shuru" name="" id="" value="" placeholder="限50字以内" />
            </a>
        </li>
    </ul>
</div>

<div class="clearfloat data confirm-list confirm-listwo box-s">
    <ul>
        <li class="clearfloat">
            <a href="#">
                <p class="fl">商品件数：</p>
                <span class="fr">2</span>
            </a>
        </li>
        <li class="clearfloat">
            <a href="#">
                <p class="fl">总商品金额：</p>
                <span class="fr">yen598</span>
            </a>
        </li>
        <li class="clearfloat">
            <a href="#">
                <p class="fl">可获得积分：</p>
                <span class="fr">78</span>
            </a>
        </li>
        <li class="clearfloat">
            <a href="#">
                <p class="fl">运费：</p>
                <span class="fr">yen0.00</span>
            </a>
        </li>
    </ul>
</div>
-->
</div>

<footer class="page-footer fixed-footer" id="footer">
    <p class="confirm-price fl box-s">
        合计：<span><!--{$djtotal}--> 积分</span>
    </p>
    <a href="javascript:void(0)" class="confirm-submit fl" id="tijiao">
        立即兑换
    </a>
</footer>
</body>
<script type="text/javascript" src="<!--{$mpath}-->js/jquery-1.8.3.min.js" ></script>
<script src="<!--{$mpath}-->layer_mobile/layer.js"></script>
<script src="<!--{$mpath}-->js/fastclick.js"></script>
<script src="<!--{$mpath}-->js/mui.min.js"></script>
<script type="text/javascript" src="<!--{$mpath}-->js/hmt.js" ></script>
<script type="text/javascript" src="<!--{$mpath}-->js/psong.js" ></script>
<script type="text/javascript">
    $(".shopcar-checkbox label").on('touchstart',function(){
        if($(this).hasClass('shopcar-checkd')){
            $(".shopcar-checkbox label").removeClass("shopcar-checkd")
        }else{
            $(".shopcar-checkbox label").addClass("shopcar-checkd")
        }
    })
    $("#tijiao").click(function(e){
        var addressid=$("#addressid").val();
        var goodsid=$("#goodsid").val();
        var num=$("#num").val();
        if(addressid == ''){
            layer.open({
                content: '请先填写地址信息'
                ,skin: 'msg'
                ,time: 2 //2秒后自动关闭
            });
            return false;
        }
        $.post("<!--{$urlpath}-->index.php?c=integral&a=submitorder", {
            addressid:addressid,goodsid:goodsid,num:num
        }, function (data) {
            if (data.response == '1') {
                layer.open({
                    content: data.result
                    ,skin: 'msg'
                    ,time: 2 //2秒后自动关闭
                });
                setTimeout( function(){
                    window.location.href = data.jumpurl;
                }, 1 * 1000 );//延迟5000毫米
            } else {
                layer.open({
                    content: data.result
                    ,skin: 'msg'
                    ,time: 2 //2秒后自动关闭
                });
            }
        }, "json");
    });
</script>
</html>