<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>
    <baPing />
  </view>
</template>

<script setup>
/*----------------------------------依赖引入-----------------------------------*/
import { onReady, onLoad, onShow, onNavigationBarButtonTap, onBackPress } from "@dcloudio/uni-app";
import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
/*----------------------------------接口引入-----------------------------------*/
import { getMceList } from "@/api/mine/info.js";
/*----------------------------------组件引入-----------------------------------*/
/*----------------------------------store引入-----------------------------------*/
/*----------------------------------公共方法引入-----------------------------------*/
/*----------------------------------公共变量-----------------------------------*/
const { proxy } = getCurrentInstance();
/*----------------------------------变量声明-----------------------------------*/
const data = ref();

function init(options) {
  getMceList({
    current: 1,
    size: 10,
    id: options?.contentId,
  }).then((requset) => {
    data.value = requset.data.records[0];
  });
}
onBackPress((event) => {
  console.log("backbutton",new Date().getTime())
  uni.setStorageSync("backbutton", "top");
})
onLoad((options) => {
  init(options);
});

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

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

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