【活动优化】百宝商会增加一键购买,礼包金额及奖励变更

dev_chengFeng
jiaoyangna 2021-05-12 15:25:54 +08:00
parent 90b59093f0
commit 1e83996522
1 changed files with 3 additions and 2 deletions

View File

@ -30,6 +30,7 @@ function TreasureStorePopup:BindEvent()
self:ClosePanel() self:ClosePanel()
end) end)
Util.AddClick(this.oneKeyBtn,function() Util.AddClick(this.oneKeyBtn,function()
LogGreen("rechargeId:"..rechargeId)
PayManager.Pay(rechargeId, function(id) PayManager.Pay(rechargeId, function(id)
this.RechargeSuccessFunc(id) this.RechargeSuccessFunc(id)
end) end)
@ -70,12 +71,12 @@ end
function TreasureStorePopup:RefreshOneKeyBuy(allData) function TreasureStorePopup:RefreshOneKeyBuy(allData)
this.oneKeyBtnButton.enabled = true this.oneKeyBtnButton.enabled = true
Util.SetGray(this.oneKeyBtnButton,false) Util.SetGray(this.oneKeyBtn,false)
for i = 1, #allData do for i = 1, #allData do
local boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, allData[i].Id) or 0 local boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, allData[i].Id) or 0
if allData[i].Limit - boughtNum < 1 then if allData[i].Limit - boughtNum < 1 then
this.oneKeyBtnButton.enabled = false this.oneKeyBtnButton.enabled = false
Util.SetGray(this.oneKeyBtnButton,true) Util.SetGray(this.oneKeyBtn,true)
return return
end end
end end