From fa4cdf0f2d547934aebcd74501fc75d83e082948 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 8 Apr 2021 20:55:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E5=9F=8E=E6=B7=BB=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=AD=89=E7=BA=A7=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Main/MainPanel.lua | 59 ++++++++++--------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index ef990a034e..2ad0866121 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -1156,34 +1156,39 @@ end function this.RefreshActivityBtn(context) LogGreen("context.type1 " .. context.type .. " " .. context.status) for k,v in ipairs(activitys) do - if v.ActiveType > 0 and v.ActiveType == context.type then - local activityId = ActivityGiftManager.IsActivityTypeOpen(v.ActiveType) - if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(v.ActiveType) then - if v.FunType and v.FunType == 41 then - activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.GetDailyRechargeExist()) - elseif v.ActiveType == 20000 then - local tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",GlobalActConfig[activityId].ShowArt,"PageType",0,"ActiveType:",v.ActiveType) - if not tempConfig then - tempConfig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.ActivityGroups,"ActId",activityId,"PageType",0) - end - if tempConfig then - activityTabs[k].img.sprite = Util.LoadSprite(tempConfig.Icon[1]) - end - activityTabs[k].go.gameObject:SetActive(context.status == 1) - end - else - activityTabs[k].go.gameObject:SetActive(false) - end - elseif v.FunType > 0 and v.FunType == context.type then - if ActTimeCtrlManager.SingleFuncState(v.FunType) then - if v.FunType and v.FunType == 41 then - activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.GetDailyRechargeExist()) + local ishow = DynamicActivityManager.IsQualifiled(v.Id) + if ishow then + if v.ActiveType > 0 and v.ActiveType == context.type then + local activityId = ActivityGiftManager.IsActivityTypeOpen(v.ActiveType) + if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(v.ActiveType) then + if v.FunType and v.FunType == 41 then + activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.GetDailyRechargeExist()) + elseif v.ActiveType == 20000 then + local tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",GlobalActConfig[activityId].ShowArt,"PageType",0,"ActiveType:",v.ActiveType) + if not tempConfig then + tempConfig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.ActivityGroups,"ActId",activityId,"PageType",0) + end + if tempConfig then + activityTabs[k].img.sprite = Util.LoadSprite(tempConfig.Icon[1]) + end + activityTabs[k].go.gameObject:SetActive(context.status == 1) + end else - activityTabs[k].go.gameObject:SetActive(context.status == 1) - end - else - activityTabs[k].go.gameObject:SetActive(false) - end + activityTabs[k].go.gameObject:SetActive(false) + end + elseif v.FunType > 0 and v.FunType == context.type then + if ActTimeCtrlManager.SingleFuncState(v.FunType) then + if v.FunType and v.FunType == 41 then + activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.GetDailyRechargeExist()) + else + activityTabs[k].go.gameObject:SetActive(context.status == 1) + end + else + activityTabs[k].go.gameObject:SetActive(false) + end + end + else + activityTabs[k].go.gameObject:SetActive(false) end end isRefeshIcon = true