diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_YunYouMan.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_YunYouMan.lua index 40b663fc92..67fa7c6717 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_YunYouMan.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_YunYouMan.lua @@ -31,6 +31,7 @@ end function this:BindEvent() Util.AddClick(this.confirm,function() + data.otherData.selectId = self.selectId parent:ClosePanel() if func then func() @@ -54,6 +55,7 @@ function this:OnShow(_parent,...) local _args = {...} data = _args[1] func = _args[2] + self.selectId = data.otherData.selectId local list = BagManager.GetBagItemDataByItemType(ItemBaseType.Equip) local EquipedEquipList = HeroManager.GetEquipedEquipList() @@ -119,19 +121,19 @@ function this:ShowSingleData(item,sdata,index) self.itemList[index].gameObject:SetActive(true) self.maskList[index] = itemmask self.maskImageList[index] = maskImage - self.maskImageList[index]:SetActive(data.otherData.selectId == sdata.Id) + self.maskImageList[index]:SetActive(self.selectId == sdata.Id) Util.AddOnceClick(self.maskList[index],function () for i = 1, #self.maskImageList do self.maskImageList[i]:SetActive(false) end - if data.otherData.selectId == sdata.Id then + if self.selectId == sdata.Id then self.maskImageList[index]:SetActive(false) - data.otherData.selectId = 0 + self.selectId = 0 else self.maskImageList[index]:SetActive(true) - data.otherData.selectId = sdata.Id + self.selectId = sdata.Id end end) Util.AddOnceClick(equiped,function () @@ -140,6 +142,7 @@ function this:ShowSingleData(item,sdata,index) end function this:OnClose() + self.selectId = nil self.equipList={} self.maskList = {} self.maskImageList = {}