diff --git a/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftView.lua b/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftView.lua index 79fe5f5706..5de0d1553d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftView.lua @@ -27,12 +27,12 @@ end --添加事件监听(用于子类重写) function GiftView:AddListener() - Game.GlobalEvent:AddEvent(GameEvent.GrowGift.RechargeGift, GiftView.refresh) + -- Game.GlobalEvent:AddEvent(GameEvent.GrowGift.RechargeGift, GiftView.refresh) end --移除事件监听(用于子类重写) function GiftView:RemoveListener() - Game.GlobalEvent:RemoveEvent(GameEvent.GrowGift.RechargeGift, GiftView.refresh) + -- Game.GlobalEvent:RemoveEvent(GameEvent.GrowGift.RechargeGift, GiftView.refresh) end @@ -110,10 +110,10 @@ function GiftView:OnSortingOrderChange(cursortingOrder) end end -GiftView.refresh = function() - LogYellow("收到了GameEvent.GrowGift.RechargeGift") - GiftView:RefreshData(curBuyType) -end +-- GiftView.refresh = function() +-- LogYellow("收到了GameEvent.GrowGift.RechargeGift") +-- GiftView:RefreshData(curBuyType) +-- end ------日周月礼包------ -- 根据选择的页签刷新数据 @@ -187,13 +187,12 @@ function GiftView:RefreshGiftData() else return a.sortId > b.sortId end - end) local callBack = function(index, item) self:RefreshShowData(item, shopData[index].data, self.buyType, shopData[index].DataType) end self.scrollView2:SetData(shopData, callBack) - GiftView:TimeCountDown() + self:TimeCountDown() self.scrollView2.gameObject:SetActive(true) elseif self.buyType == SHOP_TYPE.VIP_GIFT then--成长礼包界面 @@ -769,22 +768,20 @@ function GiftView:TimeCountDown() if RECHARGEABLE then--(是否开启充值) self.localTimerV2 = Timer.New(function() if timerList[1] then - local t1=timerList[1].freshTime - if t1 < 0 then - -- body刷新 - self:RefreshGiftData() + local t1=timerList[1].freshTime-GetTimeStamp() + t1=t1-1 + if t1 <= 0 then + self:RefreshData(curBuyType) end - timerList[1].pre.text=Language[10561]..self:SpecialTime(t1-GetTimeStamp())--self:SpecialTime + timerList[1].pre.text=Language[10561]..self:SpecialTime(t1)--self:SpecialTime end if timerList[2] then - - local t2 = timerList[2].freshTime + local t2 = timerList[2].freshTime-GetTimeStamp() t2=t2-1 - if t2 < 0 then - -- body刷新 - self:RefreshGiftData() + if t2 <= 0 then + self:RefreshData(curBuyType) end - timerList[2].pre.text=Language[10561]..self:SpecialTime(t2-GetTimeStamp()) + timerList[2].pre.text=Language[10561]..self:SpecialTime(t2) end end,1,-1,true) self.localTimerV2:Start()