<!--
   * @Descrip: 主页
 * @Author: your name
 * @Date: 2019-10-10 14:25:15
 * @LastEditTime: 2019-11-14 09:56:22
 * @LastEditors: Please set LastEditors
   -->
<template>
  <h-view id="newInfo" class="public-style" title="新闻">
    <h-header :proportion="[5,1,1]" class="bar-custom">
      <div slot="left" class="h-header-btn">
        <img src="@/assets/userBind/arrow.png" @click="$routeGo()">
        <span>新闻</span>
      </div>
    </h-header>
    <h-content class="has-footer">
        <div class="title">{{news.new_title}}</div>
        <div class="date">发布时间：{{news.new_date}}</div>
        <div class="new_content" v-html="news.new_body"></div>
    </h-content>
  </h-view>
</template>
<script>
import noImg from '../../assets/productQuery/none.png'

export default {
  name: 'ToDoList',
  data () {
    return {
        new_id: '',
        news: {},
    }
  },
  watch: {
  },
  created () {
    this.new_id  = this.$route.params.new_id
    this.getNewsInfo()
  },
  activated () {
    this.new_id  = this.$route.params.new_id
    this.getNewsInfo()
  },
  methods: {
    getNewsInfo () {
      let url = $config.basePath + 'news_query_body'
      let param = {
          new_id: this.new_id
      }
      this.hlsPopup.showLoading('请稍候')
      this.hlsHttp.post(url, param).then((res) => {
        this.hlsPopup.hideLoading()
        if (res.result === 'S') {
          this.news = res.info
        } else {
          hlsPopup.showLongCenter(res.message)
        }
      })
    },
  },
}
</script>
<style lang='less'>
  @import "../../styles/vue-1px";
  .display {
    position: fixed;
    top: 0;
    img {
      width: 100%;
      height: 100%;
     // margin-top: -70px;
    }
  }
  #newInfo {
    .title {
        padding: 20px;
        color: #383F45;
        font-weight: 600;
        font-size: 16px;
        line-height: 20px;
    }
    .date {
        padding: 0 0 20px 0;
        margin: 10px 20px;
        color: #383F45;
        font-size: 14px;
        border-bottom: 1px solid #D9DBDF;
    }
    .new_content {
        padding: 20px 20px 50px 20px;
    }
    .content {
        height: 100% !important;
        background: #FFFFFF;
    }
  }
</style>
