<template>
  <div class="el-twinfo_show_detail_pc_1">
    <div class="container">
      <!--内容-->
      <div class="newsbody">
        <div class="container">
          <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
              <p class="newsbody-title">{{detailsData.title}}</p>
            </div>
          </div>
          <div class="row newsbody-article">
            <div>
              <div v-html="detailsData.content"></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import formMixin from '../../../src/mixins/formMixin';
  import lenye_base from 'lenye_base';

  export default {
    name: 'ElTwinfoShowDetailPc1',
    mixins: [formMixin],
    components: {},
    data() {
      return {
        siteData: {},
        fileUrlsArr: [],
        userData: {},
        detailsData: {},
        articleId: ''
      };
    },
    created() {
    },
    mounted() {
      this.getNewsDetails();
    },
    methods: {
      // 获取新闻详情
      getNewsDetails() {
        const that = this;
        var obj = {
          url: '/setting-service/common/getAbout.do',
          data: {
            articleId: this.articleId
          },
          Ajax: function(data) {
            if (data.success === '1') {
              that.detailsData = data.data;
            }
          }
        };
        this.getData(obj);
      },
      // 请求函数
      getData(obj) {
        // 请求的api，格式为 lenye_base.api_url.setting.queryShowPage
        const url = obj.url;
        //请求的数据，类型是对象
        const data = obj.data;
        // 只能是匿名函数，要用that保存this，否则匿名函数无论在哪调用this都指向window
        const Ajax = obj.Ajax;
        lenye_base.httpPost(lenye_base.base_data.getapiUrl() + url, lenye_base.base_data.getformatting(
                data), Ajax);
      }
    }
  };
</script>