<template>
  <app-frame :data="frameParams">
    <article-list v-bind="listOptions"></article-list>
  </app-frame>
</template>
<script>
import appFrame from '@/components/appFrame'
import ArticleList from '@/components/ArticleList'
import { getArticleList } from '@/api'
export default {
  layout: 'normal',
  components: { appFrame, ArticleList },
  data() {
    return {
      frameParams: {
        banner: 'https://webapp-pub.ezijing.com/project/seg-shms/banner-bg-rdxw.png',
        slider: [
          {
            name: this.$t('menu.newsChild.hot'),
            path: '/news/hot'
          },
          {
            name: this.$t('menu.newsChild.interview'),
            path: '/news/interview'
          }
        ]
      }
    }
  },
  computed: {
    listOptions() {
      return {
        remote: {
          httpRequest: getArticleList,
          params: { project_id: process.env.newProjectId, type_tag: this.$route.query.type || 'article_news_hot' }
        },
        to(item) {
          return `/news/hot/${item.id}`
        }
      }
    }
  },
  methods: {
  }
}
</script>