| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 | 
							- using FairyGUI;
 
- using UI.ActivityMain;
 
- using UI.CommonGame;
 
- using System.Collections;
 
- using System.Collections.Generic;
 
- using ET;
 
- namespace GFGGame
 
- {
 
-     public class MonthlyCardTipsView : BaseWindow
 
-     {
 
-         private UI_MonthlyCardTipsUI _ui;
 
-         private int rewards = 3;
 
-         private List<int> itemID = new List<int>() { 1000005, 1000004, 5005011 };
 
-         private List<string> rarity = new List<string>() {"", "wpk_db_fp", "wpk_db_zx", "wpk_db_dc", "wpk_db_ty" };
 
-         private List<string> rewardNum = new List<string>() { "x1800", "x300", "专属头像框" };
 
-         public override void Dispose()
 
-         {
 
-             if (_ui != null)
 
-             {
 
-                 _ui.Dispose();
 
-                 _ui = null;
 
-             }
 
-             base.Dispose();
 
-         }
 
-         protected override void OnInit()
 
-         {
 
-             base.OnInit();
 
-             packageName = UI_MonthlyCardTipsUI.PACKAGE_NAME;
 
-             _ui = UI_MonthlyCardTipsUI.Create();
 
-             this.viewCom = _ui.target;
 
-             isfullScreen = true;
 
-             modal = true;
 
-             _ui.m_rewardList.itemRenderer = ListItemRender;
 
-             _ui.m_btnBuyTxt.onClick.Add(OnBtnAdJump);
 
-             _ui.m_backBtn.onClick.Add(Hide);
 
-             _ui.m_notTips.onClick.Add(OnClickTips);
 
-             _ui.m_bg.onClick.Add(Hide);
 
-         }
 
-         protected override void OnShown()
 
-         {
 
-             base.OnShown();
 
-             _ui.m_t0.Play();
 
-             UpdateView();
 
-         }
 
-         protected async override void OnHide()
 
-         {
 
-             bool result;
 
-             result = await ActivitySProxy.ReqActivityTips(NumericType.IsPropCzykActivity, ActivityDataManager.Instance.todayMonthlyCardTips);
 
-             base.OnHide();
 
-         }
 
-         private void UpdateView()
 
-         {
 
-             if (GameGlobal.myNumericComponent.GetAsInt(NumericType.IsPropCzykActivity) == 0)
 
-             {
 
-                 ActivityDataManager.Instance.todayMonthlyCardTips = GameGlobal.myNumericComponent.GetAsInt(NumericType.IsPropCzykActivity);
 
-                 _ui.m_notTips.url = "ui://ActivityMain/ts_jrbzts";
 
-                 _ui.m_TipImg.visible = false;
 
-             }
 
-             _ui.m_rewardList.numItems = rewards;
 
-         }
 
-         private void ListItemRender(int index, GObject obj)
 
-         {
 
-             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemID[index]);
 
-             UI_rewardItem item = UI_rewardItem.Proxy(obj);
 
-             if(itemCfg.rarity != 0)
 
-             {
 
-                 item.m_bg.url = ResPathUtil.GetCommonGameResPath(rarity[itemCfg.rarity]);
 
-             }
 
-             else
 
-             {
 
-                 item.m_bg.url = ResPathUtil.GetCommonGameResPath(rarity[1]);   
 
-             }
 
-             if(index == rewards - 1)
 
-             {
 
-                 item.m_icon.url = ResPathUtil.GetIconPath(itemCfg.res, "png");
 
-             }
 
-             else
 
-             {
 
-                 item.m_icon.url = ResPathUtil.GetIconPath(itemCfg.res,"png");
 
-             }
 
-             item.m_txtNum.text = rewardNum[index];
 
-             item.target.data = itemCfg;
 
-             item.target.onClick.Add(OnClickItem);
 
-             UI_rewardItem.ProxyEnd();
 
-         }
 
-         private void OnClickTips()
 
-         {
 
-             if (ActivityDataManager.Instance.todayMonthlyCardTips == 0)
 
-             {
 
-                 _ui.m_TipImg.visible = true;
 
-                 ActivityDataManager.Instance.todayMonthlyCardTips = 1;
 
-             }
 
-             else
 
-             {
 
-                 _ui.m_TipImg.visible = false;
 
-                 ActivityDataManager.Instance.todayMonthlyCardTips = 0;
 
-             }
 
-         }
 
-         private void OnClickItem(EventContext param)
 
-         {
 
-             GObject comItem = (param.sender as GObject);
 
-             ItemCfg itemCfg = comItem.data as ItemCfg;
 
-             object[] sourceDatas = new object[]
 
-             { itemCfg.id, new object[] { typeof(BagView).FullName, this.viewData } };
 
-             GoodsItemTipsController.ShowItemTips(itemCfg.id, sourceDatas);
 
-         }
 
-         private void OnBtnAdJump()
 
-         {
 
-             ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_MONTH_CARD, ConstStoreSubId.STORE_MONTH_GOLD_CARD });
 
-             this.Hide();
 
-         }
 
-     }
 
- }
 
 
  |