coupons.hbs 8.17 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}}
                <div class="coupons-wrap">
                    <p class="coupons-header clearfix">
                        <span class="coupons-name">优惠券名称</span>
                        <span class="coupons-info">详细说明</span>
                        {{#if unUse}}
                            <span class="coupons-opt">操作</span>
                        {{/if}}
                        {{#if used}}
                            <span class="coupons-opt">订单号</span>
                        {{/if}}
                        {{#if noValid}}
                            <span class="coupons-opt">状态</span>
                        {{/if}}
                    </p>

                    {{# unUseCoupons}}
                    {{#unless empty}}
                        <div class="coupon" data-couponId="{{id}}">
                            <div class="coupons-card{{#isEqual couponType 5}} coupons-freight{{/isEqual}}">
                                <div class="coupons-card-header">
                                    <p class="left-title">{{useRemark}}</p>
                                    <p class="right-title">{{overState}}</p>
                                </div>
                                <div class="coupons-card-content">
                                    <div class="coupons-card-row">
                                        <div class="coupons-sht">
                                            <p class="coupons-price">{{value}}</p>
                                            {{#if rule}}
                                                <p class="coupons-full" title="{{rule}}">{{rule}}</p>
                                            {{/if}}
                                        </div>
                                        <div class="coupons-dtl">{{beginTime}} - {{endTime}}</div>
                                    </div>
                                </div>
                            </div>

                            <div class="coupons-info">
                                <div class="coupons-text">
                                    {{notes}}
                                </div>
                            </div>

                            <div class="coupons-opt">
                                <a class="btn use-btn" id="coupon-use" href="{{proListUrl}}" target="_black">立即使用</a>
                            </div>
                        </div>
                    {{/unless}}
                    {{/ unUseCoupons}}

                    {{# usedCoupons}}
                    {{#unless empty}}
                        <div class="coupon" data-couponId="{{id}}">
                            <div class="coupons-card coupons-use{{#isEqual couponType 5}} coupons-freight{{/isEqual}}">
                                <div class="coupons-card-header">
                                    <p class="left-title">{{useRemark}}</p>
                                    <p class="right-title">{{overState}}</p>
                                </div>
                                <div class="coupons-card-content">
                                    <div class="coupons-card-row">
                                        <div class="coupons-sht">
                                            <p class="coupons-price">{{value}}</p>
                                            {{#if rule}}
                                                <p class="coupons-full" title="{{rule}}">{{rule}}</p>
                                            {{/if}}
                                        </div>
                                        <div class="coupons-dtl">{{beginTime}} - {{endTime}}</div>
                                    </div>
                                </div>
                            </div>
                            <div class="coupons-info">
                                <div class="coupons-text">
                                    {{#categorys}}<p>限品类:{{.}}</p>{{/categorys}}
                                    {{#brands}}<p>限品牌:{{.}}</p>{{/brands}}
                                    {{#if isNoLimit}}<p>全场通用</p>{{/if}}
                                    <p>特例商品({{extraPro}}等特例商品)暂不支持使用优惠券。</p>
                                    {{#explains}}<p>说明:{{.}}</p>{{/explains}}
                                </div>
                            </div>
                            <div class="coupons-opt">
                            <a href="{{orderDetailUrl}}">
                                <p>{{orderNum}}</p>
                                <p>{{useTime}}</p>
                            </a>
                            </div>
                        </div>
                    {{/unless}}
                    {{/ usedCoupons}}

                    {{# noValidCoupons}}
                    {{#unless empty}}
                        <div class="coupon" data-couponId="{{id}}">
                            <div class="coupons-card coupons-invalid">
                                <div class="coupons-card-header">
                                    <p class="left-title">{{useRemark}}</p>
                                    <p class="right-title">{{overState}}</p>
                                </div>
                                <div class="coupons-card-content">
                                    <div class="coupons-card-row">
                                        <div class="coupons-sht">
                                            <p class="coupons-price">{{value}}</p>
                                            {{#if rule}}
                                                <p class="coupons-full" title="{{rule}}">{{rule}}</p>
                                            {{/if}}
                                        </div>
                                        <div class="coupons-dtl">{{beginTime}} - {{endTime}}</div>
                                    </div>
                                </div>
                            </div>
                            <div class="coupons-info">
                                <div class="coupons-text">
                                    {{#categorys}}<p>限品类:{{.}}</p>{{/categorys}}
                                    {{#brands}}<p>限品牌:{{.}}</p>{{/brands}}
                                    {{#if isNoLimit}}<p>全场通用</p>{{/if}}
                                    <p>特例商品({{extraPro}}等特例商品)暂不支持使用优惠券。</p>
                                    {{#explains}}<p>说明:{{.}}</p>{{/explains}}
                                </div>
                            </div>
                            <div class="coupons-opt">
                                <a class="btn overtime-btn">过期</a>
                            </div>
                        </div>
                    {{/unless}}
                    {{/ noValidCoupons}}
                </div>
                {{#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>