<template>
  <view class="news_show">
    <view class="title"> {{ useModel?.showData?.value?.title || '无标题' }} </view>
    <view class="time" v-if="useModel?.showData?.value?.publish_at">
      {{ showDay(useModel?.showData?.value?.publish_at || '') }}
    </view>
    <view class="contents">
      <rich-text :nodes="useModel?.showData?.value?.content"></rich-text>
      <!-- {{ useModel?.showData?.value?.content }} -->
    </view>
  </view>
</template>
<script setup lang="ts">
import useModel from './model'
import method from './method'
import { onLoad } from '@dcloudio/uni-app'
import { showDay } from '@/common/libraries/day'

onLoad(e => {
  method.getShow(e?.id)
})
</script>
<style lang="scss">
@import './style.scss';
</style>
