diff --git a/pages/short_video/nvueSwiper/index.nvue b/pages/short_video/nvueSwiper/index.nvue index f340265..ea94209 100644 --- a/pages/short_video/nvueSwiper/index.nvue +++ b/pages/short_video/nvueSwiper/index.nvue @@ -87,7 +87,7 @@ - @@ -203,8 +203,8 @@ - + :style="'width: '+ windowWidth +'px; height: '+ windowHeight +'px;'" :refresher-triggered="isTriggered" @scrolltolower="GetList()" > + @@ -320,6 +320,7 @@ }, mapGetters(['isLogin', 'uid'])), data() { return { + isTriggered:false, imgHost: HTTP_REQUEST_URL, videoID: 0, pinlunNum: 0, @@ -422,6 +423,7 @@ } }, onLoad(options) { + console.log(options); this.getOptions(options); this.videoID = options.id; this.isUser = options.user == 1 ? true : false; @@ -446,6 +448,18 @@ }, 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) + }, + giveStart(item) { let status = item.relevance_id ? 0 : 1 graphicStartApi(item.community_id, { @@ -489,7 +503,6 @@ this.loadVideo = true; this.dataList = []; n == 1 ? this.get() : ''; - n == 2 ? this.getFocusList() : ''; n == 3 ? this.getGoods() : ''; }, /** @@ -691,6 +704,9 @@ if (this.k == this.dataList.length - 1 && this.currentNav !== 2) { this.loadVideo = true; this.GET() + }else if(this.currentNav == 2){ + this.loadVideo = true + this.getFocusList() } }, //每一组结束时新的请求 @@ -698,36 +714,55 @@ let that = this if (!that.loadVideo) return that.loadVideo = true - that.isUser ? - myVideoList(that.userUid, { - page: that.page, - limit: that.limit, - is_star: that.isSatrt, - community_id: that.videoID - }).then(res => { - that.videoData(res.data.list) - that.loadVideo = false - }).catch(err => { - return uni.showToast({ - title: err, - icon: 'none', - duration: 2000 - }); - }) : - videoList({ - page: that.page, - limit: that.limit, - id: that.videoID - }).then(res => { - that.loadVideo = false - that.videoData(res.data.list) - }).catch(err => { - return uni.showToast({ - title: err, - icon: 'none', - duration: 2000 - }); - }) + if(this.currentNav !== 2 ){ + that.isUser ? + myVideoList(that.userUid, { + page: that.page, + limit: that.limit, + is_star: that.isSatrt, + community_id: that.videoID + }).then(res => { + that.videoData(res.data.list) + that.loadVideo = false + }).catch(err => { + return uni.showToast({ + title: err, + icon: 'none', + duration: 2000 + }); + }) : + videoList({ + page: that.page, + limit: that.limit, + id: that.videoID + }).then(res => { + that.loadVideo = false + that.videoData(res.data.list) + }).catch(err => { + return uni.showToast({ + title: err, + icon: 'none', + duration: 2000 + }); + }) + }else if(this.currentNav == 2 ){ + that.isUser ? + myVideoList(that.userUid, { + page: that.page, + limit: that.limit, + is_star: that.isSatrt, + community_id: that.videoID + }).then(res => { + that.videoData(res.data.list) + that.loadVideo = false + }).catch(err => { + return uni.showToast({ + title: err, + icon: 'none', + duration: 2000 + }); + }) : this.getFocusList() + } }, get() { let that = this