<!--
 * @Author: XuanJi
 * @Date: 2024-05-18 20:51:40
 * @LastEditors: XuanJi
 * @LastEditTime: 2024-05-27 11:40:41
 * @Message: Nothing
-->

<template>
    <view class="list-datail">
        <uv-cell-group :border="false">
            <uv-cell
                v-for="(item, index) in detail"
                :key="index"
                :title="item.name"
                :label="item.value"
                :border="false"
                :cellStyle="{ padding: '15px' }"
            ></uv-cell>
        </uv-cell-group>
    </view>
</template>
<script>
import { getMessage } from "@/config/http.js";
export default {
    data() {
        return {
            detail: {},
        };
    },
    async onLoad(e) {
        const id = e.id;
        const resData = await getMessage(id);
        console.log(resData);
        this.detail = [
            {
                name: "消息类型",
                value: resData.type,
            },
            {
                name: "消息标题",
                value: resData.title,
            },
            {
                name: "消息内容",
                value: resData.content,
            },
            {
                name: "处理时间",
                value: resData.gmtCreate,
            },
        ];
    },
};
</script>
<style scoped lang="scss">
page {
    background-color: $uv-bg-color;
}
.list-datail {
    background: #fff;
}
.uv-cell {
    /deep/ .uv-cell__title {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
}
</style>