<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.oss-cn-beijing.aliyuncs.com/project/marywood/new_banner.jpg',
        slider: [
          {
            name: this.$t('menu.projectChild.bg'),
            path: '/project-intro/introduce'
          },
          {
            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}`
        }
      }
    }
  }
}
</script>
