diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua index ab7b637287..b6a167d9f6 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua @@ -56,6 +56,9 @@ function this:BtnClick(i) if i == 1 then friendHelpHeros = MonsterCampManager.GetFriendHelpHeros(curType) end + for k,v in pairs(itemList) do + v.gameObject:SetActive(false) + end this:RefreshItemData() end @@ -115,6 +118,7 @@ function this:RefreshItemData() this.ScrollView:SetData(data,function(index,go) --this:SetSingleData(index,go,data[index]) LogGreen(go.name) + go.gameObject:SetActive(true) local tempData = FourTrailSingleHelpHero:New(go) tempData:OnOpen(curIndex,data[index],curType,heightPower) local tempId = curIndex == 1 and data[index].hero.dynamicId or data[index].dynamicId @@ -123,11 +127,14 @@ function this:RefreshItemData() end function this:OnClose() - tabs = {} end function this:OnDestroy() tabs = {} + if this.ScrollView then + SubUIManager.Close(this.ScrollView) + this.ScrollView = nil + end itemList = {} end diff --git a/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua b/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua index e6a4403b63..13f7a158b8 100644 --- a/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua +++ b/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua @@ -1,6 +1,6 @@ -local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) + FourTrailSingleHelpHero = {} - +local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) function FourTrailSingleHelpHero:New(gameObject) local b = {} b.gameObject = gameObject @@ -135,6 +135,7 @@ end --界面销毁时调用(用于子类重写) function FourTrailSingleHelpHero:OnDestroy() + self = nil end