<template>
    <div class="detail">
        <div class="title">{{list.title}}</div>
        <div v-html="list.content"></div>
    </div>
</template>

<script>
import { article_info } from '../../request/api'
export default {
    metaInfo: {
    title: "新闻详情",
    },
    name: 'Detail',
    data() {
        return {
            list: {}
        }
    },
    mounted() {
        this.getListData()
        
    },
    methods: {
        getListData() {
            // article_info()
            let id = this.$route.query.id
            console.log(id)
            article_info({},id).then(({data: res}) => {
                this.list = res.data
                console.log(this.list)
            })
        }
    }
}
</script>

<style lang="scss" scoped>
.title {
    line-height: 1.5;
    color: red;
    font-size: 20px;
    text-align: center;
    margin: 40px auto 20px;
    font-weight: bold;
}
</style>