【旗开得胜】社稷赏商店购买限购商品到达上限后,页面不限时已售空,需要切换页签。
parent
edd52b5eaa
commit
33909a2f91
|
@ -228,6 +228,7 @@ GameEvent = {
|
|||
},
|
||||
Shop = {
|
||||
OnShopInfoChange = "Shop.OnShopInfoChange",
|
||||
RefreshItem = "Shop.RefreshItem",
|
||||
},
|
||||
Vip = {
|
||||
OnVipTaskStatusChanged = "Vip.OnVipTaskStatusChanged",
|
||||
|
|
|
@ -53,6 +53,7 @@ function ShopBuyPopup:BindEvent()
|
|||
end
|
||||
|
||||
ShopManager.RequestBuyShopItem(this.shopType, this.shopItemId, count, function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Shop.RefreshItem)
|
||||
self:ClosePanel()
|
||||
end)
|
||||
end)
|
||||
|
|
|
@ -113,6 +113,22 @@ function ShopViewNew:BindEvent()
|
|||
end)
|
||||
end
|
||||
|
||||
local RefreshData = function(self)
|
||||
self:RefreshItemList(false)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function ShopViewNew:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Shop.RefreshItem,RefreshData,self)
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function ShopViewNew:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Shop.RefreshItem,RefreshData,self)
|
||||
end
|
||||
|
||||
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function ShopViewNew:OnOpen(_activityConfig,_index,parent)
|
||||
self.actConfig = _activityConfig
|
||||
|
|
Loading…
Reference in New Issue