【主题活动】分页提交

dev_chengFeng
ZhangBiao 2021-07-23 11:27:28 +08:00
parent 3d105fae48
commit 8981c707ba
4 changed files with 23 additions and 23 deletions

View File

@ -97,6 +97,11 @@ function ActivityMainPanel:CheckActOpen(_index)
if ActTimeCtrlManager.SingleFuncState(tabs[_index].FunType) then
_CurPageIndex = _index
end
elseif tabs[_index].ShopData and tabs[_index].ShopData[1][1] == -9999 then
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct)
if id and id > 0 and ActivityGiftManager.IsQualifiled(tabs[_index].ActiveType) and GlobalActConfig[id].ShowArt == tabs[_index].ActId then
_CurPageIndex = _index
end
else
_CurPageIndex = _index
end
@ -244,7 +249,14 @@ function this.PageTabAdapter(tab, index, status)
isshow = ActivityGiftManager.IsQualifiled(tabs[index].ActiveType)
elseif tabs[index].FunType > 0 then
isshow = ActTimeCtrlManager.IsQualifiled(tabs[index].FunType)
elseif tabs[index].ShopData and tabs[index].ShopData[1][1] == -9999 then
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct)
-- LogGreen(GlobalActConfig[id].ShowArt.." "..tabs[index].ActId)
if id and id > 0 and ActivityGiftManager.IsQualifiled(ActivityTypeDef.DynamicAct) and GlobalActConfig[id].ShowArt == tabs[index].ActId then
isshow = true
else
isshow = false
end
else
isshow = true
end
@ -285,7 +297,7 @@ function this.OnPageTabChange(index)
subViewList[index].sub = SubUIManager.Open(subViewList[index].config,this.content.transform,tabs[index],index,this)
--每日每周任务页签拆分用
if tabs[index].ShopData and tabs[index].ShopData[1][1] == -9999 then
CommonActPageManager.DynamicActType = tabs[index].ActId
CommonActPageManager.DynamicActType = tabs[index].Sort
end
subViewList[index].sub:OnShow(orginLayer)
end

View File

@ -455,6 +455,11 @@ function this.GetActivityTableDataByPageInde(pageIndex)
functionDic[configs[i].FunType] = configs[i]
table.insert(activityGroupsData,configs[i])
end
elseif configs[i].ShopData and configs[i].ShopData[1][1] == -9999 then
if not activityDic[configs[i].ShopData[1][1]] then
activityDic[configs[i].ShopData[1][1]] = configs[i]
table.insert(activityGroupsData,configs[i])
end
elseif configs[i].ActiveType == 0 and configs[i].FunType == 0 then
table.insert(activityGroupsData,configs[i])
end

View File

@ -86,9 +86,9 @@ function CommonActPage:OnShow(_sortingOrder)
if id and id > 0 then
self.actId = id
local actConfig
local actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",GlobalActConfig[id].ShowArt,"PageType",self.actConfig.PageType,"ActiveType",self.actType)
local actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",GlobalActConfig[id].ShowArt,"PageType",self.actConfig.PageType,"ActiveType",self.actConfig.ActiveType)
if not actConfig then
actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",id,"PageType",self.actConfig.PageType,"ActiveType",self.actType)
actConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",id,"PageType",self.actConfig.PageType,"ActiveType",self.actConfig.ActiveType)
end
if actConfig then
self.actConfig = actConfig

View File

@ -125,25 +125,7 @@ local TypeUpdateFunc = {
local curData = dataList[ActivityTypeDef.DynamicAct]
this.InitTaskData(curData,TaskTypeDef.DynamicActTask,ConfigName.ThemeActivityTaskConfig)
end,
[ActivityTypeDef.ChaoFanRuSheng] = function ()--主题活动任务
-- singleTypeData = {}
-- Log("InitData activityId:"..tostring(data.activityId).." value:"..tostring(data.value).." startTime:"..tostring(data.startTime).." endTime:"..tostring(data.endTime).." mission:"..tostring(#data.mission))
-- singleTypeData.activityId = data.activityId
-- singleTypeData.value = data.value
-- singleTypeData.startTime = data.startTime
-- singleTypeData.endTime = data.endTime
-- singleTypeData.rewards = {}
-- if data.mission and #data.mission > 0 then
-- for i = 1, #data.mission do
-- local reward = {}
-- reward.missionId = data.mission[i].missionId or 0
-- reward.progress = data.mission[i].progress or 0
-- reward.state = data.mission[i].state or 0
-- reward.otherData = {}
-- table.insert(singleTypeData.rewards,reward)
-- end
-- end
-- end
[ActivityTypeDef.ChaoFanRuSheng] = function ()--超凡入圣
local curData = dataList[ActivityTypeDef.ChaoFanRuSheng]
this.InitMissionDdataUpStar(curData)
end,
@ -268,6 +250,7 @@ function this.InitTaskData(curData,taskType,configName)
}
data.type = allListData[i].Type
data.jump = allListData[i].Jump[1]
LogGreen("missionId:"..tostring(data.missionId).." taskType:"..tostring(data.taskType).." itemName:"..tostring(data.itemName))
table.insert(curData.rewards,data)
end
end