<template>
    <div>
        <el-row>
            <div class="content_title">
                <span>点赞消息</span>
            </div>
        </el-row>
        <el-row>
            <div class="box" v-for="item in list" :key="item.id">
                <img :src="item.senderAvatar" />
                <div class="info">
                    <div class="name">{{ item.senderName }}</div>
                    <p>赞了我的回复</p>
                    <div class="topic">
                        <span>“{{ item.content }}”</span>
                    </div>
                </div>
                <div class="time">{{ item.createdAt }}</div>
            </div>
            <!-- <div class="box">
                <img src="../../assets/attest_img.png" />
                <div class="info">
                    <div class="name">姓名</div>
                    <p>赞了我的回复</p>
                    <div class="topic">
                        <span>“1996年12月，我国正式接受《国际货币基金组织协定》第八条款，实现经常项目可兑换”</span>
                    </div>
                </div>
                <div class="time">2021.01.06</div>
            </div> -->
        </el-row>
    </div>
</template>

<script>
export default {
    name: 'giveLike',
    data() {
        return {
            list: {}
        };
    },
    created() {
        this.$http.get('/message/all', { query: { messageType: 'LIKE_RECORD_MESSAGE' } }).then(res => {
            console.log(res);
            this.list = res.content;
        });
    }
};
</script>
<style lang="less" scoped>
.content_title {
    height: 60px;
    line-height: 60px;
    box-sizing: border-box;
    padding-bottom: 20px;
    border-bottom: #f2f3f5 1px solid;
    > span {
        font-size: 16px;
        color: #000000;
        line-height: 30px;
        font-weight: 700;
    }
}
.box {
    // overflow: hidden;
    display: flex;
    padding: 20px 0 20px;
    height: auto;
    // box-sizing: content-box;
    img {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        // background: cadetblue;
    }
    .info {
        width: 780px;
        margin-left: 8px;
        height: auto;
        .name {
            height: 24px;
            font-size: 14px;
            font-weight: 600;
            color: #000000;
        }
        p {
            margin: 0px;
            width: 600px;
            // height: 22px;
            font-size: 13px;
            color: #494a4d;
            line-height: 22px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .topic {
            margin-top: 12px;
            span {
                background: #f5f7fa;
                border-radius: 2px;
                padding: 12px;
                font-size: 13px;
                color: #494a4d;
            }
        }
    }
    .time {
        width: 20%;
        height: 22px;
        font-size: 13px;
        color: #c8c9cc;
        line-height: 22px;
    }
}
</style>
