<template>
  <view class="container">
    <!-- 公告详情 -->
    <view class="title">{{ noticeDetail.title }}</view>
    <view class="time" v-if="noticeDetail">
        <span>
            <span>作者：{{noticeDetail.author ||  '数智云商城'}}</span>
        </span>
      <span :style="{'margin-left':'20rpx'}">
          时间： {{ $day(noticeDetail.add_time * 1000).format("YYYY-MM-DD HH:mm:ss") }}
      </span></view
    >
    <jyf-parser :html="noticeDetail.content" class="mar_t50"></jyf-parser>
    <!-- 公告详情-end -->
  </view>
</template>

<script>
let app = getApp();
// let reqApi = new ReqApi();
var appEv = app.$vm.$options;
import { post } from "@/request/api.js";
import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
// import { ReqApi } from "@/utils/reqTools.js";
export default {
  data() {
    return {
      content: "",
      noticeDetail: undefined,
    };
  },
  onLoad(option) {
    this.noticeDetail = JSON.parse(decodeURIComponent(option.detail));
    console.log(this.noticeDetail, "qqqq");
    // this.loadData()
  },
  methods: {
    loadData() {
      let data = {
        type: 2,
      };
      post("/my/article", data).then((res) => {
        if (res.code == 0) {
          this.content = res.data.data.content;
          console.log(this.content);
          // this.BannerImg = res.list;
        }
      });
    },
  },
  components: {
    jyfParser,
  },
};
</script>

<style lang="scss" scoped>
// 用户须知
.container {
  border-top: 20rpx solid #f5f5f5;
  padding: 0 20rpx;
  box-sizing: border-box;
  .title {
    margin-top: 20rpx;
    font-size: 48rpx;
    font-weight: bold;
  }

  .time {
    margin-top: 10rpx;
    font-size: 20rpx;
    color: #666363;
  }
}
// 用户须知-end
</style>
