<template>
  <div>
    <ul>
      <li>创建用户：{{ createby }}</li>
      <li>创建时间：{{ createon }}</li>
    </ul>
    <hr>
    <div class="centents">
      <div v-if="!isShow" class="textCon">
        <p class="words-title">标题</p>
        <div class="centents-con">
          {{ title }}
        </div>
        <p class="words-title">内容</p>
        <div class="centents-con">
          {{ content }}
        </div>
      </div>
    </div>
  </div>

</template>
<script>
import { mapGetters } from 'vuex'
import VueAplayer from 'vue-aplayer'
import { getBlack } from '@/api/notice/manage'
export default {
  name: 'SeeManege',
  components: {
    // 别忘了引入组件
    aplayer: VueAplayer
  },
  props: {
    rowid: {
      type: String,
      default: ''
    },
    layerid: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      isShow: false,
      createby: '',
      createon: '',
      title: '',
      content: ''
    }
  },
  computed: {
    ...mapGetters(['avatar'])
  },
  created() {
    if (this.rowid) {
      this.getDetail(this.rowid)
    }
  },
  methods: {
    // 获取详情
    getDetail(rid) {
      getBlack(rid).then(response => {
        if (response.state.toLowerCase() === 'success') {
          const res = response.data
          this.createby = res.createby
          this.createon = res.createon
          this.title = res.title
          this.content = res.content
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
@import "src/../../../../styles/mixin.scss";
.centents-con {
  padding: 0 15px;
}
.see-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  padding: 10px 0 20px 0;
  margin: 0;
}
hr {
  margin-top: 20px;
  margin-bottom: 20px;
  border: 0;
  border-top: 1px solid #eee;
}
ul {
  @include clearfix;
  list-style: none;
  padding: 10px 0 0 0;
  font-size: 13px;
  color: #676a6c;
  li {
    float: left;
    width: 33.3333%;
    margin-bottom: 10px;
  }
}
.words-title {
  font-size: 14px;
  color: #7a7a7a;
  margin-bottom: 10px;
  font-weight: 600;
}
</style>

