local UIAnniversaryPrepareReward = UIViewClass() function UIAnniversaryPrepareReward:OnOpened(context) self.activityId = context.activityId self.activityType = MDL.OperationActivity.ActivityType.AnniversaryPrepare UIUtils.SetLabelText(self.UICommonPopUp.txt_Title, Const_IDS.IDS_AnniversaryPrepare_Hint_9) local basicData = MDL.OperationActivity.AnniversaryPrepareFireReward:GetDataByActivityID(self.activityId) self.fixedReward = basicData.FixedReward_Table[1] UTL.Item.SetItemCell(self.Item, self.fixedReward.FixedRewardID, self.fixedReward.FixedRewardNum) self.loop_Item:ReloadAll(basicData.Reward_Table) local basicData = MDL.OperationActivity.ActivityBaseData[self.activityType]:GetDataByActivityID(self.activityId) UIUtils.SetLabel(self.txt_Desc, string.FormatByIdsKey("IDS_AnniversaryPrepare_Hint_5", basicData.SaluteRewardItemNum)) end function UIAnniversaryPrepareReward:OnButtonClicked(comp) if comp == self.UICommonPopUp.btn_Close then self:CloseView() elseif comp == self.Item.event_Click then UTL.ItemTips.ShowCommonTipsById(self.fixedReward.FixedRewardID) end end function UIAnniversaryPrepareReward:OnCellInit(scrollRect, index, cellTable, data) UTL.Item.SetItemCell(cellTable.item, data.RewardID, data.RewardNum) end function UIAnniversaryPrepareReward:OnCellClicked(scrollRect, index, cellTable, target, data) UTL.ItemTips.ShowCommonTipsById(data.RewardID) end return UIAnniversaryPrepareReward