From e58f571de4fdab7ecb41a7db98979386f817494f Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Thu, 20 Aug 2020 10:16:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E6=B7=BB=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index c495dba..3eb3f20 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -39,7 +39,8 @@ - + @@ -260,6 +261,7 @@ loading: '努力加载中', nomore: '实在没有了' }, + refresher:true } }, components: { @@ -360,6 +362,7 @@ this.$u.api.tabLiveList({page:this.live_page}).then((res) => { // uni.stopPullDownRefresh(); this.status_live = "loading"; + this.refresher = false; console.log(res) if (res.errCode == 0) { uni.hideLoading(); @@ -414,7 +417,8 @@ }, // 切换导航 dianji(a) { - // console.log(a); + console.log(a); + if (a.type == "change") { this.num = a.detail.current } else { @@ -422,7 +426,7 @@ } // console.log(this.num); // 状态请求 - if (a.type == "change") { // 强制请求一次 + if (a.type == "change" || this.num == 1) { // 强制请求一次 if (this.num == 0) { this.page = 1; this.articleList = []; @@ -432,7 +436,7 @@ } else if (this.num == 1) { this.live_page = 1; this.getZhiBoSwiper(); // 直播轮播 - this.tabLiveList(); + this.tabLiveList(); } else if (this.num == 2) { this.follow_page = 0; this.fansList = []; @@ -580,6 +584,16 @@ } }) }, + onPulling(e) { + console.log("onpulling", e); + }, + onRestore() { + this.refresher = 'restore'; // 需要重置 + console.log("onRestore"); + }, + onAbort() { + console.log("onAbort"); + } }, }