From 5018ba2d9b043a1e7907effb3f84f12001df5d4e Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 14 May 2021 13:13:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=BB=93=E6=9D=9F=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 --- .../DynamicActivity/ActivityMainPanel.lua | 64 +++++++++---------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua index 37ea4a6e95..77776510b5 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua @@ -91,46 +91,42 @@ function ActivityMainPanel:OnOpen(_activityType,_index) this.activityType = _activityType DynamicActivityManager.curActivityType = this.activityType tabs = DynamicActivityManager.GetActivityTableDataByPageInde(this.activityType) - -- --累计充值特殊判断 - -- for i = 1, #tabs do - -- if tabs[i] and tabs[i].ActiveType == ActivityTypeDef.AccumulativeRechargeExper then - -- local id = ActivityGiftManager.IsActivityTypeOpen(tabs[i].ActiveType) - -- if id and id > 0 then - -- if GlobalActConfig[id] and GlobalActConfig[id].ShowArt == 3 then--3类型的活动不是限时活动里的累计充值 - -- table.remove(tabs,i) - -- break - -- end - -- end - -- elseif tabs[i] and tabs[i].ActiveType == ActivityTypeDef.LimitExchange then - -- local id = ActivityGiftManager.IsActivityTypeOpen(tabs[i].ActiveType) - -- if id and id > 0 then - -- if GlobalActConfig[id] and GlobalActConfig[id].ShowArt ~= 1 then--3类型的活动不是限时活动里的累计充值 - -- table.remove(tabs,i) - -- break - -- end - -- end + -- _CurPageIndex = 0 + -- if _index and _index > 0 then + -- self:CheckActOpen(_index) + -- end + -- for index = 1, #tabs do + -- if _CurPageIndex < 1 then + -- self:CheckActOpen(index) + -- else + -- break -- end -- end - -- --累计充值特殊判断结束 - _CurPageIndex = 0 - if _index and _index > 0 then - self:CheckActOpen(_index) - -- LogPink("_index:"..tostring(_index)) - end - for index = 1, #tabs do - if _CurPageIndex < 1 then - self:CheckActOpen(index) - -- LogYellow("_index:"..tostring(index).." _CurPageIndex:"..tostring(_CurPageIndex)) - else - -- --LogGreen("Break _CurPageIndex:"..tostring(_CurPageIndex)) - break - end - end - --DynamicActivityManager.AddUIList(tabs[_CurPageIndex].Jump) + _CurPageIndex = _index or 0 end -- 打开,重新打开时回调 function ActivityMainPanel:OnShow() + if _CurPageIndex and _CurPageIndex > 0 then + self:CheckActOpen(_CurPageIndex) + end + for index = 1, #tabs do + if _CurPageIndex < 1 then + self:CheckActOpen(index) + else + break + end + end + if _CurPageIndex == 0 then + DynamicActivityManager.RemoveUIList() + if #DynamicActivityManager.OpenUIList > 0 then + JumpManager.GoJump(DynamicActivityManager.OpenUIList[#DynamicActivityManager.OpenUIList],function() + DynamicActivityManager.RemoveUIList() + end) + else + this:ClosePanel() + end + end orginLayer = self.sortingOrder if _CurPageIndex and (_CurPageIndex > #tabs or _CurPageIndex < 1) then _CurPageIndex = #tabs