<template>
    <div class="container">
        <van-list v-for="item in MessageList" :key="item.id" v-model="loading" :finished="finished"
            finished-text="没有更多了" @load="getList">
            <div class="message flex flex-y">
                <div class="flex flex-x flex-end m-bottom10">
                    <div class="flex flex-x  flex-center2 ">
                        <div v-if="icon" class="m-right7"><img class="img_23" src="../../assets/images/Mess/suqiu.png">
                        </div>
                        <div v-if="!icon" class="m-right7"><img class="img_23"
                                src="../../assets/images/Mess/manyidu.png"></div>
                        <div class="font-size15 m-right7">{{ item.messageType == 'ic_event' ? '诉求办理' : '满意度调查' }}</div>
                        <div class="font-size13 C1">{{ item.createdTime }}</div>
                    </div>
                    <div class="font-size13 C1 flex flex-center2"><span>{{ item.readFlag == 'unread' ? '未读' : '已读' }}</span>
                    </div>
                </div>


                <div class="m-bottom10"><span>您的上报问题已办结，请您对我们的工作进行 满意度评价。</span></div>
                <div v-if="iitem.messageType == 'ic_event'" class="label m-bottom10">
                    <div class="font-size15 lable-span gray">重庆南路86号3号楼与4号楼中间，楼下晚上 有很多人打牌，扰民情况严重。</div>
                </div>
                <div v-if="iitem.messageType !== 'ic_event'" class="label m-bottom10">
                    <div class="font-size15 lable-span gray">重庆南路86号3号楼与4号楼中间，楼下晚上 有很多人打牌，扰民情况严重。</div>
                </div>
            </div>

        </van-list>
    </div>
</template>

<script>
import { querystaffmessage } from '@/api/user'

export default {
    name: 'message',
    data() {
        return {
            MessageList: [
                {
                    id: "1580112951706976257",
                    title: "您有一条事件消息！",
                    messageContent: "您上报的事件已完成，请查看。",
                    readFlag: "unread",
                    createdTime: "1665563259",
                    messageType: "ic_event",
                    targetId: "1580089831937847297"
                },
               
            ],
            userId:""
        }
    },
    mounted() {
        this.userId = this.$store.state.app.userInfo.id;
        this.getList()
    },
    methods: {
        async querystaffmessage(data) {
            let parm = {
                userId: this.userId,
                app: "resi",
                pageNo: 1,
                pageSize: 20
            }
            console.log(parm);
            let res = await querystaffmessage(parm)
            this.MessageList=res.data
        },
    }
}
</script>

<style scoped lang="less">
@import './index';
</style>