视频列表的上拉刷新优化

This commit is contained in:
THK3121 2023-06-02 18:08:11 +08:00
parent 4460de9be4
commit 205176ee94

View File

@ -391,6 +391,7 @@
limit: 10 limit: 10
}, },
communityId:'', communityId:'',
Listcount:''
} }
}, },
watch: { watch: {
@ -451,15 +452,24 @@
onReady: function() {}, onReady: function() {},
methods: { methods: {
async GetList(){ async GetList(){
// if(this.cateGoods.length > )
console.log(this.Listcount);
if(this.cateGoods.length < this.Listcount){
console.log('123'); console.log('123');
const {data} = await graphicLstApi({ const {data} = await graphicLstApi({
category_id:-1,
page: this.page++, page: this.page++,
limit: this.limit, limit: this.limit,
is_star: this.isSatrt,
community_id: this.videoID
}) })
console.log(data);
this.cateGoods.push(...data.list) this.cateGoods.push(...data.list)
if(data.list.length < this.limit){
this.$util.Tips({
title: '没有更多了',
});
}
}
// console.log(this.cateGoods.length);
}, },
giveStart(item) { giveStart(item) {
@ -505,6 +515,7 @@
this.loadVideo = true; this.loadVideo = true;
this.dataList = []; this.dataList = [];
n == 1 ? this.get() : ''; n == 1 ? this.get() : '';
n == 2 ? this.getFocusList() : '';
n == 3 ? this.getGoods() : ''; n == 3 ? this.getGoods() : '';
}, },
/** /**
@ -520,6 +531,8 @@
const { const {
data data
} = await graphicLstApi(this.where) } = await graphicLstApi(this.where)
console.log(data);
this.Listcount=data.count
this.cateGoods = data.list this.cateGoods = data.list
}, },
/** /**