【商城界面】提交
parent
51d281c1ee
commit
53f7d29337
|
@ -71,10 +71,12 @@ end
|
|||
function EveryDayGiftNew:BindEvent()
|
||||
|
||||
Util.AddOnceClick(self.btn2,function ()
|
||||
local actData = ActivityGiftManager.GetActivityTypeInfo(89)
|
||||
if actData then
|
||||
for i = 1, #self.shopData do
|
||||
if self.shopData[i].data.boughtNum > 0 then
|
||||
PopupTipPanel.ShowTip("需要未购买每日礼包时才可使用!")
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
PayManager.Pay(onKeyPackId, function(id)
|
||||
FirstRechargeManager.RefreshAccumRechargeValue(onKeyPackId)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0)
|
||||
|
@ -82,7 +84,6 @@ function EveryDayGiftNew:BindEvent()
|
|||
MonthCardManager.CheckMonthCardPatFace()
|
||||
self:RefreshData(nil,false,false)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -392,23 +393,22 @@ end
|
|||
--刷新一键购买显示
|
||||
function EveryDayGiftNew:RefreshOneKeyShow()
|
||||
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)
|
||||
if actData then
|
||||
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))
|
||||
else
|
||||
Util.SetGray(self.btn2,false)
|
||||
-- self.btn2:GetComponent("Button").interactable = true
|
||||
self.btn2:GetComponent("Button").interactable = true
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue