金猪bug

This commit is contained in:
chenxi 2023-06-05 15:07:54 +08:00
parent 6fa649d8f5
commit aa1fe04d66
2 changed files with 13 additions and 1 deletions

View File

@ -136,7 +136,7 @@ end
function PayManager:requestRewards(purchaseToken, orderId, originOrderId, giftType, id, rechargeId)
self:sendMsgToServer(purchaseToken, orderId, function(binder, msgData)
if msgData.status == 0 then
if msgData.rewards and table.nums(msgData.rewards) > 0 then -- 奖励改到邮件领取
if msgData.rewards and table.nums(msgData.rewards) > 0 then
GFunc.showRewardBox(msgData.rewards)
end
BIReport:postPayGet(giftType, id, rechargeId, orderId, originOrderId, 1, msgData.rewards or {})

View File

@ -14,10 +14,13 @@ end
function GoldPigUI:onLoadRootComplete()
local uiMap = self.root:genAllChildren()
self.uiMap = uiMap
uiMap["gold_pig_ui.bg.close_btn"]:addClickListener(function()
self:closeUI()
end)
self:initSpine()
uiMap["gold_pig_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_TITLE))
uiMap["gold_pig_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_DESC))
@ -70,4 +73,13 @@ function GoldPigUI:onLoadRootComplete()
end)
end
function GoldPigUI:initSpine()
self.titleSpine = self.uiMap["gold_pig_ui.bg.ui_spine_obj"]
local trackEntry = self.titleSpine:playAnim("open", false)
local time = self.titleSpine:getAnimation(trackEntry).Duration
self:performWithDelayGlobal(function()
self.titleSpine:playAnim("idle", true)
end, time)
end
return GoldPigUI