<template>
  <div class="mainView">
    <BreadCrumb />
    <div class="content-lzyj">
      <article-module :article="pageData.article">
        <div class="articleInfo">
          <span class="title">发布时间: <span>{{ pageData.publishTime }}</span></span>
        </div>
      </article-module>
    </div>
  </div>
</template>
<script setup>
import api from "@/api/article.js";
import { ref, onMounted } from "vue";
import { useRouter } from "vue-router";
import articleModule from "@/components/article/index.vue";
import BreadCrumb from "@/components/breadcrumbModule/index.vue";
const pageData = ref({
  publishTime: "",
  article: {},
});
const queryData = useRouter().currentRoute.value.query;
onMounted(() => {
  getPageData();
});
function getPageData() {
  api.hmimagenewsDetail({ id: queryData.id }).then((res) => {
    if (res.code == 200) {
      pageData.value.article.title = res.data.newsTitle;
      pageData.value.publishTime = res.data.publishTime;
      pageData.value.article.contentHtml = res.data.newsContent;
      pageData.value.article.attachments = res.data.newsImages
    }
  });
}
</script>
<style scoped lang="less">
.content-lzyj {
  width: 80%;
  padding: 30px;
  margin: 0 auto;

  .articleInfo {}
}

.title {
  color: #969696;
}
</style>
