礼包添加开启规则
parent
f74f28d9c7
commit
18c063340c
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
local _ShopTypeConfig = ConfigManager.GetConfig(ConfigName.StoreTypeConfig)
|
||||
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local rechargeOrder=ConfigManager.GetConfig(ConfigName.RechargeCommodityorder)
|
||||
-- 通用得商店逻辑
|
||||
local ShopView = {}
|
||||
local this = ShopView
|
||||
|
|
@ -431,8 +432,22 @@ function this:RefreshItemList(isRefresh,isTop,isAni)
|
|||
self.ScrollView.gameObject:SetActive(false)
|
||||
self.RechargeScrollView.gameObject:SetActive(true)
|
||||
local itemlist = self.RechargeShopData
|
||||
local showList={}
|
||||
LogError("#itemlist================================"..#itemlist)
|
||||
self.RechargeScrollView:SetData(itemlist, function(index, shopItem)
|
||||
for i=1,#itemlist do
|
||||
local isCan=true
|
||||
for k, v in ConfigPairs(rechargeOrder) do
|
||||
if v.BehindCommodity==itemlist[i].goodsId then
|
||||
if VipManager.GetChargedNum()<v.RechargeAmount then
|
||||
isCan=false
|
||||
end
|
||||
end
|
||||
end
|
||||
if isCan then
|
||||
table.insert(showList,itemlist[i])
|
||||
end
|
||||
end
|
||||
self.RechargeScrollView:SetData(showList, function(index, shopItem)
|
||||
local itemData = itemlist[index]
|
||||
self:RechargeShopItemAdapter(shopItem, itemData)
|
||||
-- if isPlayShow then
|
||||
|
|
@ -662,7 +677,6 @@ function this:RechargeShopItemAdapter(shopItem, itemData)
|
|||
local price = Util.GetGameObject(shopItem, "price/Text"):GetComponent("Text")
|
||||
|
||||
|
||||
-- 计算数据
|
||||
|
||||
local itemInfo = ShopManager.GetRechargeItemInfo(itemData.goodsId)
|
||||
local baseId=itemInfo.BaseReward[1][1]
|
||||
|
|
|
|||
Loading…
Reference in New Issue