gdpao
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
<videoItem v-for="item in listInfo" :key="item.article_id" :item="item"
|
||||
@getArticlelist="getArticlelist"></videoItem>
|
||||
<view class="no-data" v-show="!listInfo && page">暂无数据</view>
|
||||
<u-loadmore class="load-size" color="#999999" :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -75,6 +76,13 @@ export default {
|
||||
listInfo: [], // 列表详情
|
||||
member_id: 0,
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
iconType: 'circle',
|
||||
loadText: {
|
||||
loadmore: '轻轻上拉',
|
||||
loading: '努力加载中',
|
||||
nomore: '实在没有了'
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -84,6 +92,10 @@ export default {
|
||||
this.getArticlelist();
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
// this.page++;
|
||||
this.getArticlelist();
|
||||
},
|
||||
methods:{
|
||||
// 获取信息
|
||||
getUserInfo(id) {
|
||||
@@ -107,13 +119,27 @@ export default {
|
||||
}).then(res => {
|
||||
if (res.errCode == 0) {
|
||||
// console.log(res);
|
||||
this.listInfo = res.data.list;
|
||||
// this.listInfo = res.data.list;
|
||||
// console.log(this.listInfo);
|
||||
if (this.page == 1) {
|
||||
this.listInfo = res.data.list;
|
||||
this.status = "loadmore";
|
||||
} else if (res.data.length == 0 && this.page > 1) {
|
||||
this.status = "nomore";
|
||||
} else {
|
||||
this.listInfo = this.listInfo.concat(res.data.list);
|
||||
console.log(this.listInfo)
|
||||
}
|
||||
if (res.data.length == 0 && this.page > 1) {
|
||||
} else {
|
||||
this.page++;
|
||||
}
|
||||
} else {
|
||||
console.log(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
dianji(a){
|
||||
console.log(a);
|
||||
if(typeof a == "object"){
|
||||
@@ -121,7 +147,13 @@ export default {
|
||||
}else{
|
||||
this.num = a
|
||||
}
|
||||
this.getArticlelist();
|
||||
if (a == 0) {
|
||||
this.page = 1;
|
||||
this.getArticlelist();
|
||||
} else if (a == 1) {
|
||||
this.page = 1;
|
||||
this.getArticlelist();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user