get_one.html 11.3 KB
<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <title>学考无忧</title>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css"/>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css"/>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/log.css"/>
    <style>
        .pay_banner {
            width: 100%;
            height: 1.3rem;
            background-size: cover;
            background-image: url("__TMPL__/public/assets/images/54.png");
        }

        .order_address {
            padding: 0.28rem 0 0.42rem;
            box-sizing: border-box;
            background-repeat: no-repeat;
            background-image: url("__TMPL__/public/assets/images/32.png");
            background-position: bottom;
            background-size: 100% 0.06rem;
        }
        .tx_maskCon2 {
            padding: 0;
        }
        .delete_school {
            background: linear-gradient(338deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
            border-radius: 0.08rem;
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
            height: 1rem;
        }
        .dianhua {
            background: ;
            padding: 0.5rem 0;
            font-size: 0.32rem;
            color: #333;
            text-align: center;
        }
    </style>
</head>

<body>



<div class="Dpayment">

    <!--售后咨询弹框开始-->
    <div class="tx_mask" onclick="$(this).hide()" style="display: none">
        <div class="tx_maskCon" onclick="zZFun(this)">
            <div class="tx_maskCon2" style="border-radius: 0.1rem;">
                <div class="delete_school">
                </div>
                <div class="dianhua">售后电话:{$phone.phone}</div>
            </div>
        </div>
    </div>
    <!--售后咨询弹框结束-->
    <!-- 顶部 -->
    <div class="order_top">
        <a href="javascript:history.back();">
            <img src="__TMPL__/public/assets/images/left.png" alt=""/>
        </a>
        <p>我的订单</p>
    </div>
    <!-- 顶部banner -->
    <div class="pay_banner">
        <div class="pay_bannerLeft">
            <div class="pay_bannerImg">
                    <img src="__TMPL__/public/assets/images/53.png" alt=""/>
            </div>
            <p>
                <if condition="$data.state eq 4">
                    待付款
                    <elseif condition="$data.state eq 2"/>
                    待发货
                    <elseif condition="$data.state eq 5"/>
                    已发货
                    <elseif condition="$data.state eq 3"/>
                    已完成
                </if>
            </p>
        </div>
        <if condition="$data.state eq 4">
            <div class="pay_bannerRight">
                <p class="timespan"></p>
                <p>订单自动关闭</p>
            </div>
        </if>

    </div>
    <!-- 地址  -->
    <div class="order_address">
        <!-- 有地址 -->
        <if condition="$data.is_courier eq 1">
            <if condition="$data.state eq 4">
                <a href="{:url('orderpage/go_add_address',array('indet_id'=>$data['id']))}">
                    <div class="order_addressYes">
                        <div class="or_addressYesImg1">
                            <img src="__TMPL__/public/assets/images/38.png" alt=""/>
                        </div>
                        <div class="or_addressYesTxt1">
                            <div class="or_addressYesTxt2">
                                <div class="or_addressName">{$data.name}</div>
                                <p class="or_addressPhone">{$data.phone}</p>
                            </div>
                            <p class="or_address_detailed">
                                {$data.region}{$data.school}{$data.grade}{$data.class}
                            </p>
                        </div>
                        <div class="or_addressYesImg2">
                            <img src="__TMPL__/public/assets/images/29.png" alt=""/>
                        </div>
                    </div>
                </a>
                <else/>
                <a href="">
                    <div class="order_addressYes">
                        <div class="or_addressYesImg1">
                            <img src="__TMPL__/public/assets/images/38.png" alt=""/>
                        </div>
                        <div class="or_addressYesTxt1">
                            <div class="or_addressYesTxt2">
                                <div class="or_addressName">{$data.name}</div>
                                <p class="or_addressPhone">{$data.phone}</p>
                            </div>
                            <p class="or_address_detailed">
                                {$data.region}{$data.school}{$data.grade}{$data.class}
                            </p>
                        </div>
                        <div class="or_addressYesImg2">
                            <img src="__TMPL__/public/assets/images/29.png" alt=""/>
                        </div>
                    </div>
                </a>
            </if>

            <else />
            <a href="">
                <div class="order_addressYes">
                    <div class="or_addressYesImg1">
                        <img src="__TMPL__/public/assets/images/38.png" alt=""/>
                    </div>
                    <div class="or_addressYesTxt1">
                        <div class="or_addressYesTxt2">
                            <div class="or_addressName">{$data.address.name}</div>
                            <p class="or_addressPhone">{$data.address.phone}</p>
                        </div>
                        <p class="or_address_detailed">
                            {$data.address.region}{$data.address.detailed}
                        </p>
                    </div>
                    <div class="or_addressYesImg2">
                        <img src="__TMPL__/public/assets/images/29.png" alt=""/>
                    </div>
                </div>
            </a>
        </if>
    </div>
    <!-- 订单信息 -->
    <div class="order_news">
        <h1 class="order_newsTit">订单信息</h1>
        <ul class="order_newsUl">
            <foreach name="$data.indent_goods" item="i_g">
                <li>
                    <div class="order_newsImg">
                        <img src="{:cmf_get_image_url($i_g['thumbnail'])}" alt=""/>
                    </div>
                    <div class="order_newsCon">
                        <div class="order_newsTxt1 txt-cut">
                            {$i_g.book_name}
                        </div>
                        <div class="order_newsTxt2">×<span>{$i_g.number}</span></div>
                        <div class="order_newsTxt3">
                            <p class="de_topTxt1_1"><span>{$i_g.price}</span></p>
                            <p class="de_topTxt1_2"><span>{$i_g.pricing}</span></p>
                        </div>
                    </div>
                </li>
                <php>$sum[] = $i_g['price']*$i_g['number'];</php>
            </foreach>
        </ul>
    </div>
    <!-- 支付方式/配送方式 -->
    <div class="order_Etc">
        <div class="order_Etc1 ypayTxt">
            <p>订单编号:</p>
            <p>{$data.order_number}</p>
        </div>
        <div class="order_Etc1 ypayTxt">
            <p>下单时间:</p>
            <p>{:date('Y-m-d H:i:s',$data.create_time)}</p>
        </div>
        <div class="order_Etc1 ypayTxt">
            <p>配送方式:</p>
            <if condition="$data.is_courier eq 1">
                <p>统一配送</p>
                <elseif condition="$data.is_courier eq 2"/>
                <p>快递({$data.money-array_sum($sum)}元)</p>
            </if>
        </div>
    </div>
    <!-- 实付金额: -->
    <div class="ypay_price">
        <p class="ypay_price1">实付金额:</p>
        <p class="de_topTxt1_1"><span>{$data.money}</span></p>
    </div>
    <!-- 底部 -->

    <div class="pay_bottom">
        <div class="pay_bottom2">
            <if condition="$data.state eq 5">
                <if condition="$data.is_courier eq 2">
                    <a href="{:url('logistics/index',array('indent_id'=>$data['id']))}">
                        <div class="pay_bottom2_1">物流信息</div>
                    </a>

                </if>

                <elseif condition="$data.state eq 5 || $data.state eq 3 || $data.state eq 2"/>
                <div class="pay_bottom2_2">售后咨询</div>
                <elseif condition="$data.state eq 4"/>
                <div class="myorder_bottom2_1 cancel_order" data-id="{$data.id}">取消订单</div>
                <a href="{:url('portal/pay/index',array('id'=>$data['id']))}">
                    <div class="myorder_bottom2_2">去支付</div>
                </a>
            </if>
        </div>
    </div>
</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
</body>
<script>
    <!--售后咨询弹窗-->
    $(".pay_bottom2_2").click(function() {
        console.log(123)
        $(".tx_mask").css("display","block")
    })
    function zZFun(e) {
        window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
    }


    $(function () {
        $('.cancel_order').click(function () {
            var indent_id = $(this).attr('data-id');
            $.ajax({
                url: "{:url('portal/order/cancel_order')}",
                type: "POST",
                data: {'id': indent_id},
                success: function (data) {
                    if(data.code==1){
                        alert('取消成功!')
                        window.location.href = "{:url('portal/order/get_all')}";
                    }else{
                        alert('出错啦,请稍后再试!')
                    }
                },
                error: function (data) {
                    alert('与服务器断开连接');
                }
            })
        })
    })

</script>
<script>
    var lastTime = {$data.create_time} + 86400; //最后时间时间戳(秒)
    var currentTime = Date.parse(new Date()) / 1000; //当前时间时间戳(秒)
    console.log(currentTime);
    var intDiff = parseInt(lastTime - currentTime); //倒计时总秒数量
    function timer(intDiff) {
        window.setInterval(function() {
            var day = 0,
                hour = 0,
                minute = 0,
                second = 0; //时间默认值
            if(intDiff > 0) {
                day = Math.floor(intDiff / (60 * 60 * 24));
                hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
                minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
                second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
            }
            if(minute <= 9) minute = '0' + minute;
            if(second <= 9) second = '0' + second;
            var time = hour + '时' + minute + '分'  + second + '秒'
            console.log(time);
            $('.timespan').html(time)
            intDiff--;
        }, 1000);
    }
    timer(intDiff);
</script>
</html>