【旗开得胜】社稷赏商店购买限购商品到达上限后,页面不限时已售空,需要切换页签。
parent
edd52b5eaa
commit
33909a2f91
|
@ -228,6 +228,7 @@ GameEvent = {
|
||||||
},
|
},
|
||||||
Shop = {
|
Shop = {
|
||||||
OnShopInfoChange = "Shop.OnShopInfoChange",
|
OnShopInfoChange = "Shop.OnShopInfoChange",
|
||||||
|
RefreshItem = "Shop.RefreshItem",
|
||||||
},
|
},
|
||||||
Vip = {
|
Vip = {
|
||||||
OnVipTaskStatusChanged = "Vip.OnVipTaskStatusChanged",
|
OnVipTaskStatusChanged = "Vip.OnVipTaskStatusChanged",
|
||||||
|
|
|
@ -53,6 +53,7 @@ function ShopBuyPopup:BindEvent()
|
||||||
end
|
end
|
||||||
|
|
||||||
ShopManager.RequestBuyShopItem(this.shopType, this.shopItemId, count, function()
|
ShopManager.RequestBuyShopItem(this.shopType, this.shopItemId, count, function()
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.Shop.RefreshItem)
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -113,6 +113,22 @@ function ShopViewNew:BindEvent()
|
||||||
end)
|
end)
|
||||||
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)
|
function ShopViewNew:OnOpen(_activityConfig,_index,parent)
|
||||||
self.actConfig = _activityConfig
|
self.actConfig = _activityConfig
|
||||||
|
|
Loading…
Reference in New Issue