<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="../../assets/xiaoxi_icon_xitong.png" />
                <div class="info">
                    <div class="first">
                        <div class="name">姓名</div>
                        <div class="time">2021.01.06</div>
                    </div>
                    <div class="topic">
                        <p>
                            这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字
                        </p>
                    </div>
                </div>
            </div>
            <div class="box">
                <img src="../../assets/xiaoxi_icon_xitong.png" />
                <div class="info">
                    <div class="first">
                        <div class="name">姓名</div>
                        <div class="time">2021.01.06</div>
                    </div>
                    <div class="topic">
                        <p>
                            这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字这是消息内容文字
                        </p>
                    </div>
                </div>
            </div>
        </el-row>
    </div>
</template>

<script>
export default {
    name: 'messageDetails',
    data() {
        return {
            // url: '/notificationMessage/all'
            // // query: { messageType: 'SYSTEM_MESSAGE' }
            list: {}
        };
    },
    created() {
        this.$http.get('/notificationMessage/all', { query: { messageType: 'SYSTEM_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;
        .first {
            display: flex;
            justify-content: space-between;
            align-items: center;
            .name {
                font-size: 14px;
                font-weight: 600;
                color: #000000;
            }
            .time {
                height: 22px;
                font-size: 13px;
                color: #c8c9cc;
                line-height: 22px;
            }
        }
    }
    .topic {
        margin-top: 12px;
        p {
            background: #f5f7fa;
            box-shadow: 0px -1px 0px 0px #f2f3f5;
            border-radius: 0px 8px 8px 8px;
            border-radius: 2px;
            padding: 12px;

            color: #000000;
            font-size: 14px;
        }
    }
}
</style>
