Article.vue
1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<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>