favorite.phtml 4.19 KB
{{> layout/header}}
<div class="yoho-favorite-page yoho-page">
    {{# favorite}}
    <ul id="fav-tab" class="fav-tab {{# brandTab}}brand-tab{{/ brandTab}}">
        <li>收藏的商品</li>
        <li>收藏的品牌</li>
    </ul>
    <div class="fav-content" id="fav-content">
        <div class="fav-type">
            <ul class="fav-product-list">
                {{# hasFavProduct}}
                <li data-id="{{fav_id}}">
                    <a href="{{link}}">
                    <div class="fav-img-box">
                        <img src="{{imgUrl}}" alt=""/>
                    </div>
                    <div class="fav-info-list">
                        <h2>{{title}}</h2>
                        <div class="fav-price">
                            {{# discountPrice}}
                            <span class="new-price">{{.}}</span>
                            {{/ discountPrice}}
                            <span class="fav-price {{# discountPrice}}price-underline{{/ discountPrice}}">{{price}}</span>
                        </div>
                        {{# savePrice}}
                        <div class="save-price save-price-number">
                            比收藏时降价了<span>{{.}}</span>
                            <span class="del-fav"></span>
                        </div>
                        {{/ savePrice}}

                        {{^ savePrice}}
                        <div class="save-price">
                            {{# sellOut}}
                            <span class="sell-out">已售罄</span>
                            {{/ sellOut}}
                            <span class="del-fav"></span>
                        </div>
                        {{/ savePrice}}

                    </div>
                    </a>
                </li>
                {{/ hasFavProduct}}
            </ul>

            {{^ hasFavProduct}}
            <span class="fav-null">您暂无收藏任何商品</span>
            <a class="go-shopping" href="{{productUrl}}">随便逛逛</a>
            {{/ hasFavProduct}}
        </div>
        <div class="fav-type">
            {{# hasFavBrand}}
            <div class="fav-brand-swiper">
                <div class="swiper-header">
                    <div class="swiper-logo">
                        <img src="{{brandImg}}" alt=""/>
                    </div>
                    <div class="brand-info">
                        <span class="brand-name">{{brandName}}</span>
                        <div class="brand-update">
                            {{# update}}
                                <span class="brand-new">上新<b>{{.}}</b></span>
                            {{/ update}}
                            {{# discount}}
                            <span class="brand-discount">折扣<b>{{.}}</b></span>
                            {{/ discount}}
                        </div>
                    </div>
                    <a class="fav-more" href="{{link}}"></a>
                </div>
                <div id="swiper-container-{{id}}" class="swiper-container" data-id="{{id}}">
                    <ul class="swiper-wrapper swiper-wrapper-{{id}}">
                        {{# productList}}
                        <li class="swiper-slide">
                            <img class="swiper-lazy" data-src="{{imgUrl}}" alt=""/>
                            <div class="brand-product">
                                <p class="{{# discount}}price-discount{{/ discount}}">
                                    {{price}}
                                    {{# discount}}<span>{{.}}{{/ discount}}<span>
                                </p>
                            </div>
                            <div class="swiper-lazy-preloader"></div>
                        </li>
                        {{/ productList}}
                    </ul>
                </div>
            </div>
            {{/ hasFavBrand}}

            {{^ hasFavBrand}}
            <span class="fav-null">您暂无收藏任何品牌</span>
            <a class="go-shopping" href="{{brandUrl}}">随便逛逛</a>
            {{/ hasFavBrand}}
        </div>
    </div>
    {{/ favorite}}
</div>
{{> layout/footer}}