活动主界面修改提交

dev_chengFeng
jiaoyangna 2021-05-10 10:52:44 +08:00
parent f88ccd8f68
commit 3fffdd9cd3
2 changed files with 33 additions and 26 deletions

View File

@ -60,7 +60,7 @@ function ActivityMainPanel:CheckActOpen(_index)
if tabs[_index].IfBack == 1 then
if tabs[_index].ActiveType > 0 then
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[_index].ActiveType)
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[_index].ActiveType) then --and (not GlobalActConfig[id].ShowArt or GlobalActConfig[id].ShowArt == this.activityType) then
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[_index].ActiveType) and (tabs[_index].ActiveType == ActivityTypeDef.DynamicAct or not GlobalActConfig[id].ShowArt or GlobalActConfig[id].ShowArt == this.activityType) then
_CurPageIndex = _index
end
elseif tabs[_index].FunType > 0 then
@ -91,27 +91,27 @@ 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
end
end
--累计充值特殊判断结束
-- --累计充值特殊判断
-- 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
-- end
-- end
-- --累计充值特殊判断结束
_CurPageIndex = 0
if _index and _index > 0 then
self:CheckActOpen(_index)
@ -173,8 +173,15 @@ function this.PageTabAdapter(tab, index, status)
local sprite = nil
if tabs[index].ActiveType > 0 then
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[index].ActiveType)
if id and id > 0 then
local actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",id,"PageType",this.activityType,"ActiveType",tabs[index].ActiveType)
if id and id > 0 then
local actConfig
local actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",GlobalActConfig[id].ShowArt,"PageType",0,"ActiveType:",tabs[index].ActiveType)
if not actConfig then
actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",tabs[index].ActiveType,"PageType",this.activityType,"ActiveType",tabs[index].ActiveType)
end
if not actConfig then
actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",id,"PageType",this.activityType,"ActiveType",tabs[index].ActiveType)
end
if actConfig then
sprite = (status == "select" and actConfig.Icon[2] or actConfig.Icon[1])
end
@ -198,7 +205,7 @@ function this.PageTabAdapter(tab, index, status)
if tabs[index].ActiveType > 0 then
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[index].ActiveType)
--LogGreen("tabs[index].ActiveType:"..tabs[index].ActiveType.." id:"..tostring(id))
isshow = id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[index].ActiveType) --and (not GlobalActConfig[id].ShowArt or GlobalActConfig[id].ShowArt == this.activityType)
isshow = id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[index].ActiveType) and (tabs[index].ActiveType == ActivityTypeDef.DynamicAct or not GlobalActConfig[id].ShowArt or GlobalActConfig[id].ShowArt == this.activityType)
elseif tabs[index].FunType > 0 then
isshow = ActTimeCtrlManager.SingleFuncState(tabs[index].FunType)
else

View File

@ -697,7 +697,7 @@ function this.CreatActivity()
if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(v.ActiveType) and v.ActiveType ~= 42 then
local tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",GlobalActConfig[activityId].ShowArt,"PageType",0,"ActiveType:",v.ActiveType)
if not tempConfig then
tempConfig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.ActivityGroups,"ActId",activityId,"PageType",0)
tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",activityId,"PageType",0,"ActiveType:",v.ActiveType)
end
if tempConfig then
activityTabs[k].img.sprite = Util.LoadSprite(tempConfig.Icon[1])