<template>
  <view class="content">
    <view class="card">
      <view class="title">{{form.SYNOPSIS}}</view>
      <view class="data mt-10">
        <text>{{form.CREATTIME}}</text>
      </view>
      <view class="mt-10">
        <rich-text :nodes="form.CONTENT" class="mt-10"></rich-text>
      </view>
    </view>
  </view>
</template>

<script>
import {getAnnouncementNoticeDetail, getPlatformReminderDetail} from "../../../api";

export default {
  data() {
    return {
      ID: '',
      TYPE: '',
      form:{}
    }
  },
  computed: {
    userInfo() {
      return this.$store.getters.getUserInfo
    }
  },
  onLoad(event) {
    this.ID = event.ID;
    this.TYPE = event.TYPE;
    this.getData();
  },
  methods: {
    async getData() {
      let resData = this.TYPE === '1' ? await getAnnouncementNoticeDetail({
        loginUserId: this.userInfo.USER_ID,
        NOTICEREGULATORY_ID: this.ID
      }) : await getPlatformReminderDetail({
        ISALL: 'yes',
        NOTICE_ID: this.ID
      })
      this.form = resData.pd;
    }
  },
}
</script>

<style scoped lang="scss">
.title{
  text-align: center;
}
.data{
  font-size: 24rpx;
  text-align: center;
}
</style>
