From aa1fe04d66897aa32afa79a02e3cc804bc1d8d8a Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 5 Jun 2023 15:07:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E7=8C=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/pay_manager.lua | 2 +- lua/app/ui/activity/gold_pig/gold_pig_ui.lua | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lua/app/common/pay_manager.lua b/lua/app/common/pay_manager.lua index 43d672ea..b20d1340 100644 --- a/lua/app/common/pay_manager.lua +++ b/lua/app/common/pay_manager.lua @@ -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 {}) diff --git a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua b/lua/app/ui/activity/gold_pig/gold_pig_ui.lua index 25608f42..3ad0cbf9 100644 --- a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua +++ b/lua/app/ui/activity/gold_pig/gold_pig_ui.lua @@ -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 \ No newline at end of file