diff --git a/pages/short_video/nvueSwiper/index.nvue b/pages/short_video/nvueSwiper/index.nvue index 8fed77a..877e446 100644 --- a/pages/short_video/nvueSwiper/index.nvue +++ b/pages/short_video/nvueSwiper/index.nvue @@ -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 }, /**