coupons.hbs 4.87 KB
<div class="me-coupons-page me-page yoho-page clearfix">
        {{> path}}
        {{> 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>

                {{> 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="{{image2 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="{{image2 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="{{image2 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}}
                        {{> pager}}
                    {{^}}
                        {{#with unUseCoupons}}
                            {{> empty}}
                        {{/with}}
                    {{/unless}}
                {{/if}}

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

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

</div>