【限时活动】删除timer

dev_chengFeng
ZhangBiao 2021-04-27 17:50:26 +08:00
parent 39f2f06563
commit 90fd541e99
4 changed files with 11 additions and 3 deletions

View File

@ -146,6 +146,10 @@ function CommonActPage:OnClose()
end
function CommonActPage:OnDestroy()
if self.localTimer then
self.localTimer:Stop()
self.localTimer = nil
end
for k,v in pairs(self.ItemList) do
SubUIManager.Close(v)
end

View File

@ -74,7 +74,7 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function ExChangePage:OnShow(_sortingOrder)
self.gameObject:SetActive(true)
self.cursortingOrder = _sortingOrder or self.self.cursortingOrder
self.cursortingOrder = _sortingOrder or self.cursortingOrder
self:ExChangeShow()
end

View File

@ -199,6 +199,10 @@ function ExpertPage:OnClose()
end
function ExpertPage:OnDestroy()
if self.localTimer then
self.localTimer:Stop()
self.localTimer = nil
end
for k,v in pairs(self.ItemList) do
SubUIManager.Close(v)
end

View File

@ -270,12 +270,12 @@ function RewardItemPopup:SelectCanPopUpBagMaxMessage()
end
function RewardItemPopup:OnSortingOrderChange()
if not itemDataList then
if not itemDataList or #itemDataList < 0 then
return
end
if #itemListPrefab > 0 then
for i = 1, #itemListPrefab do
if itemListPrefab[i] then
if itemListPrefab[i] and itemDataList[i] then
local view = itemListPrefab[i]
local curItemData=itemDataList[i]
view:OnOpen(true,curItemData,1.15,true,true,false,self.sortingOrder)