<template>
  <view class="ConCss">
    <u-navbar v-if="!$isDing" class="navBarCss" title="资讯详情" :titleStyle="{'fontSize':'36rpx','color':'#333333','fontWeight':'700'}"
      leftClick="leftClick" :autoBack="true" safeAreaInsetTop placeholder />
    <view class="titleCss">
      {{ detailsContent.title }}
    </view>
    <view class="releaseTimeCss">
      发布时间：{{ $u.timeFormat(detailsContent.publishTime,'yyyy年mm月dd日 hh:MM:ss') || ""}}
    </view>
    <rich-text :nodes="detailsContent.details">
    </rich-text>

  </view>
</template>

<script>
  import {
    getInfoMarketInformationDetail
  } from '@/api/infoMarketInformation.js'
  export default {
    components: {},
    props: {

    },
    data() {
      return {
        detailsContent: {},
        id: "",
      }
    },
    computed: {

    },
    onLoad(data) {
      if (data.id) {
        this.id = data.id;
      }
      this.initData();
    },
    methods: {
      initData() {
        getInfoMarketInformationDetail(this.id).then((res) => {
          this.detailsContent = res.data;
        })
      },
      leftClick() {
        console.log('leftClick');
      },
    }
  }
</script>

<style lang="scss" scoped>
  .ConCss {
    padding: 0 30rpx;
  }

  .navBarCss {
    font-family: '苹方 粗体', '苹方 中等', '苹方', sans-serif
  }

  .titleCss {
    background-color: rgba(255, 255, 255, 0);
    box-sizing: border-box;
    font-family: '苹方 粗体', '苹方 中等', '苹方', sans-serif;
    font-weight: 700;
    color: #333333;
    text-align: left;
    line-height: normal;
    font-size: 40rpx;
    margin: 26rpx 0;

  }

  .releaseTimeCss {
    height: 32px;
    background-color: rgba(255, 255, 255, 0);
    box-sizing: border-box;
    font-family: '苹方 中等', '苹方', sans-serif;
    color: #999db0;
    text-align: left;
    line-height: normal;
    font-size: 24rpx;
  }

  img {
    width: 100%;
    height: 100%;
    margin: 20rpx 0;
  }

  p {
    line-height: 200%;
  }
</style>
