<template>
  <div class="app-container">
    <div>
      <h1 style="text-align: center;">{{this.form.noticeTitle}}</h1>
      <div v-html="this.form.noticeContent"></div>
    </div>
  </div>
</template>

<script>
  import {getNotice} from "@/api/system/notice";

  export default {
  name: "Notice",
  data() {
    return {
      // 表单参数
      form: {
        noticeId: undefined,
        noticeTitle: undefined,
        noticeType: undefined,
        noticeContent: undefined,
        status: "0"
      },
    };
  },
  created() {
    const noticeId = this.$route.params && this.$route.params.noticeId;
    this.getOne(noticeId);
  },
  methods: {
    /** 修改按钮操作 */
    getOne(noticeId) {
      getNotice(noticeId).then(response => {
        this.form = response.data;
      });
    },
  }
};
</script>
