coupons.phtml 5.1 KB
{{> layout/header}}
<div class="me-coupons-page me-page yoho-page clearfix">
    {{# meCoupons}}
        {{> home/path}}

        {{> home/navigation}}

        <div class="me-main">
            <div class="coupons{{#if unUse}} un-use-coupons{{/if}}{{#if used}} used-coupons{{/if}}{{#if noValid}} no-valid-coupons{{/if}} block">
                <h2 class="title">优惠券</h2>

                {{> home/tabs}}

                <p class="coupons-header clearfix">
                    {{#if unUse}}
                        <span class="coupons-img">优惠券图片</span>
                        <span class="value">面值</span>
                        <span class="term-of-validity">有效期</span>
                        <span class="use-remark">适用说明</span>
                        <span class="status">状态</span>
                    {{/if}}

                    {{#if used}}
                        <span class="coupons-img">优惠券图片</span>
                        <span class="value">面值</span>
                        <span class="order-num">订单编号</span>
                        <span class="order-sum">订单金额</span>
                        <span class="payment">实付金额</span>
                        <span class="use-time">使用时间</span>
                    {{/if}}

                    {{#if noValid}}
                        <span class="coupons-img">优惠券图片</span>
                        <span class="value">面值</span>
                        <span class="term-of-validity">有效期</span>
                        <span class="use-remark">适用说明</span>
                    {{/if}}
                </p>

                {{# unUseCoupons}}
                {{#unless empty}}
                    <div class="coupon">
                        <div class="coupons-img">
                            <img src="{{img}}">
                        </div>
                        <span class="value">{{value}}</span>
                        <div class="term-of-validity{{#if endSoon}} end-soon{{/if}}">
                            {{beginTime}}
                            -
                            <br>
                            {{endTime}}&nbsp;&nbsp;
                            <br>
                            <span>即将过期</span>
                        </div>
                        <span class="use-remark">{{useRemark}}</span>
                        <span class="status">{{status}}</span>
                    </div>
                {{/unless}}
                {{/ unUseCoupons}}

                {{# usedCoupons}}
                {{#unless empty}}
                    <div class="coupon">
                        <div class="coupons-img">
                            <img src="{{img}}">
                        </div>
                        <span class="value">{{value}}</span>
                        <span class="order-num"><a href="{{orderDetailUrl}}">{{orderNum}}</a></span>
                        <span class="order-sum">{{orderSum}}</span>
                        <span class="payment">{{payment}}</span>
                        <span class="use-time">{{useTime}}</span>
                    </div>
                {{/unless}}
                {{/ usedCoupons}}

                {{# noValidCoupons}}
                {{#unless empty}}
                    <div class="coupon">
                        <div class="coupons-img">
                            <img src="{{img}}">
                        </div>
                        <span class="value">{{value}}</span>
                        <div class="term-of-validity{{#if endSoon}} end-soon{{/if}}">
                            {{beginTime}}
                            -
                            <br>
                            {{endTime}}&nbsp;&nbsp;&nbsp;
                        </div>
                        <span class="use-remark">{{useRemark}}</span>
                    </div>
                {{/unless}}
                {{/ noValidCoupons}}

                {{#if unUseCoupons}}
                    {{#unless unUseCoupons.empty}}
                        {{> home/pager}}
                    {{^}}
                        {{#with unUseCoupons}}
                            {{> home/empty}}
                        {{/with}}
                    {{/unless}}
                {{/if}}

                {{#if usedCoupons}}
                    {{#unless usedCoupons.empty}}
                        {{> home/pager}}
                    {{^}}
                        {{#with usedCoupons}}
                            {{> home/empty}}
                        {{/with}}
                    {{/unless}}
                {{/if}}

                {{#if noValidCoupons}}
                    {{#unless noValidCoupons.empty}}
                        {{> home/pager}}
                    {{^}}
                        {{#with noValidCoupons}}
                            {{> home/empty}}
                        {{/with}}
                    {{/unless}}
                {{/if}}

            </div>

        </div>
    {{/ meCoupons}}
</div>
{{> layout/footer}}