newsDetails.vue 1.66 KB
<template>
  <view class="ConCss">
    <u-navbar 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>
  export default {
    components: {},
    props: {

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

    },
    onLoad(data) {
      let resData = JSON.parse(data.detailsContent)
      console.log(resData);
      if(data){
        this.detailsContent = resData;
      }
    },
    methods: {
      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;
  }

</style>