diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua index bbc071f491..40ae5aed45 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua @@ -21,6 +21,9 @@ local giftGoodsInfo this.upGradePackagePanelType = 0 this.upGradePackagePanelIndex = 0 this.IsShowFiveStarPatch = true + +-- 月卡激活提示内容,也用来标记是否需要拍脸提示 +this.showStr = "" --初始化 function this.Initialize() Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, function() @@ -28,6 +31,9 @@ function this.Initialize() end) Game.GlobalEvent:AddEvent(GameEvent.PatFace.PatFaceHaveGrowGift, this.NewHeroGift) + + + this.showStr = "" end ---------------------------局限性---------------------------- @@ -593,10 +599,10 @@ end function this.UpdateMonthCardData(msg) --LogError("月卡信息推送 "..#msg.monthinfos) --当我数据没有 后端推过来的有数据 此时需要弹窗 - local showStr = "" + this.showStr = "" for i = 1, #msg.monthinfos do if monthCardData[i].endingTime <= 0 then - showStr = Language[11384] + this.showStr = Language[11384] end end monthCardData = {} @@ -618,7 +624,7 @@ function this.UpdateMonthCardData(msg) table.insert(monthCardData,singleMonthCard) end CheckRedPointStatus(RedPointType.MonthCard) - if showStr ~= "" then + if this.showStr ~= "" then if ActTimeCtrlManager.SingleFuncState(JumpType.Welfare) then if curActiveMONTHCARD then --发送埋点数据 @@ -628,15 +634,25 @@ function this.UpdateMonthCardData(msg) --发送埋点数据 CustomEventManager.SendCustomEvents(FBSDKCustomEventType.FirstBuyHeightMonthCard,0) end - MsgPanel.ShowTwo(showStr, function() - JumpManager.GoJump(36004) - end, - function() - UIManager.ClosePanel() - end,Language[10586],Language[11385]) end end end + +-- 检测月卡激活提示是否需要拍脸 +function this.CheckMonthCardPatFace() + if this.showStr and this.showStr ~= "" then + MsgPanel.ShowTwo(this.showStr, function() + JumpManager.GoJump(36004) + end, + function() + UIManager.ClosePanel() + end,Language[10586],Language[11385]) + -- 拍过后不再提示 + this.showStr = "" + return true + end +end + function this.RefreshMonthCardChargeMoney(msg) -- LogError("月卡金额信息推送 "..msg.monthSaveAmt.." "..msg.smonthSaveAmt) monthSaveAmt = msg.monthSaveAmt--月卡累计总额 diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua index cfcf629a59..0655268b88 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua @@ -569,6 +569,9 @@ function RewardItemPopup:OnClose() end --检测是否需要弹每日任务飘窗 TaskManager.RefreshShowDailyMissionTipPanel() + + -- 检测月卡激活是否需要拍脸 + OperatingManager.CheckMonthCardPatFace() end --界面销毁时调用(用于子类重写) function RewardItemPopup:OnDestroy()