<template>
<div>
  <head-bar></head-bar>
  <el-container>
    <el-main style="padding: 0px">
      <el-row>
        <el-col :span="18" offset="3">
          <el-row>
            <el-col :span="24" style="text-align: center;margin: 20px 0;">
              <h2>{{news_info.newsInfoTitle}}</h2>
              <span>{{news_info.newsInfoAuthor}} {{news_info.newsInfoTime}}</span>
            </el-col>
            <el-col :span="24"style="padding: 20px" v-html="news_info.newsInfoContent">
              “
            </el-col>
          </el-row>
        </el-col>
      </el-row>
    </el-main>
  </el-container>
  <foot-bar></foot-bar>
</div>
</template>

<script>
import {navList,newsList,dictList} from "../../static/js/index"
export default {
  name: "_id",
  head(){
    return{
      title:"中关村公共资源论坛"
    }
  },
  data(){
    return{
      news_info:{
        newsInfoTitle:null,
        newsInfoAuthor:null,
        newsInfoTime:null,
        newsInfoContent:null
      }
    }
  },
  created() {
    this.getNewsInfo()
    // this.news_info.id=this.$route.params.id;
    // this.news_info.title=this.$route.params.title;
  },
  methods:{
    getNewsInfo(){

    if (this.$route.params.id!=null&&!isNaN(this.$route.params.id)){
      newsList({"newsInfoId":this.$route.params.id}).then(response=>{
        this.news_info=response.rows[0];
      })
    }


    }
  }
}
</script>


<style scoped>

</style>
