<template>
    <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="getConsultation">
      <ArticleList :list="ArticleData"></ArticleList>
    </van-list>
</template>

<script>
import ArticleList from './c_ArticleList.vue'

export default {
  name: 'Article',
  data() {
    return {
      id: '',
      page: 1,
      loading: false,
      finished: false,
      ArticleData: [], //底部栏目资讯
    }
  },
  // mounted() {
  //   this.getConsultation()
  // },
  methods: {
    // 获取底部栏目资讯
    getConsultation() {
      let that = this;
      this.yxAxios.post(`${this.proxyUrl}/manage/info/content/listWithNoContent`, { pageNum: this.page, pageSize: 10 }).then((res) => {
        if (res.data.code == 200) {
          let all = res.data.rows
          let tempList = []
          all.forEach(function (item, i) {
            item.createTime = that.Moment(new Date(item.createTime)).format('YYYY-MM-DD')
            tempList.push(item)
          })
          all = tempList
          this.page++
          this.ArticleData.push(...all)
          this.loading = false
          if (this.ArticleData.length >= res.data.total) {
            this.finished = true
          }
        } else {
          this.$toast.fail(res.data.message)
        }
      })
    },
    
  },
  components:{
    ArticleList
  }
}
</script>

<style lang="scss">
// 长辈版
.elder {
  .article .article_list_wrap_three .article_list_title,.article .article_list_wrap_three .read_num,.article .article_list_wrap_three .push_date{
    font-size: 36px;
  }
  
}
</style>
