<template>
  <div class="articles">
    <header-top>
      <span slot="Bigtitle">文件详情</span>
    </header-top>
    <div class="context">
      <article-main :onefilelist="onefilelist"></article-main>
    </div>
  </div>
</template>
<script>
// 引入的组件
import HeaderTop from "../../components/header/header.vue";
import ArticleMain from "./children/articlemain.vue";

import { getonefile } from "../../network/poicefile";

export default {
  name: "articles",
  components: {
    HeaderTop,
    ArticleMain,
  },
  data() {
    return {
      // fileID: "52de8ee1816d403a82c9717f928e0aeb",
      fileID: null,
      onefilelist: [],
    };
  },

  created() {
    // 获取fileID
    this.fileID = this.$route.params.fileID;
    this.getonefile();
  },

  methods: {
    getonefile() {
      getonefile(this.fileID).then((res) => {
        console.log(res);
        this.onefilelist.push({ ...res.data });
        console.log(this.onefilelist);
      });
    },
  },
};
</script>

<style scoped>
/deep/.search {
  display: none;
}

.context {
  width: 90%;
  margin: 0 auto;
}
</style>