From aae9f78a91c7e7c60612b7cef09864ade1d91ff6 Mon Sep 17 00:00:00 2001 From: Gdpao <1341331954@qq.com> Date: Mon, 17 Aug 2020 19:33:55 +0800 Subject: [PATCH] gdpaon --- pageB/video/video.nvue | 3 +++ pages/index/index.vue | 19 +++++-------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/pageB/video/video.nvue b/pageB/video/video.nvue index 1fc9a5e..8ce85a3 100644 --- a/pageB/video/video.nvue +++ b/pageB/video/video.nvue @@ -177,6 +177,9 @@ onReady() { this.videoBox = uni.createVideoContext("videoId", this); }, + onHide() { + this.videoBox.pause(); + }, onBackPress() { if (this.cart_type) { this.cart_type = !this.cart_type; diff --git a/pages/index/index.vue b/pages/index/index.vue index fa90643..761384a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -328,7 +328,7 @@ if (this.live_page == 1) { this.tabLiveLists = res.data.data; this.status = "loadmore"; - if (res.data.data.length < 6) { + if (res.data.data.length < 4) { this.status = "nomore"; } } else if (res.data.data.length == 0 && this.live_page > 1) { @@ -419,26 +419,17 @@ uni.stopPullDownRefresh(); this.status = "loading"; if (res.errCode == 0) { - uni.hideLoading(); - console.log(this.page,res.data.list.length); if (this.page == 1) { - this.articleList = res.data.list; - this.status = "loadmore"; - if (res.data.list.length < 4) { + this.articleList = res.data.list; + if (!res.data.length) { this.status = "nomore"; } - } else if (res.data.length == 0 && this.page > 1) { + } else if (res.data.length == 0) { this.status = "nomore"; } else { this.articleList = this.articleList.concat(res.data.list); } - if (res.data.length == 0 && this.page > 1) { - console.log(111); - } else { - this.page++; - } - } else { - this.status = "nomore" + this.page++; } }) }, -- 2.47.2