order.phtml 1.15 KB
<div class="order" data-id="{{orderNum}}" data-href="{{detailUrl}}">
    <header class="header">
        订单编号:{{orderNum}}
        <span class="order-status">{{orderStatus}}</span>
    </header>
    <section class="order-goods">
        {{# goods}}
            {{> me/order/good}}
        {{/ goods}}
    </section>
    <footer class="footer">
        共{{count}}件商品  实付<span class="sum-cost">¥{{sumCost}}</span>
    </footer>

    {{!-- 对应订单状态的操作逻辑 --}}

    {{!-- 完成和取消订单显示删除按钮 --}}
    <div class="order-opt">
        {{#unless unpaid}}
            {{#unless unreceived}}
                <span class="btn del">删除订单</span>
            {{/unless}}
        {{/unless}}

        {{#if unpaid}}
            <span class="btn cancel">取消订单</span>
            <a class="locHref" href="{{payUrl}}">
                <span class="btn pay">立即付款</span>
            </a>
        {{/if}}

        {{#if unreceived}}
            <a class="locHref" href="{{logisticsUrl}}">
                <span class="btn check-logistics">查看物流</span>
            </a>
        {{/if}}
    </div>
</div>