累计充值修改

jiaoyangna 2020-11-04 03:51:04 +08:00
parent 8db39458ca
commit 43702ee6ca
3 changed files with 33 additions and 13 deletions

View File

@ -59,15 +59,19 @@ local tabs = {
default = "z_zhenqibaoge_anniu_02", lock = "z_zhenqibaoge_anniu_02", select = "z_zhenqibaoge_anniu_01",
rpType = "",panelType = PanelType.Main,ActType = ActivityTypeDef.DynamicAct_Treasure
},
[14] = { --累计充值
[14] = { --累计充值 一天一刷
default = "r_huodong_leijichengzhianniu_01", lock = "r_huodong_leijichengzhianniu_01", select = "r_huodong_leijichengzhianniu",
rpType = RedPointType.DynamicActRecharge,panelType = PanelType.Main,ActType = ActivityTypeDef.AccumulativeRechargeExper
},
[15] = { --限时商市
[15] = { --累计充值 一周一刷
default = "r_huodong_leijichengzhianniu_01", lock = "r_huodong_leijichengzhianniu_01", select = "r_huodong_leijichengzhianniu",
rpType = RedPointType.DynamicActRecharge,panelType = PanelType.Main,ActType = ActivityTypeDef.DynamicAct_recharge
},
[16] = { --限时商市
default = "x_xianshishangshi_anniu_02", lock = "x_xianshishangshi_anniu_02", select = "x_xianshishangshi_anniu_01",
rpType = "",panelType = PanelType.Main,ActType = ActivityTypeDef.DynamicAct_TimeLimitShop
},
[16] = { --限时兑换
[17] = { --限时兑换
default = "r_xianshiduihuan_anniu_01", lock = "r_xianshiduihuan_anniu_01", select = "r_xianshiduihuan_anniu",
rpType = "",panelType = PanelType.Main,ActType = ActivityTypeDef.LimitExchange
},
@ -87,8 +91,9 @@ local _PageInfo = {--后期可以做成tableInserticon名字都去读表
[12] = 3,
[13] = 4,
[14] = 5,
[15] = 6,
[16] = 7,
[15] = 5,
[16] = 6,
[17] = 7,
}
local TimeLimitedCall = require("Modules/DynamicActivity/TimeLimitedCall")
@ -211,6 +216,10 @@ function this.PageTabAdapter(tab, index, status)
else
tab.gameObject:SetActive(false)
end
elseif GlobalActConfig[id].Type == ActivityTypeDef.DynamicAct_recharge then
tab.gameObject:SetActive(true)
else
tab.gameObject:SetActive(false)
end
else
tab.gameObject:SetActive(false)
@ -232,7 +241,7 @@ function this.OnPageTabChange(index)
this.PageList[i].gameObject:SetActive(false)
end
end
this.PageList[_PageInfo[index]]:OnShow(this.sortingOrder,this)
this.PageList[_PageInfo[index]]:OnShow(this.sortingOrder,this,tabs[index].ActType)
this.PageList[_PageInfo[index]].gameObject:SetActive(true)
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = tabs[index].panelType })
end

View File

@ -5,6 +5,7 @@ local this=LeiJiChongZhiPage
local parent
local endtime = 0
local rechargeNum
local type = 0
function LeiJiChongZhiPage:ctor(mainPanel, gameObject)
self.mainPanel = mainPanel
self.gameObject = gameObject
@ -44,7 +45,8 @@ function LeiJiChongZhiPage:OnOpen()
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function LeiJiChongZhiPage:OnShow(_sortingOrder,_parent)
function LeiJiChongZhiPage:OnShow(_sortingOrder,_parent,_type)
type = _type
rechargeNum= VipManager.GetChargedNum()--已经充值的金额
sortingOrder = _sortingOrder
parent = _parent
@ -77,7 +79,7 @@ function LeiJiChongZhiPage:SetTime()
end
function LeiJiChongZhiPage:OnShowData()
allData =OperatingManager.InitLeiJiChongZhiData()
allData =OperatingManager.InitLeiJiChongZhiData(type)
if allData then
endtime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.AccumulativeRechargeExper)
this.SortData(allData)

View File

@ -812,14 +812,23 @@ function this.CheckDynamicActTaskRed()
end
return false
end
function this.InitLeiJiChongZhiData()
local id = ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.AccumulativeRechargeExper)
if (not id) or id == 0 then
return nil
function this.InitLeiJiChongZhiData(_type)
local id = 0
local type = _type
if type == ActivityTypeDef.AccumulativeRechargeExper then
id = ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.AccumulativeRechargeExper)
if (not id) or id == 0 then
return nil
end
elseif type == ActivityTypeDef.DynamicAct_recharge then
id = ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.DynamicAct_recharge)
if (not id) or id == 0 then
return nil
end
end
this.LeiJiChongZhiData = {}
local allListData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig, "ActivityId", id)
local allMissionData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.AccumulativeRechargeExper)
local allMissionData = ActivityGiftManager.GetActivityTypeInfo(type)
for i=1,#allListData do
for j=1,#allMissionData.mission do
if allListData[i].Id == allMissionData.mission[j].missionId then