_fav.scss 10.8 KB
.yoho-favorite-page {
    width: 100%;
    height: auto;

    // 选项卡切换
    .fav-tab {
        width: 100%;
        height: pxToRem(88px);
        line-height: pxToRem(88px);
        border-bottom: 1px solid #e0e0e0;
        color: #b0b0b0;
        font-size: pxToRem(26px);

        li {
            width: 50%;
            height: 100%;
            float: left;
            text-align: center;

            &.active {
                color: #444;
            }

            &:nth-last-of-type(1) {
                float: right;
                position: relative;

                &:after {
                    content: '';
                    display: block;
                    width: 1px;
                    height: pxToRem(44px);
                    position: absolute;
                    left: 0;
                    top: pxToRem(22px);
                    background: #b0b0b0;
                }
            }
        }
    }

    //收藏主体
    .fav-content {
        //padding: 0 pxToRem(30px);

        .fav-type {
            display: none;
        }
        .show {
            display: block;
        }

        .fav-null {
            font-size: pxToRem(22px);
            color: #444;
            display: block;
            margin-top: pxToRem(100px);
            text-align: center;

            &:before {
                content: '';
                display: block;
                @include rem-sprite($fav, fav-null);
                width: pxToRem(image_width(sprite-file($fav, fav-null)));
                height: pxToRem(image_height(sprite-file($fav, fav-null)));

                margin: 0 auto pxToRem(45px) auto;
            }
        }

        .go-shopping {
            width: pxToRem(472px);
            height: pxToRem(88px);
            line-height: pxToRem(88px);
            margin: pxToRem(80px) auto 0 auto;
            background: #444;
            text-align: center;
            color: #fff;
            display: block;
            font-size: pxToRem(26px);
        }

        .fav-product-list {
            list-style: none;
            margin-left: pxToRem(30px);

            li {
                height: auto;
                overflow: hidden;
                margin-top: pxToRem(20px);
            }

            .fav-img-box {
                width: pxToRem(90px);
                height: pxToRem(120px);
                float: left;
                margin-right: pxToRem(24px);

                img {
                    display: block;
                    overflow: hidden;
                    width: 100%;
                    height: 100%;
                }
            }

            .fav-info-list {
                color: #444;
                font-size: pxToRem(24px);
                border-bottom: 1px solid #e0e0e0;
                padding-bottom: pxToRem(20px);
                height: pxToRem(120px);
                overflow: hidden;
                position: relative;

                h2 {
                    width: pxToRem(430px);
                    @include ellipsis();
                }

                .fav-price {

                    .new-price {
                        color: #d1021c;
                    }

                    .price-underline {
                        text-decoration: line-through;
                        margin-left: pxToRem(15px);
                        color: #b0b0b0;
                    }
                }

                .save-price {
                    $width: pxToRem(image_width(sprite-file($fav, save-price)));
                    $height: pxToRem(image_height(sprite-file($fav, save-price)));

                    position: absolute;
                    bottom: pxToRem(20px);
                    left: 0;
                    width: 100%;
                    min-height: pxToRem(24px);

                    &.save-price-number {
                        text-indent: $width + pxToRem(10px);
                        color: #b0b0b0;
                        padding-top: pxToRem(3px);

                        &:before {
                            content: '';
                            display: block;

                            @include rem-sprite($fav, save-price);
                            width: $width;
                            height: $height;

                            position: absolute;
                            top: 50%;
                            left: 0;
                            margin-top: -$height / 2;

                        }
                        span {
                            margin-left: pxToRem(15px);
                        }
                        .del-fav {
                            text-indent: 0;
                            margin-left: 0;
                        }
                    }

                    span {
                        color: #d1021c;

                        &.sell-out {
                            padding: pxToRem(5px) pxToRem(18px);
                            color: #fffefe;
                            @include border-radius(pxToRem(20px));
                            background: #7f7f7f;
                            font-size: pxToRem(22px);
                        }

                        &.del-fav {
                            width: 2rem;
                            height: 1.5rem;
                            line-height: 1.5rem;
                            position: absolute;
                            top: 50%;
                            margin-top: -0.75rem;
                            right: 0;
                            color: #999;

                            padding-right: 0.75rem;
                            text-align: right;

                        }
                    }
                }
            }
        }
        //品牌收藏
        .fav-brand-swiper {
            border-top: 1px solid #e0e0e0;
            border-bottom: pxToRem(28px) solid #f0f0f0;
            position: relative;

            &:nth-of-type(1) {
                border-top: 0;
            }

            &:after {
                content: '';
                position: absolute;
                left: 0;
                bottom: -2px;
                border-top: 1px solid #e0e0e0;
                display: block;
                width: 100%;
                height: 1px;
            }

            .swiper-header {
                height: pxToRem(100px);
                padding: pxToRem(20px) pxToRem(30px);
                display: inline-block;
                position: relative;
                width: 100%;
                @include box-sizing();

                .swiper-logo {
                    height: 100%;
                    display: inline-block;
                    float: left;
                    margin-right: pxToRem(45px);

                    > img {
                        max-height: 100%;
                        vertical-align: middle;
                    }
                }

                .brand-info {
                    float: left;

                    .brand-name {
                        font-size: pxToRem(28px);

                        b {
                            color: #b0b0b0;
                            font-weight: normal;
                        }
                    }

                    .brand-update {
                        font-size: pxToRem(22px);

                        b {
                            color: #b0b0b0;
                            font-weight: normal;
                        }

                        .brand-new {
                            color: #86bf4a;
                            margin-right: pxToRem(24px);
                        }
                        .brand-discount {
                            color: #d1021c;
                        }
                    }
                }
                .fav-more {
                    width: 2.5rem;
                    height: 2.5rem;
                    position: absolute;
                    top: 0;
                    right: 0;

                    &:after {
                        $width: pxToRem(image_width(sprite-file($fav, fav-more)));
                        $height: pxToRem(image_height(sprite-file($fav, fav-more)));

                        @include rem-sprite($fav, fav-more);
                        width: $width;
                        height: $height;

                        position: absolute;
                        top: 50%;
                        right: pxToRem(30px);
                        margin-top: -$height / 2;
                        content: '';
                    }
                }
            }
            .swiper-container {
                height: pxToRem(365px);
                margin: 0 pxToRem(30px);

                .swiper-slide {
                    width: pxToRem(225px);
                    //width: (225/580)*100%;
                    height: 100%;
                    float: left;
                    padding-right: pxToRem(30px);

                    &:nth-last-of-type(1) {
                        padding-right: 0;
                    }

                    img {
                        display: block;
                        width: 100%;
                        height: pxToRem(300px);
                        overflow: hidden;
                    }
                    .brand-product {
                        height: pxToRem(65px);
                        line-height: pxToRem(65px);
                        text-align: center;
                        font-size: pxToRem(22px);

                        .price-discount {
                            span {
                                color: #d1021c
                            }
                            b {
                                color: #b0b0b0;
                                text-decoration: line-through;
                                font-weight: normal;
                                margin-left: pxToRem(13px);
                            }
                        }
                    }
                }
            }
        }
    }

    //上拉加载更多
    .fav-load-more,.fav-brand-load-more {
        width: 100%;
        height: 2rem;
        line-height: 2rem;
        text-align: center;
        color: #444;

        &.load-background {
            background: image_url('loading.gif') center center no-repeat;
            @include background-size(auto 40%);
        }
    }
    .fav-content-loading {
        width: 100%;
        height: 2rem;
        background: image_url('loading.gif') center center no-repeat;
        @include background-size(auto 40%);

        position: absolute;
        top: 50%;
        left: 0;
        margin-top: -1rem;
    }
}