From 7e9fad28b7e04c0a3a6069a4f0c9f63bb3776a49 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Sat, 24 Jul 2021 19:33:56 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=B8=87=E8=B1=A1=E5=95=86=E4=BC=9A?= =?UTF-8?q?=E3=80=91=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/NewActivity/CommonActPage.lua | 4 ++++ Assets/ManagedResources/~Lua/View/ShopViewNew.lua | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/NewActivity/CommonActPage.lua b/Assets/ManagedResources/~Lua/Modules/NewActivity/CommonActPage.lua index c1303e27f3..b9ec8dd2f6 100644 --- a/Assets/ManagedResources/~Lua/Modules/NewActivity/CommonActPage.lua +++ b/Assets/ManagedResources/~Lua/Modules/NewActivity/CommonActPage.lua @@ -259,6 +259,10 @@ end function CommonActPage:OnClose() self.parent.tabbox.gameObject:SetActive(true) self.gameObject:SetActive(false) + if self.localTimer then + self.localTimer:Stop() + self.localTimer = nil + end end function CommonActPage:OnDestroy() diff --git a/Assets/ManagedResources/~Lua/View/ShopViewNew.lua b/Assets/ManagedResources/~Lua/View/ShopViewNew.lua index abcde9f410..692e68541f 100644 --- a/Assets/ManagedResources/~Lua/View/ShopViewNew.lua +++ b/Assets/ManagedResources/~Lua/View/ShopViewNew.lua @@ -114,17 +114,17 @@ function ShopViewNew:BindEvent() end local RefreshData = function(self) - self:RefreshItemList(false) + self:OnShow(sortingOrder) end --添加事件监听(用于子类重写) function ShopViewNew:AddListener() - Game.GlobalEvent:AddEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh,RefreshData,self) + Game.GlobalEvent:AddEvent(GameEvent.Shop.OnShopInfoChange,RefreshData,self) end --移除事件监听(用于子类重写) function ShopViewNew:RemoveListener() - Game.GlobalEvent:RemoveEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh,RefreshData,self) + Game.GlobalEvent:RemoveEvent(GameEvent.Shop.OnShopInfoChange,RefreshData,self) end function ShopViewNew:OnSortingOrderChange()