【超值基金】月卡判断去掉修改2--- 张强

DESKTOP-98AVA47\Administrator 2021-10-31 01:06:49 +07:00
parent da44c05e9f
commit 3bde92fa6e
1 changed files with 12 additions and 11 deletions

View File

@ -77,17 +77,17 @@ function UpperMonthCard:BindEvent()
end)
Util.AddOnceClick(self.btnBuy, function()
local isActive = VipManager.GetMonthCardOpenState()
if not isActive then
MsgPanel.ShowTwo(Language[11387], function()
end, function(isShow)
JumpManager.GoJump(36004)
end, Language[10731], Language[10019],nil, false)
else
-- local isActive = VipManager.GetMonthCardOpenState()
-- if not isActive then
-- MsgPanel.ShowTwo(Language[11387], function()
-- end, function(isShow)
-- JumpManager.GoJump(36004)
-- end, Language[10731], Language[10019],nil, false)
-- else
PayManager.Pay(self.baseType, function(id)
self:RechargeSuccessFunc(id)
end)
end
-- end
end)
end
@ -169,14 +169,15 @@ end
--- 根据是否购买了显示信息
function UpperMonthCard:SetBuyState()
local isActive = VipManager.GetMonthCardOpenState()
-- local isActive = VipManager.GetMonthCardOpenState()
-- local isBought = OperatingManager.IsBaseBuy(self.chargerBaseType)
local canBuyNum = OperatingManager.GetLeftBuyTime(self.chargerBaseType, self.baseType)
local isBought = canBuyNum and canBuyNum <= 0
self.boughtPanel:SetActive(isBought)
self.buyPanel:SetActive(not isBought)
Util.SetGray(self.btnBuy, not isActive)
self.textBuy.text = isActive and (string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(chargeConfig[self.baseType].Price))) or (string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(chargeConfig[self.baseType].Price)))-- .. MoneyUtil.GetMoneyUnitName())
-- Util.SetGray(self.btnBuy, not isActive)
--isActive and
self.textBuy.text = (string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(chargeConfig[self.baseType].Price))) or (string.format(MoneyUtil.GetMoneyUnitName(),MoneyUtil.GetMoney(chargeConfig[self.baseType].Price)))-- .. MoneyUtil.GetMoneyUnitName())
self.actLeftTime.gameObject:SetActive(false)
if not isBought then