Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
ZhangBiao 2021-10-28 17:30:56 +08:00
commit 4d1496580a
2 changed files with 43 additions and 16 deletions

View File

@ -142,6 +142,7 @@ function LikeAbilityPanel:OnShow()
self.btnXiaoYaoLock.gameObject:SetActive(false) self.btnXiaoYaoLock.gameObject:SetActive(false)
end end
self.btnXiaoYaoText.text=string.format("%d/%d",BagManager.GetItemCountById(UpViewRechargeType.YunYouVle),PrivilegeManager.GetPrivilegeNumber(39)) self.btnXiaoYaoText.text=string.format("%d/%d",BagManager.GetItemCountById(UpViewRechargeType.YunYouVle),PrivilegeManager.GetPrivilegeNumber(39))
CheckRedPointStatus(RedPointType.XiaoYaoYouRedPoint)
end end
function LikeAbilityPanel:UpdateTopLayoutPanel() function LikeAbilityPanel:UpdateTopLayoutPanel()

View File

@ -75,15 +75,8 @@ function this:InitComponent()
self.RechargeScrollView.elastic = false self.RechargeScrollView.elastic = false
end end
end end
--绑定事件(用于子类重写)
function this:BindEvent() local RefreshShop = function(isPopUp,currentTime,isAutoRecover,shopType)
local localSelf = self
Util.AddOnceClick(self.refreshBtn, function()
isPlayShow = true
local isPopUp = RedPointManager.PlayerPrefsGetStr(PlayerManager.uid .. localSelf.ShopType)
local currentTime = os.date("%Y%m%d", PlayerManager.serverTime)
local shopType = localSelf.ShopType
local isAutoRecover = ShopManager.IsAutoRecoverCount(shopType)
if (isPopUp ~= currentTime) and not isAutoRecover then if (isPopUp ~= currentTime) and not isAutoRecover then
local shopInfo = ShopManager.GetShopInfoByType(shopType) local shopInfo = ShopManager.GetShopInfoByType(shopType)
local costId, abcd = shopInfo.RefreshItem[1][1], shopInfo.RefreshItem[2] local costId, abcd = shopInfo.RefreshItem[1][1], shopInfo.RefreshItem[2]
@ -96,13 +89,46 @@ function this:BindEvent()
end, function(isShow) end, function(isShow)
if (isShow) then if (isShow) then
local currentTime = os.date("%Y%m%d", PlayerManager.serverTime) local currentTime = os.date("%Y%m%d", PlayerManager.serverTime)
RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. localSelf.ShopType, currentTime) RedPointManager.PlayerPrefsSetStr(PlayerManager.uid .. shopType, currentTime)
end end
ShopManager.RequestRefreshShop(shopType, false) ShopManager.RequestRefreshShop(shopType, false)
end, Language[10731], Language[10732],nil,true) end, Language[10731], Language[10732],nil,true)
else else
ShopManager.RequestRefreshShop(localSelf.ShopType, false) ShopManager.RequestRefreshShop(shopType, false)
end end
end
--绑定事件(用于子类重写)
function this:BindEvent()
local localSelf = self
Util.AddOnceClick(self.refreshBtn, function()
isPlayShow = true
local isPopUp = RedPointManager.PlayerPrefsGetStr(PlayerManager.uid .. localSelf.ShopType)
local currentTime = os.date("%Y%m%d", PlayerManager.serverTime)
local shopType = localSelf.ShopType
local isAutoRecover = ShopManager.IsAutoRecoverCount(shopType)
if shopType == SHOP_TYPE.SOUL_PRINT_SHOP then
local itemlist = ShopManager.CheckShopItemList(self.ShopData.storeItem)
local isShow = false
for k,v in pairs(itemlist) do
local goods = ShopManager.GetShopItemGoodsInfo(v.id)
local con = ConfigManager.GetConfigData(ConfigName.ItemConfig,goods[1][1])
if con.Quantity >= 6 then
isShow = true
end
end
if isShow then
MsgPanel.ShowTwo("当前商店存在红色魂印,刷新后将会消失,是否确认刷新?", function()
end, function()
RefreshShop(isPopUp,currentTime,isAutoRecover,shopType)
end, Language[10731], Language[10732],nil,false)
else
RefreshShop(isPopUp,currentTime,isAutoRecover,shopType)
end
else
RefreshShop(isPopUp,currentTime,isAutoRecover,shopType)
end
-- 重置商店刷新按钮点击状态 -- 重置商店刷新按钮点击状态
ShopManager.SetShopRefreshBtnClickStatus(localSelf.ShopType, true) ShopManager.SetShopRefreshBtnClickStatus(localSelf.ShopType, true)