<template>
     <div class="main-contain">
        <div class="position">
            <bread-crumb :crumbs='crumbs'></bread-crumb>
             <el-button  style="float:right;" type="primary" size="small"  @click="$router.push('/articles/articleComment')">返回全部文章</el-button>
        </div>
        <div class="app-container">
             <div class="title">{{listQuerty.title}}</div>
             <div>{{listQuerty.publicTime}}</div>
             <div class="sort">已按最新热度排序</div>
            <div class="border"></div>          
        </div>
     </div>
</template>

<script>
   import BreadCrumb from '../components/bread-crumb'
   import { getArticleCommentDetail } from '@/api/act/submitinfo'
    export default {
        name: "articleCommentDetail",
        components:{
            BreadCrumb
         },
         data(){
             return{
                 crumbs: [
                   { path: false, name: '文章管理' },
                   { path: '/articles/articleComment', name: '文章评论详情' }
                ],
                listQuerty:{
                   title:'',
                   publicTime:'',
                }
             }
         },
         created(){
            this.getArticleCommentDetail(); 
         },
         methods:{
             getArticleCommentDetail(){
                 const id = this.$route.params && this.$route.params.id
                 console.log("id",id)
                 getArticleCommentDetail(this.listQuerty,id).then(response=>{
                        if(response.data.state == 1){
                            var articles = response.data.data.articles
                            this.listQuerty.title = articles.title
                            this.listQuerty.publicTime =  articles.publicTime
                            console.log("内容是设么",articles)
                        }
                 })
             }
         }
    }

</script>

<style scoped>
   .border{
       border: 1px #dcdfe6 solid;
       margin-top: 30px;
   }
   .title{
       font-size: 25px;
       margin-bottom: 20px;
   }
   .sort{
      float: right;
      font-size: 18px;
   }
</style>
