From 5d0b0899d7743b3d53356b69785e893eb7bc0024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?= <15778543+xufeiyang6017@user.noreply.gitee.com> Date: Fri, 26 Dec 2025 17:14:51 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=A7=BB=E9=99=A4=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0=EF=BC=8C=E4=BB=85=E4=BF=9D=E7=95=99=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - onShow不再自动刷新商品列表 - 移除onHide/onUnload中的刷新标记逻辑 - 保留onPullDownRefresh下拉刷新功能 --- pages/index/index.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 0900e0d..8079a53 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -44,9 +44,6 @@ Page({ previewImageUrls: [], previewImageIndex: 0, showImagePreview: false, - - // 页面刷新标志 - needRefresh: false, }, // 跳转到聊天页面 @@ -192,18 +189,6 @@ Page({ app.updateCurrentTab('index'); app.globalData.showTabBar = true; this.checkAndRestoreLoginStatus() - if (this.data.needRefresh) { - this.setData({ needRefresh: false }) - this.refreshGoodsList() - } - }, - - onHide: function () { - this.setData({ needRefresh: true }) - }, - - onUnload: function () { - this.setData({ needRefresh: true }) }, onPullDownRefresh: function() {