【商城界面】提交

dev_chengFeng
ZhangBiao 2021-12-21 16:51:40 +08:00
parent 51d281c1ee
commit 53f7d29337
1 changed files with 20 additions and 20 deletions

View File

@ -71,10 +71,12 @@ end
function EveryDayGiftNew:BindEvent() function EveryDayGiftNew:BindEvent()
Util.AddOnceClick(self.btn2,function () Util.AddOnceClick(self.btn2,function ()
local actData = ActivityGiftManager.GetActivityTypeInfo(89) for i = 1, #self.shopData do
if actData then if self.shopData[i].data.boughtNum > 0 then
PopupTipPanel.ShowTip("需要未购买每日礼包时才可使用!") PopupTipPanel.ShowTip("需要未购买每日礼包时才可使用!")
else return
end
end
PayManager.Pay(onKeyPackId, function(id) PayManager.Pay(onKeyPackId, function(id)
FirstRechargeManager.RefreshAccumRechargeValue(onKeyPackId) FirstRechargeManager.RefreshAccumRechargeValue(onKeyPackId)
PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0) PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0)
@ -82,7 +84,6 @@ function EveryDayGiftNew:BindEvent()
MonthCardManager.CheckMonthCardPatFace() MonthCardManager.CheckMonthCardPatFace()
self:RefreshData(nil,false,false) self:RefreshData(nil,false,false)
end) end)
end
end) end)
end end
@ -392,23 +393,22 @@ end
--刷新一键购买显示 --刷新一键购买显示
function EveryDayGiftNew:RefreshOneKeyShow() function EveryDayGiftNew:RefreshOneKeyShow()
Util.SetGray(self.btn2,false) Util.SetGray(self.btn2,false)
for i = 1, #self.shopData do
if self.shopData[i].data.boughtNum > 0 then
Util.SetGray(self.btn2,true)
self.btn2:GetComponent("Button").interactable = false
return
end
end
local actData = ActivityGiftManager.GetActivityTypeInfo(89) local actData = ActivityGiftManager.GetActivityTypeInfo(89)
if actData then if actData then
Util.SetGray(self.btn2,true) Util.SetGray(self.btn2,true)
-- self.btn2:GetComponent("Button").interactable = false self.btn2:GetComponent("Button").interactable = false
self.btn2Text.text = string.format("剩余%s天",math.ceil((actData.endTime - GetTimeStamp())/86400)) self.btn2Text.text = string.format("剩余%s天",math.ceil((actData.endTime - GetTimeStamp())/86400))
else else
Util.SetGray(self.btn2,false) Util.SetGray(self.btn2,false)
-- self.btn2:GetComponent("Button").interactable = true self.btn2:GetComponent("Button").interactable = true
self.btn2Text.text = string.format("60元七天特惠") self.btn2Text.text = string.format("60元七天特惠")
for i = 1, #self.shopData do
if self.shopData[i].data.boughtNum > 0 then
Util.SetGray(self.btn2,true)
break
end
end
end end
end end