local UIPushInterfaceTeamFairChampionship = UIViewClass() function UIPushInterfaceTeamFairChampionship:OnOpened(context) self:RegistSystemEvent(EventID.UI_HeroMatch1v1_CloseView, self.OnBackButtonPressed) -- 赛程结束关闭界面 UIUtils.SetLabel(self.lab_PackageName1, string.FormatByIdsId(Const_IDS.IDS_HeroMatch1v1_Time1, UTL.Time.OsDateOriginal("%Y", UTL.Time.GetServerTimestamp()), MDL.TeamFairChampionship.GetCurSeasonID())) local startDay, endDay, timetable = CTL.TeamFairChampionship.GetTotalBattleTime() local desc, refreshTime = UTL.Time.GetDateDescAndTime({timetable}) UIUtils.SetLabel(self.lab_PackageName2, string.FormatByIdsId(Const_IDS.IDS_HeroMatch1v1_Time2, startDay, endDay, refreshTime)) --报名阶段结束时间 local startDate, endDate = CTL.SpecialTeam.GetTeamCreateTime() UIUtils.SetLabel(self.txt_Info, string.FormatByIdsKey("IDS_TeamFairTournamen_ShortlistTip", endDate, CTL.SpecialTeam.GetEnterMatchTeamCount())) end function UIPushInterfaceTeamFairChampionship:OnBackButtonPressed() self:OnButtonClicked(self.btn_Close) end function UIPushInterfaceTeamFairChampionship:OnButtonClicked(comp) if comp == self.btn_Close then CTL.PushInterface.HidePushInterface(self.__viewClassPath) self:CloseView() elseif comp == self.btn_TopicQuiz then -- 话题竞猜 UIManager.OpenView(Const_UI_Lua.UIEnum.UITeamFairChampionshipGuessing, nil, "HeroMatch1v1/UIHeroMatch1v1Guessing") elseif comp == self.btn_course then -- 赛制介绍 UIManager.OpenView(Const_UI_Lua.UIEnum.UITeamFairChampionshipCourse) elseif comp == self.btn_Reward then -- 奖励预览 UIManager.OpenView(Const_UI_Lua.UIEnum.UITeamFairChampionshipReward) elseif comp == self.btn_Team then -- 战团 CTL.SpecialTeam.OpenMain() elseif comp == self.btn_Go then CTL.SpecialTeam.OpenMain(1) elseif comp == self.btn_Introduction then CTL.TeamFairChampionship.OpenMatchNote() end end return UIPushInterfaceTeamFairChampionship