【百宝斋】竞技场赛季过渡以后,去百宝斋里点击下方大页签可以正常进入逐胜商店并购买,但是切换 逐胜/公会,这种小页签 就提示赛季已结束不让进

dev_chengFeng
gaoxin 2021-03-23 11:17:55 +08:00
parent 689d19776c
commit 2d407b0dae
1 changed files with 15 additions and 1 deletions

View File

@ -219,7 +219,11 @@ function this.OnPageTabChange(index, lastIndex)
-- 默认打开第一个商店
if this.ShopTabCtrl then
this._CurShopIndex = nil
this.ShopTabCtrl:ChangeTab(this._ChooseShopIndex or 1)
if this._ChooseShopIndex then
this.ShopTabCtrl:ChangeTab(this._ChooseShopIndex or 1)
else
this.ShopTabCtrl:ChangeTab(this.GetAvailableChildShopIndex() or 1)
end
end
-- 二级页签只有一个的时候不显示
@ -230,6 +234,16 @@ function this.OnPageTabChange(index, lastIndex)
this.tabbox2Content.transform.localPosition = Vector3.New(contentWidth/2, curPos.y, curPos.z)
end
-- 获取当前大页签下可用的小页签的序号
function this.GetAvailableChildShopIndex()
for index, shopType in ipairs(this._MainShopTypeList) do
local isActive, errorTip = ShopManager.IsActive(shopType)
if isActive then
return index
end
end
end
----==========================二级页签相关===========================================
-- tab按钮自定义显示设置
function this.ShopTabAdapter(tab, index, status)