<template>
    <router-link
        :to="{
            path: '/assetDetail',
            query: {
                id: info.id
            }
        }"
        class="collect"
    >
        <el-image class="imgBox" :src="getImg(changeImgs(info.pic))" fit="cover"></el-image>

        <div class="introduce">{{ info.name }}</div>
        <div class="price" v-if="info.consignment">
            <img class="img1" src="../assets/img/icon_jiage@3x.png" alt="" />
            <div class="num">{{ info.sellPrice || 0 }}</div>
        </div>
        <div class="status" v-else-if="info.status === 'NORMAL'">
            {{ info.publicShow ? '仅展示' : '未展示' }}
        </div>
        <div class="status" v-else>
            {{ getLabelName(info.status, assetStatusOptions) }}
        </div>
        <div class="border"></div>
        <div class="fans">
            <div class="text">
                <div class="text1 name1">
                    <img class="text2" :src="info.minterAvatar" alt="" />
                    <div class="text3">{{ info.minter }}</div>
                    <!-- <div class="text3">铸造者</div> -->
                </div>
                <div class="text1" v-if="info.ownerId">
                    <img class="text2" :src="info.ownerAvatar" alt="" />
                    <!-- <div class="text3">持有者</div> -->
                    <div class="text3">{{ info.owner }}</div>
                </div>
            </div>
            <div class="text">
                <!-- <div class="text1">
                    <img class="text2 text4" src="../assets/img/like.png" alt="" />
                    <div class="text3">16</div>
                </div> -->
                <!-- <like-button :isLike="info.liked" @like="likeProduct">{{ info.likes }}</like-button> -->

                <!-- <div class="text1" v-else>
                    <img class="text2 text4" src="../assets/img/icon-yuyue@3x.png" alt="" />
                    <div class="text3">预约</div>
                </div> -->
            </div>
        </div>
    </router-link>
</template>

<script>
import asset from '../mixins/asset';
import product from '../mixins/product';
export default {
    props: {
        info: {
            type: Object,
            default: () => {
                return {};
            }
        }
    },
    mixins: [asset, product]
};
</script>
<style lang="less" scoped>
.collect {
    .line();
    width: 276px;
    height: 426px;
    display: inline-block;
    &::before {
        border-radius: 8px;
    }
    .imgBox {
        height: 274px;
        width: 100%;
        border-radius: 8px 8px 0px 0px;
    }
    &:hover {
        position: relative;
        transition: transform 0.5s ease-out;
        -o-transition: transform 0.5s ease-out;
        -webkit-transition: transform 0.5s ease-out;
        -moz-transition: transform 0.5s ease-out;
        transform: scale(1.1);
        -ms-transform: scale(1.1);
        -webkit-transform: scale(1.1);
    }
    // &:hover {
    //     .imgBox {
    //         position: relative;
    //         &::before {
    //             content: '';
    //             position: absolute;
    //             left: 0;
    //             top: 0;
    //             right: 0;
    //             bottom: 0;
    //             background-color: fade(@prim, 70%);
    //         }

    //         &::after {
    //             padding: 0 22px;
    //             content: '查看详情';
    //             line-height: 30px;
    //             font-size: 16px;
    //             color: #1a1a1a;
    //             background: #ffffff;
    //             border-radius: 16px;
    //             border: 1px solid #ffffff;
    //             position: absolute;
    //             top: 50%;
    //             left: 50%;
    //             transform: translate(-50%, -50%);
    //         }
    //     }
    // }

    .introduce {
        padding: 10px 16px 16px;
        font-size: 16px;
        font-weight: bold;
        color: #ffffff;
        line-height: 20px;
    }
    .price {
        display: flex;
        align-items: center;
        // justify-content: space-between;
        padding: 0 16px 16px;
        .img1 {
            width: 10px;
            height: 11px;
            margin-top: 4px;
        }
        .num {
            font-size: 26px;
            font-family: OSP-DIN, OSP;
            font-weight: normal;
            color: @prim;
            line-height: 30px;
        }
        .time {
            display: flex;
            margin-left: 24px;
            .time1 {
                font-size: 14px;
                font-weight: 400;
                color: #939599;
                line-height: 24px;
            }
            span {
                font-size: 14px;
                font-weight: 400;
                color: @prim;
                line-height: 24px;
                margin-left: 6px;
            }
        }
    }
    .status {
        font-size: 16px;
        color: #939599;
        line-height: 24px;
        padding: 0 16px 12px;
    }
    .border {
        height: 1px;
        background: #2b2e3e;
        border-radius: 1px;
        margin: 0 16px;
    }
    .fans {
        display: flex;
        align-items: center;
        // justify-content: space-between;
        padding: 19px 16px 22px;
        .text {
            display: flex;
            align-items: center;
            .text1 {
                display: flex;
                align-items: center;
                // max-width: 80px;
                overflow: hidden;
                &.name1 {
                    margin-right: 22px;
                }
                .text2 {
                    width: 20px;
                    height: 20px;
                    border-radius: 50%;
                    margin-right: 4px;
                    flex-shrink: 0;
                    &.text4 {
                        width: 18px;
                        height: 18px;
                    }
                }
                .text3 {
                    font-size: 14px;
                    font-weight: 400;
                    width: 80px;
                    .ellipsis();
                    color: #939599;
                    line-height: 24px;
                }
            }
        }
    }
}
</style>
