local UIOfficialPrivilegeCommon = require "View/OfficialPrivilege/UIOfficialPrivilegeCommon" local UIOfficialPrivilegePunishment = UIViewClass(UIOfficialPrivilegeCommon) ----------- function UIOfficialPrivilegePunishment:OnOpened(context) self.context = context self:InitToggles(UIOfficialPrivilegeCommon.tab_Type.Blacklist, UIOfficialPrivilegeCommon.tab_Type.Stranger) --文字说明 local townBuffShowData = DataSheetManager.CapitalBuffData:GetDataByRelateID(context.BuffID) local buffData = DataSheetManager.BuffData:GetDataByBuffID(townBuffShowData.BuffID) local buffDesc = UTL.String.FormatCombineTextByID(buffData.BuffDescribe) local buffTime = UTL.Time.GetShowTimeBySeconds(townBuffShowData.BuffDuration / 1000) -- BuffDuration 为毫秒,需要转换成秒 self.UIOfficialPrivilegePopUpLeft.txt_OfficialPrivilegeInfo.text = string.FormatByIdsKey(context.FunctionDes, buffDesc, buffTime, CTL.OfficialPosition.GetOfficialPositionName(context.Scope[1])) end ----------- return UIOfficialPrivilegePunishment