From 75e98578c20fd06f00c6d42dd7f89357538e944d Mon Sep 17 00:00:00 2001 From: THK3121 Date: Thu, 1 Jun 2023 09:59:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E5=95=86=E5=93=81=E7=9A=84?= =?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.json | 3 +-- pages/store/home/index.vue | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pages.json b/pages.json index 0e125c9..88ca134 100644 --- a/pages.json +++ b/pages.json @@ -662,8 +662,7 @@ "path": "home/index", "style": { "navigationStyle": "custom", - "navigationBarTitleText": "店铺首页", - "enablePullDownRefresh": true + "navigationBarTitleText": "店铺首页" // #ifdef MP , "navigationBarTextStyle": "#FFFFFF" diff --git a/pages/store/home/index.vue b/pages/store/home/index.vue index 355baa8..bf30c12 100644 --- a/pages/store/home/index.vue +++ b/pages/store/home/index.vue @@ -74,7 +74,7 @@ - + @@ -496,6 +496,8 @@ }, data() { return { + //下拉 + isTriggered:false, domain: HTTP_REQUEST_URL, // #ifdef MP menuButtonInfo: uni.getMenuButtonBoundingClientRect(), @@ -1183,7 +1185,18 @@ } }, //#endif + onRefresh(){ + this.isTriggered = true; + const newList = this.goods.reverse(); + this.goods = newList; + this.getProductSpu() + setTimeout(() => { + this.isTriggered = false; + }, 500) + + }, }, + onReachBottom() { // 模拟触底刷新 if (this.tabActive == 0) { @@ -1200,7 +1213,7 @@ this.goods = newList; this.getProductSpu() // uni.startPullDownRefresh(); - uni.stopPullDownRefresh(); + // uni.stopPullDownRefresh(); }, 500) } }