<template>
  <div class="app">
    <el-button id="returnBtn" @click="returnBtn">返回</el-button>
    <div class="noticeDetails">
      <div class="title">消息详情</div>
      <h3 id="noticeTitle" :data="newsTitle"> {{ newsTitle }}</h3>
      <h4 id="noticeTime" :data="createTime">{{ createTime }}</h4>
      <div class="noticeContent" :data="newsContent">
        {{ newsContent }}
      </div>
    </div> 
  </div>
</template>

<script>
import { moreMessage } from '../../api/message/message.js'
export default {
  props:["row_"],
  data() {
    return {
      num:1,
      _row : 1 ,
      newsTitle:"" ,
      createTime :"" ,
      newsContent:""
    }
  },
  mounted() {
    let queryObj = this.$route.query.id
    this._row = queryObj
    this.getList();
  },
  beforeDestroy() {
  },
  methods: {
    getList() {
      moreMessage( this._row ).then((res) => {
        this.newsTitle = res.data.newsTitle
        this.createTime = res.data.createTime
        this.newsContent = res.data.newsContent  
      })
    },
    returnBtn(){
        this.$router.go(-1)
    }
  }
}


</script>

<style scoped>
#returnBtn {
  margin-top: 10px;
  margin-left: 10px;
}

.noticeDetails {
  width: 800px;
  height: 300px;
  /* background: red; */
  margin: 50px auto;
  border: 1px solid #ebeef5;
}

.title {
  font-size: 30px;
  font-family: PingFang SC;
  color: #333333;
  text-align: center;
  font-weight: bolder;
  margin-top: 10px;
}

#noticeTitle {
  /* font-size: 18px; */
  font-family: PingFang SC;
  color: #333333;
  margin-left: 30px;
  margin-top: 20px;
  font-weight: bolder;
}

#noticeTime {
  font-family: PingFang SC;
  margin-left: 30px;
  color: #333333;
}

.noticeContent {
  font-family: PingFang SC;
  color: #333333;
  width: 700px;
  /* background: red; */
  margin: 0 auto;
  text-indent: 2em;
}
</style>


