【商店】前端从表里判断商品的显示状态添加
parent
e7b132952c
commit
5a861ade95
|
@ -370,7 +370,7 @@ end
|
|||
-- 刷新商店物品列表排序
|
||||
function this.SortItemList(shopType)
|
||||
-- 试炼副本商店不按sort字段排序
|
||||
-- if shopType == SHOP_TYPE.TRIAL_SHOP then return end--森罗商店上来就被🈲了,但是现在对森罗商店有了处理
|
||||
-- if shopType == SHOP_TYPE.TRIAL_SHOP then return end--森罗商店上来就被禁了,但是现在对森罗商店有了处理
|
||||
-- 排序
|
||||
local shopData = nil
|
||||
for _, v in ipairs(this.allShopData) do
|
||||
|
@ -1152,4 +1152,19 @@ function this.CheckNoviceGiftData()
|
|||
end
|
||||
|
||||
|
||||
-- 检测商店物品
|
||||
function this.CheckShopItemList(list)
|
||||
local itemList = {}
|
||||
for _, item in ipairs(list) do
|
||||
local info = this.GetShopItemInfo(item.id)
|
||||
if info.OpenLv and
|
||||
info.OpenLv[1] and info.OpenLv[1] <= PlayerManager.level then
|
||||
-- info.OpenLv[2] and info.OpenLv[2] >= PlayerManager.level then
|
||||
table.insert(itemList, item)
|
||||
end
|
||||
end
|
||||
return itemList
|
||||
end
|
||||
|
||||
|
||||
return this
|
|
@ -402,7 +402,7 @@ function this:RefreshItemList(isTop)
|
|||
-- 重置列表
|
||||
self.RechargeScrollView.gameObject:SetActive(false)
|
||||
self.ScrollView.gameObject:SetActive(true)
|
||||
local itemlist = self.ShopData.storeItem
|
||||
local itemlist = ShopManager.CheckShopItemList(self.ShopData.storeItem)
|
||||
self.ScrollView:SetData(itemlist, function(index, shopItem)
|
||||
local itemData = itemlist[index]
|
||||
self:ShopItemAdapter(shopItem, itemData)
|
||||
|
|
Loading…
Reference in New Issue