From 205176ee941abb5c4fd9bebcd7a2f936644ddbe2 Mon Sep 17 00:00:00 2001 From: THK3121 Date: Fri, 2 Jun 2023 18:08:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E4=B8=8A=E6=8B=89=E5=88=B7=E6=96=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/short_video/nvueSwiper/index.nvue | 31 ++++++++++++++++++------- 1 file changed, 22 insertions(+), 9 deletions(-) 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 }, /**