【连购礼包】每日特惠修改
parent
011c8d7f5d
commit
7a43c51a48
|
@ -323,29 +323,39 @@ local TypeUpdateFunc = {
|
|||
for i = 1, #curData.rewards do
|
||||
for j = 1, #configData do
|
||||
if curData.rewards[i].missionId == configData[j].Id then
|
||||
local tempData = {}
|
||||
tempData.missionId = configData[j].Id
|
||||
tempData.state = curData.rewards[i].state
|
||||
tempData.otherData = {}
|
||||
tempData.otherData.GoodId = configData[j].GoodId
|
||||
tempData.otherData.canBuyDay = configData[j].BuyDay - curData.value
|
||||
tempData.otherData.GoodType = configData[j].GoodType
|
||||
tempData.otherData.Type = configData[j].Type
|
||||
if configData[j].GoodType == 1 then
|
||||
tempData.otherData.Name = rechargeConfig[configData[j].GoodId].Name
|
||||
tempData.otherData.Reward = rechargeConfig[configData[j].GoodId].RewardShow
|
||||
tempData.otherData.Price = rechargeConfig[configData[j].GoodId].Price
|
||||
tempData.progress = OperatingManager.GetLeftBuyTime(5,configData[j].GoodId)
|
||||
elseif configData[j].GoodType == 2 then
|
||||
tempData.otherData.Name = goodsConfig[configData[j].GoodId].GoodsName
|
||||
tempData.otherData.Reward = goodsConfig[configData[j].GoodId].Goods
|
||||
tempData.otherData.Price = goodsConfig[configData[j].GoodId].Price
|
||||
tempData.progress = goodsConfig[configData[j].GoodId].Limit - curData.rewards[i].progress
|
||||
local func = function()
|
||||
local tempData = {}
|
||||
tempData.missionId = configData[j].Id
|
||||
tempData.state = curData.rewards[i].state
|
||||
tempData.otherData = {}
|
||||
tempData.otherData.GoodId = configData[j].GoodId
|
||||
tempData.otherData.canBuyDay = configData[j].BuyDay - curData.value
|
||||
tempData.otherData.GoodType = configData[j].GoodType
|
||||
tempData.otherData.Type = configData[j].Type
|
||||
if configData[j].GoodType == 1 then
|
||||
tempData.otherData.Name = rechargeConfig[configData[j].GoodId].Name
|
||||
tempData.otherData.Reward = rechargeConfig[configData[j].GoodId].RewardShow
|
||||
tempData.otherData.Price = rechargeConfig[configData[j].GoodId].Price
|
||||
tempData.progress = OperatingManager.GetLeftBuyTime(5,configData[j].GoodId)
|
||||
elseif configData[j].GoodType == 2 then
|
||||
tempData.otherData.Name = goodsConfig[configData[j].GoodId].GoodsName
|
||||
tempData.otherData.Reward = goodsConfig[configData[j].GoodId].Goods
|
||||
tempData.otherData.Price = goodsConfig[configData[j].GoodId].Price
|
||||
tempData.progress = goodsConfig[configData[j].GoodId].Limit - curData.rewards[i].progress
|
||||
end
|
||||
if not tempDataList[configData[j].Type] then
|
||||
tempDataList[configData[j].Type] = {}
|
||||
end
|
||||
table.insert(tempDataList[configData[j].Type],tempData)
|
||||
end
|
||||
if not tempDataList[configData[j].Type] then
|
||||
tempDataList[configData[j].Type] = {}
|
||||
--每日特惠类型为2每日只显示一个,前端手动关闭
|
||||
-- LogGreen("Type:"..tostring(configData[j].Type).." UnlockDay:"..tostring(configData[j].UnlockDay).." value:"..tostring(curData.value))
|
||||
if configData[j].Type == 2 and configData[j].UnlockDay == curData.value then
|
||||
func()
|
||||
elseif configData[j].Type ~= 2 then
|
||||
func()
|
||||
end
|
||||
table.insert(tempDataList[configData[j].Type],tempData)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue