活动结束 修改提交

(cherry picked from commit 5018ba2d9b)
dev_chengFeng
jiaoyangna 2021-05-14 13:13:15 +08:00
parent c855739dd6
commit 3905116205
1 changed files with 30 additions and 34 deletions

View File

@ -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