<template>
  <div class="post-main">
    <div class="post-nav clear ng-scope">
      <router-link to="/">首页</router-link>
      <span>&gt; </span>
      <router-link to="/main/post">政策法规</router-link>
      <span>&gt; </span>{{info.title}}
    </div>
    <div class="m-notice-detail ">
      <p class="notice-tit tc ng-binding">{{info.title}}</p>
      <p class="notice-info tc ng-binding">
        发布时间：{{info.publishTime}}
        <span class="ml30 ng-binding">来源：{{info.author}}</span>
        <span class="ml30 ng-binding">阅读数：{{info.viewCount}}</span>
      </p>

      <span v-html="info.content"></span>
    </div>
  </div>
</template>

<script>
  import {
    httpServer
  } from "@/components/httpServer/httpServer.js";
  import {
    parseTime
  } from "@/utils/index.js";
  export default {
    name: 'cert',
    data() {
      return {
        postId: +this.$route.params.postId,
        info: {},
        listLoading: true,
        dialogFormVisible: false,
        dialogStatus: '',
      }
    },
    filters: {
      dateformat(val) {
        return parseTime(+new Date(val), '{y}-{m}-{d}')
      }
    },
    beforeMount() {
      this.getInfo()
    },
    methods: {
      getInfo() {
        this.listLoading = true
        httpServer("Course.getPostInfo", {
          postId: this.postId
        }).then(({
          data,
          code
        }) => {
          this.info = data
          this.listLoading = false
        })
      }

    }
  }
</script>

<style>
  @import url("./post.css");
</style>
