<template>
  <app-frame :tabs="tabs">
    <img src="https://webapp-pub.ezijing.com/www/pc/news/banner.jpg" class="banner" />
    <template #article>
      <article-list v-bind="listOptions"></article-list>
    </template>
  </app-frame>
</template>

<script>
import AppFrame from '@/components/AppFrame'
import navList from '@/assets/aboutNavList.js'
import ArticleList from '@/components/ArticleList'
import { getArticleList } from '@/api'

export default {
  components: { AppFrame, ArticleList },
  data() {
    return {
      tabs: navList(this)
    }
  },
  computed: {
    listOptions() {
      return {
        remote: {
          httpRequest: getArticleList,
          params: { project_id: import.meta.env.VITE_PROJECT_ID, type_tag: 'article_news' }
        },
        to(item) {
          return { name: 'about-news-id', params: { id: item.id } }
        }
      }
    }
  }
}
</script>
