--[[ 允许打开通知领奖界面 ]] local UISettingNoticeOpenPanel = UIViewClass() function UISettingNoticeOpenPanel:OnCreated() self.itemId1 = nil self.itemId2 = nil end function UISettingNoticeOpenPanel:OnOpened(context) local rewardId = DataSheetManager.ConstData:GetDataByID("AppPushReward").IntValue local appPushRewardCfg = DataSheetManager.AppPushReward:GetDataByID(rewardId) if appPushRewardCfg and appPushRewardCfg.Item_Table[1] then self.itemId1 = appPushRewardCfg.Item_Table[1].ItemID UIUtils.SetActive(self.item1.gameObject, true) UTL.Item.SetItemCell(self.item1, appPushRewardCfg.Item_Table[1].ItemID, appPushRewardCfg.Item_Table[1].ItemNum) else UIUtils.SetActive(self.item1.gameObject, false) end if appPushRewardCfg and appPushRewardCfg.Item_Table[2] then self.itemId2 = appPushRewardCfg.Item_Table[2].ItemID UIUtils.SetActive(self.item2.gameObject, true) UTL.Item.SetItemCell(self.item2, appPushRewardCfg.Item_Table[2].ItemID, appPushRewardCfg.Item_Table[2].ItemNum) else UIUtils.SetActive(self.item2.gameObject, false) end end function UISettingNoticeOpenPanel:OnButtonClicked(comp) if comp == self.btn_Yes then CTL.Notification.GoToSysSetting() UIManager.CloseView(Const_UI_Lua.UIEnum.UICommonRemind) elseif comp == self.item1.event_Click then if self.itemId1 then UTL.ItemTips.ShowCommonTipsById(self.itemId1) end elseif comp == self.item2.event_Click then if self.itemId2 then UTL.ItemTips.ShowCommonTipsById(self.itemId2) end elseif comp == self.btn_No then UIManager.CloseView(Const_UI_Lua.UIEnum.UICommonRemind) end end return UISettingNoticeOpenPanel