<template>
  <div>
    <div class="detail">
        <div class="title">{{title}}</div>
        <div class="time">{{publishTime}}</div>
        <div class="detailContent" ref="content"></div>
    </div>
  </div>
</template>
<script>
import { noticeList,noticeDetail } from '@/api/home'
export default {
  name: "Addnotice",
  data() {
    return {
        id:'',
        title:'',
        publishTime:'',
        content:'',
    }
  },
  created() {
    this.id = this.$route.query.id
    noticeDetail(this.id).then(res => {
        this.title = res.data.title
        this.content = res.data.content
        this.publishTime = res.data.publishTime
        this.$nextTick(() => {
          this.$refs.content.innerHTML = this.content
        })
    })
  },
  mounted() {
  
  },
  methods: {

  }
}
</script>
<style lang="scss" scoped>
.detail {
  width:1200px;
  margin:0 auto;
  text-align:center
}
.title {
  margin:20px 0 15px 0
}
.time {
  float:right;
  margin-bottom:15px
}
.detailContent {
  float:left;
}
</style>
