local UICommonNoteView = UIViewClass() function UICommonNoteView:OnOpened(context) if context.activityId then self.activityId = context.activityId end local data = DataSheetManager.GuidanceNotes:GetDataByID(context.id) if data then self:ProcessTitle(context.id, data.GuideNotesName) if context.params then self.desc.text = string.FormatByIdsId(Const_IDS[data.GuideNotesContent], unpack(context.params)) else UIUtils.SetLabelText(self.desc, Const_IDS[data.GuideNotesContent]) end end end function UICommonNoteView:OnBackButtonPressed() self:OnButtonClicked(self.btn_Close) end function UICommonNoteView:ProcessTitle(id, guideNotesName) if id == LuaConst.NoteID.Monopoly then --九州秘宝彩金 需要单独处理标题 if CTL.Monopoly.IsSuperGold(self.context.activityId) then UIUtils.SetLabelText(self.lab_Title, Const_IDS.IDS_Monopoly_High_Title) return end elseif id == LuaConst.NoteID.HorseRear then --饲育大师彩金 需要单独处理标题 if CTL.HorseRear.IsSuperGold(self.activityId) then UIUtils.SetLabelText(self.lab_Title, Const_IDS.IDS_HorseActivity_High_Title) return end end UIUtils.SetLabelText(self.lab_Title, Const_IDS[guideNotesName]) end function UICommonNoteView:OnButtonClicked(comp) if comp == self.event_Mask then self:CloseView() elseif comp == self.btn_Close then self:CloseView() end end return UICommonNoteView