<template>
    <div class="container">
        <div class="border"></div>
        <div class="content">
            <div class="box">
                <router-link :to="{ path: '/castingDetail?id=' + list.id }">
                    <div class="text">
                        <img class="text1" :src="list.avatar" alt="" />
                        <div class="box2">
                            <div class="name">
                                <div class="name1">{{ list.nickname }}</div>
                                <img class="name2" src="../assets/img/renzheng_icon@3x.png" alt="" />
                            </div>
                            <div class="text2">暂无</div>
                            <div class="box3">
                                <div class="box4">
                                    <div class="text4">
                                        粉丝 <span>{{ list.follows }}</span>
                                    </div>
                                    <div class="text4">
                                        已售 <span>{{ list.sales }}</span>
                                    </div>
                                </div>
                                <el-button
                                    plain
                                    round
                                    :class="{ prim: !list.follow }"
                                    size="mini"
                                    @click.prevent="fans(list)"
                                >
                                    {{ list.follow ? '已关注' : '关注' }}
                                </el-button>
                            </div>
                        </div>
                        <div class="imgBox" v-if="list.bg">
                            <img class="imgBox1" :src="list.bg" alt="" />
                        </div>
                    </div>
                </router-link>
            </div>
        </div>
    </div>
</template>
<script>
import user from '../mixins/user';
import pageableTable from '../mixins/pageableTable';
export default {
    mixins: [user, pageableTable],
    props: {
        list: {
            type: Object,
            default: () => {
                return {};
            }
        }
    },
    data() {
        return {};
    },
    computed: {},
    methods: {
        fans(list) {
            this.like(list);
            if(list.follws)
            this.$emit('getDetail');
        }
    }
};
</script>
<style lang="less" scoped>
.container {
    .followed {
        border-color: #939599;
        color: #939599 !important;
    }
    .border {
        height: 1px;
        background: #494a4d;
        border-radius: 1px;
        margin: 17px 10px 20px;
    }
    .content {
        padding: 0 16px;

        .box {
            .flex();
            justify-content: space-between;
            margin-bottom: 20px;
            .text {
                .flex();
                justify-content: space-between;
                .text1 {
                    width: 78px;
                    height: 78px;
                    border-radius: 50%;
                    background: red;
                    margin-right: 12px;
                }
                .box2 {
                    width: 288px;
                    margin-right: 50px;
                    .name {
                        .flex();
                        margin-top: 5px;
                        .name1 {
                            font-size: 16px;
                            font-weight: bold;
                            color: #ffffff;
                            line-height: 24px;
                            margin-right: 6px;
                        }
                        .name2 {
                            width: 18px;
                            height: 18px;
                        }
                    }
                    .text2 {
                        font-size: 14px;
                        font-weight: 400;
                        color: #939599;
                        line-height: 24px;
                        margin-bottom: 8px;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }
                    .box3 {
                        display: flex;
                        align-content: center;
                        // align-lists: center;
                        justify-content: space-between;
                        .box4 {
                            display: flex;
                            .text4 {
                                font-size: 14px;
                                font-weight: 400;
                                color: #939599;
                                line-height: 24px;
                                margin-right: 20px;
                            }
                            span {
                                color: #fff;
                            }
                        }
                        // .follow {
                        //     width: 70px;
                        //     height: 26px;
                        //     color: @prim;
                        //     font-size: 14px;
                        //     border-radius: 16px;
                        //     border: 1px solid;
                        //     text-align: center;
                        //     line-height: 26px;
                        // }
                        .el-button {
                            background-color: transparent;
                            min-width: 76px;
                            height: 28px;

                            &.prim {
                                .line(@radius:28px);
                                text-align: center;
                                /deep/span {
                                    color: @prim;
                                    position: relative;
                                    z-index: 1;
                                }
                            }
                        }
                    }
                }
                .imgBox {
                    .flex();
                    .imgBox1 {
                        width: 140px;
                        height: 100px;
                        border-radius: 8px;
                        margin-left: 30px;
                    }
                }
            }
        }
    }
}
</style>
