product.hbs 2.31 KB
{{# data}}
    {{#if total}}
        <div class="favorite-products">
            <div class="products-cates clearfix">
                {{#each categoryList}}
                    <div class="label {{#if checked}}focus{{/if}}">
                        <a href="?sort={{categoryId}}">{{categoryName}} ({{num}})</a>
                    </div>
                {{/each}}
            </div>

            <div class="clearfix product-list">
                {{#each products}}
                    <div class="goods-info" data-id="{{productId}}">
                        <div class="choose-icon">
                            <span class="iconfont">&#xe646;</span>
                        </div>
                        <div class="goods-img">
                            <img class="lazy thumb" data-original="{{imageUrl}}" style="display: block;">

                            {{#stateText}}
                                <div class="goods-state-bg"></div>
                                <div class="goods-state">
                                    {{this}}
                                </div>
                            {{/stateText}}
                        </div>
                        <div class="desc">
                            <span class="name">{{productName}}</span>
                            <p class="price">¥{{round salesPrice 2}}</p>
                        </div>
                        <div class="tool-area clearfix">
                            <a class="btn white" href="{{url}}" target="_blank">立即购买</a>
                            <span class="btn white cancel">取消收藏</span>
                        </div>
                    </div>
                {{/each}}
            </div>
            <div class="favorite-footer">
                <div class="favorite-tool">
                    <div class="check-all">
                        {{> icon/checkbox}}
                        <label>全选</label>
                    </div>

                    <div class="favorite-cancel">
                        取消收藏
                    </div>
                </div>
                {{{ pagination paginationData }}}
            </div>
        </div>
    {{^}}
        <div class="favorite-empty">
            <p>您还没有收藏的商品, 去<a href="{{siteUrl}}">首页</a>看看吧</p>
        </div>
    {{/if}}
{{/data}}