视频列表的上拉刷新优化
This commit is contained in:
parent
4460de9be4
commit
205176ee94
@ -391,6 +391,7 @@
|
||||
limit: 10
|
||||
},
|
||||
communityId:'',
|
||||
Listcount:''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -451,15 +452,24 @@
|
||||
onReady: function() {},
|
||||
methods: {
|
||||
async GetList(){
|
||||
console.log('123');
|
||||
const {data} = await graphicLstApi({
|
||||
page: this.page++,
|
||||
limit: this.limit,
|
||||
is_star: this.isSatrt,
|
||||
community_id: this.videoID
|
||||
})
|
||||
console.log(data);
|
||||
this.cateGoods.push(...data.list)
|
||||
// if(this.cateGoods.length > )
|
||||
console.log(this.Listcount);
|
||||
if(this.cateGoods.length < this.Listcount){
|
||||
console.log('123');
|
||||
const {data} = await graphicLstApi({
|
||||
category_id:-1,
|
||||
page: this.page++,
|
||||
limit: this.limit,
|
||||
})
|
||||
this.cateGoods.push(...data.list)
|
||||
if(data.list.length < this.limit){
|
||||
this.$util.Tips({
|
||||
title: '没有更多了',
|
||||
});
|
||||
}
|
||||
}
|
||||
// console.log(this.cateGoods.length);
|
||||
|
||||
},
|
||||
|
||||
giveStart(item) {
|
||||
@ -505,6 +515,7 @@
|
||||
this.loadVideo = true;
|
||||
this.dataList = [];
|
||||
n == 1 ? this.get() : '';
|
||||
n == 2 ? this.getFocusList() : '';
|
||||
n == 3 ? this.getGoods() : '';
|
||||
},
|
||||
/**
|
||||
@ -520,6 +531,8 @@
|
||||
const {
|
||||
data
|
||||
} = await graphicLstApi(this.where)
|
||||
console.log(data);
|
||||
this.Listcount=data.count
|
||||
this.cateGoods = data.list
|
||||
},
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user