From 3f24f4cd86cc3ed3e54d292fbc3556de7f5478c9 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 18 Sep 2021 17:58:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9B=E7=81=B5=E8=AF=95=E7=82=BC=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/GeneralPanel/GeneralBigPopup.lua | 2 +- .../View/GeneralBigPopup_ExpertRewardSortPanel.lua | 4 ++-- .../View/GeneralBigPopup_FourElementHelpFight.lua | 12 ++++++++---- .../View/GeneralBigPopup_JinJieYuLan.lua | 4 ++-- .../View/GeneralBigPopup_RecrutDetail.lua | 4 ++-- .../GeneralPanel/View/GeneralBigPopup_WishDraw.lua | 4 ++-- .../View/GeneralBigPopup_WuJinShuXing.lua | 4 ++-- .../View/GeneralBigPopup_XiuXingSelectHero.lua | 4 ++-- .../View/GeneralBigPopup_XunBaoMiZong.lua | 4 ++-- .../View/GeneralBigPopup_YiJingBaoKu.lua | 4 ++-- .../GeneralBigPopup_YiJingBaoKuRewardPreview.lua | 4 ++-- 11 files changed, 27 insertions(+), 23 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua index 081219a67b..db9595827e 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/GeneralBigPopup.lua @@ -98,7 +98,7 @@ end function GeneralBigPopup:OnShow() contentPrefabs[this.popupKey].gameObject:SetActive(true) - contentScripts[this.popupKey].view:OnShow(this, unpack(this.args))--1、传入自己 2、传入不定参 + contentScripts[this.popupKey].view:OnShow(this,this.args)--1、传入自己 2、传入不定参 end function GeneralBigPopup:OnClose() diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_ExpertRewardSortPanel.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_ExpertRewardSortPanel.lua index d710f02c07..e1cf0918ff 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_ExpertRewardSortPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_ExpertRewardSortPanel.lua @@ -35,10 +35,10 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,data) parent=_parent sortingOrder = _parent.sortingOrder - local args = {...} + local args = data activityId = args[1] activityType = args[2] local rewardTabs = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRankingReward,"ActivityId",activityId) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua index 7bc09624be..092cbf60b0 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua @@ -50,13 +50,16 @@ function this:BindEvent() end function this:BtnClick(i) + if curIndex == i then return end + curIndex = i + LogGreen("curIndex:"..curIndex) this.selectBtn.transform:SetParent(tabs[i].transform) this.selectBtn:GetComponent("RectTransform").localPosition = Vector3.zero this.selectBtn.transform:SetAsFirstSibling() - curIndex = i + for k,v in pairs(itemList) do v.gameObject:SetActive(false) end @@ -69,14 +72,15 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder - local args = {...} + local args = _Data waveId = args[1] curType = args[2] friendHelpHeros = args[3] myHeros = args[4] + LogGreen("myHeros:"..#myHeros) this:SetMyHeightPower() this.titleText.text = FourElementName[curType] rate = tonumber(string.format("%.2f",ConfigManager.GetConfigData(ConfigName.CampTowerSetting,1).HelpFightMax / 10000)) @@ -152,7 +156,7 @@ end function this:SetMyHeightPower() heightPower = 0 - if not myHeros or #myHeros < 0 then + if not myHeros or #myHeros < 1 then heightPower = 0 return end diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_JinJieYuLan.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_JinJieYuLan.lua index 53a5280c39..1d5203ff7f 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_JinJieYuLan.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_JinJieYuLan.lua @@ -27,11 +27,11 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder parent.BG:SetActive(false) - local args = {...} + local args = _Data local curHeroData = args[1] if not curHeroData or not HeroConfig[curHeroData.heroConfig.Id] or #HeroConfig[curHeroData.heroConfig.Id].RankupConsumeMaterial < 1 then parent:ClosePanel() diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua index 0e9a6935d1..be97d08e62 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_RecrutDetail.lua @@ -48,10 +48,10 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder - local args = {...} + local args = _Data local helpType = args[1] local str = ConfigManager.TryGetConfigData(ConfigName.QAConfig,helpType).content str = string.gsub(str,"{","") diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua index 1f89fc8bb4..0498e6d27e 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WishDraw.lua @@ -70,10 +70,10 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) self.parent=_parent self.sortingOrder = _parent.sortingOrder - local args = {...} + local args = _Data NetManager.ChoiceWishHeroRequest(nil,function () if args[1] then self.curSelect = args[1] diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WuJinShuXing.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WuJinShuXing.lua index a6491ed4f7..6998665880 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WuJinShuXing.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_WuJinShuXing.lua @@ -26,11 +26,11 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder parent.BG:SetActive(false) - local args = {...} + local args = _Data local data = args[1] for i = 1, #data do if not attriList[i] then diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XiuXingSelectHero.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XiuXingSelectHero.lua index 97840833dc..edf703087c 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XiuXingSelectHero.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XiuXingSelectHero.lua @@ -58,11 +58,11 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) parent=_parent sortingOrder = _parent.sortingOrder --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 - local _args = {...} + local _args = _Data data = _args[1] func = _args[2] self.heroList = HeroManager.GetHeroDataByPropertyAndProfession(data.FitList[1],data.FitList[2],1) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XunBaoMiZong.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XunBaoMiZong.lua index 844596a8d3..8d75d6deaf 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XunBaoMiZong.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_XunBaoMiZong.lua @@ -30,10 +30,10 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,_Data) self.parent=_parent self.sortingOrder = _parent.sortingOrder - local args = {...} + local args = _Data self.actData = args[1] self.timeText.text = string.format("概率有效期:%s ~ %s",os.date("%Y-%m-%d", self.actData.startTime),os.date("%Y-%m-%d", self.actData.endTime)) this:Refresh(true,true) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua index 7eb7f770e2..b636697c29 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKu.lua @@ -51,13 +51,13 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,data) itemList={} parent=_parent sortingOrder = _parent.sortingOrder --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 - _args = {...} + _args = data ActData = _args[1] func = _args[2] this.titleText.text = Language[10760] diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua index bb5b0c265f..1a8d93277c 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_YiJingBaoKuRewardPreview.lua @@ -44,13 +44,13 @@ end function this:RemoveListener() end -function this:OnShow(_parent,...) +function this:OnShow(_parent,data) itemList={} parent=_parent sortingOrder = _parent.sortingOrder --不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参 - _args = {...} + _args = data ActData = _args[1] func = _args[2] this.titleText.text = Language[10763]