<template>
  <view>
    <uni-card class="view-title" :title="data?.infoTitle || ''">
      <view class="uni-body view-content">{{ data?.infoContent  || ''}}</view>
      <text class="uni-body view-time">{{ data?.createTime ?  data.createTime.replace("T", " ") : ''}}</text>
    </uni-card>
  </view>
</template>

<script setup>
import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
import { getMceList } from "@/api/mine/info.js";
const { proxy } = getCurrentInstance();
const id = ref()//消息id
const data = ref({});
function init(){
  getMceList({
    current: 1,
    size: 10,
    id:id.value
  }).then((requset) => {
    data.value = requset.data.records[0]
  })
}
onLoad((options) => {
  id.value = options.id
  init()
});

onShow(() => {
  //调用系统主题颜色
  proxy.$settingStore.systemThemeColor([1]);
});
</script>

<style scoped>
.view-title {
  font-weight: bold;
}

.view-content {
  font-size: 26rpx;
  padding: 12px 0 0;
  color: #333;
  line-height: 24px;
  font-weight: normal;
  text-indent: 20px;
}
.view-time {
  margin:30px 0 10px;
  font-size: 24rpx;
  float: right;
}
</style>
