index.vue 2.54 KB
<template>
<div class='container'>
  <p class="title">{{messageTitle}}</p>
  <div class="info">
    <p>{{messageContent}}</p>
    <!-- <p>通知,是运用广泛的知照性公文。用来发布法规、规章,转发上级机关、同级机关和不相隶属机关的公文,批转下级机关的公文,要求下级机关办理某项事务等。通知,一般由标题、主送单位(受文对象)、正文、落款四部分组成。</p>
    <p>公告,是指政府、团体对重大事件当众正式公布或者公开宣告,宣布。国务院2012年4月16日发布、2012年7月1日起施行的《党政机关公文处理工作条例》,对公告的使用表述为:“适用于向国内外宣布重要事项或者法定事项”。其中包含两方面的内容:一是向国内外宣布重要事项,公布依据政策、法令采取的重大行动等;二是向国内外宣布法定事项,公布依据法律规定告知国内外的有关重要规定和重大行动等。</p> -->
  </div>
  <p class="inscribe">{{sendDate}}</p>
  <p class="inscribe">{{publishingUnit}}</p>
</div>
</template>

<script>
export default {
  data() {
    return {
      notice:null,
      messageTitle: '',
      messageContent: '',
      sendDate: '',
      publishingUnit: ''
    }
  },
  methods: {
     //取通知公告详情
    getNoticeById()  {
      wx.request({
        url: this.rootUrl + '/notice/getNoticeById',
        data: { sessionID: wx.getStorageSync('sessionID'),
                 id: this.$root.$mp.query.id},
        success: res => {
          console.log(res.data)
          this.messageTitle = res.data.messageTitle
          this.messageContent = res.data.messageContent
          this.sendDate = this.service.correctTime(res.data.sendDate,'full')
          this.publishingUnit = res.data.publishingUnit
        }
      })
    }
  },
  onShow() {
    this.getNoticeById()
  },
  onUnload(){
    this.messageTitle = ''
    this.messageContent = ''
    this.sendDate = ''
    this.publishingUnit = ''
  }
}
</script>
<style lang="stylus" scoped>
.container
  position absolute
  Height_Width(100%)
  background-color #fff
  padding 30rpx
  box-sizing border-box
.title
  margin-bottom 30rpx
  font-size 34rpx
  color #000
  font-weight bold
  line-height 60rpx
  overflow hidden
  text-overflow ellipsis
  display -webkit-box
  -webkit-line-clamp 2
  -webkit-box-orient vertical
.info
  margin 30rpx 0
  color #333
  font-size 30rpx
  line-height 60rpx
.info p
  text-indent 60rpx
.inscribe
  color #666
  font-size 30rpx
  text-align right
  line-height 60rpx
</style>