<template>
        <div>
            <!-- 头部 -->
            <page-header></page-header>
            <div class="container">
                <div class="left">
                        <div class="top">
                                <div class="time">07-03</div>
                                <div class="emay"></div>
                                <div>
                                    <p class="t1">李克强对“华龙一号”福清核电5号机组建设工作 作出重要批示</p>
                                    <p class="t2">中共中央政治局常委、国务院总理李克强日前对“华龙一号”福清核电5号机组建设工作作出重要批示。批示指出：我国自</p>
                                </div>
                            </div>
                </div>
                <div class="right"></div>
            </div>
            <!-- <page-footer></page-footer> -->
        </div>
    </template>
    <script>
        // 公用
    
        import share from "./share.js";
        export default {
            name: "newinfo",
            // 混入
            mixins: [share],
            data() {
                return {
                    msg: "newinfo",
                  
                };
            },
            // methods: {
            
            // }
            methods: {
                getLiveList() {
                    this.$http.post('/api/postlist?category_id=1')
                        .then((res) => {
                            this.news=res.body.data 
                            console.log()
                            this.news.forEach(e => {
                                this.day=e.published_time
                                this.title=e.post_title.replace(/&quot;/g,'"')
                                this.day.substring(this.day.length,this.day.length-5)
                                this.time=this.day.substring(this.day.length-9,this.day.length-14)
                            });
    
                        })
                        .catch((err) => {
                            console.log(err)
                        })
                    
                }   
    
            },
            created () {
               this.getLiveList()
            }
        }
    
    </script>
<style scoped>
    .container{
        width: 1200px;

    }
    .left{
        width: 800px;
        }
    .top{
        display: flex;
    }
    .time{
        width: 100px;
        font-size: 30px;
        color: #aaa;
        margin-top: 45px;
        margin-right: 15px;
    }
    .emay{
        width: 40px;
        height: 1px;
        border-top: 1px solid #aaa;
        background-color: #aaa;
        margin-top: 75px;
        margin-right: 10px;
    }
    .t1{
        margin-top: 57px;
        font-size: 22px;
        margin-bottom: 22px;
    }
    .t2{
        width: 650px;
        font-size: 12px;
        overflow: hidden;
        text-overflow:ellipsis;
        white-space: nowrap;
    }
</style>