<template>
  <div>
    <tab-nav active="3"></tab-nav>
    <img src="https://webapp-pub.ezijing.com/www/h5/images/about_banner_03.png" class="main-banner" />
    <div class="news-list">
      <news-item v-for="item in list" :item="item" :key="item.id"></news-item>
    </div>
  </div>
</template>

<script>
import TabNav from '@/components/about/TabNav'
import NewsItem from '@/components/about/NewsItem'
export default {
  props: { acitve: String },
  components: { TabNav, NewsItem },
  data() {
    return {
      list: []
    }
  },
  async fetch() {
    const params = {
      project_id: process.env.projectId,
      type_tag: this.$route.query.type || 'article_news'
    }
    this.list = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => res.data.data)
  }
}
</script>

<style lang="scss">
.news-list {
  margin: 0.2rem 0.15rem;
}
</style>
