|  | @@ -5,6 +5,7 @@ using System.Collections.Generic;
 | 
	
		
			
				|  |  |  using ET;
 | 
	
		
			
				|  |  |  using static GFGGame.ShopSProxy;
 | 
	
		
			
				|  |  |  using UI.CommonGame;
 | 
	
		
			
				|  |  | +using System.Text.RegularExpressions;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  namespace GFGGame
 | 
	
		
			
				|  |  |  {
 | 
	
	
		
			
				|  | @@ -12,9 +13,14 @@ namespace GFGGame
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |          private UI_WeeklyGiftTipsUI _ui;
 | 
	
		
			
				|  |  |          private int giftShopId = 0;
 | 
	
		
			
				|  |  | +        private EffectUI _effectUI1;
 | 
	
		
			
				|  |  | +        private EffectUI _effectUI2;
 | 
	
		
			
				|  |  |          public override void Dispose()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +            EffectUIPool.Recycle(_effectUI1);
 | 
	
		
			
				|  |  | +            _effectUI1 = null;
 | 
	
		
			
				|  |  | +            EffectUIPool.Recycle(_effectUI2);
 | 
	
		
			
				|  |  | +            _effectUI2 = null;
 | 
	
		
			
				|  |  |              if (_ui != null)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  _ui.Dispose();
 | 
	
	
		
			
				|  | @@ -30,11 +36,15 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              this.viewCom = _ui.target;
 | 
	
		
			
				|  |  |              modal = true;
 | 
	
		
			
				|  |  |              this.viewCom.Center();
 | 
	
		
			
				|  |  | +            //邊框左上角特效
 | 
	
		
			
				|  |  | +            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderLeftTop, "ui_Activity", "Com_window_L_up");
 | 
	
		
			
				|  |  | +            //邊框右下角特效
 | 
	
		
			
				|  |  | +            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holderRightDowm, "ui_Activity", "Com_window_R_Down");
 | 
	
		
			
				|  |  |              viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
 | 
	
		
			
				|  |  |              _ui.m_rewardList.itemRenderer = ListItemRender;
 | 
	
		
			
				|  |  |              _ui.m_rewardList.onClickItem.Add(OnListSelectorItemClick);
 | 
	
		
			
				|  |  |              _ui.m_backBtn.onClick.Add(OnClickChange);
 | 
	
		
			
				|  |  | -            _ui.m_buyBtn.target.onClick.Add(OnClickBuy);
 | 
	
		
			
				|  |  | +            _ui.m_buyBtn.onClick.Add(OnClickBuy);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          protected override void OnShown()
 | 
	
		
			
				|  |  |          {
 | 
	
	
		
			
				|  | @@ -51,6 +61,16 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  _ui.m_rewardList.numItems = 0;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            string pattern = @"\[([^\[\]]+)\]";  // 正则表达式模式
 | 
	
		
			
				|  |  | +            // 创建Regex对象
 | 
	
		
			
				|  |  | +            Regex regex = new Regex(pattern);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            // 匹配文本中的所有结果
 | 
	
		
			
				|  |  | +            MatchCollection matchesOpen = regex.Matches(activityCfg.openTime);
 | 
	
		
			
				|  |  | +            MatchCollection matchesEnd = regex.Matches(activityCfg.endTime);
 | 
	
		
			
				|  |  | +            string openTime = matchesOpen[0].Groups[1].Value +"." + matchesOpen[1].Groups[1].Value + "." + matchesOpen[2].Groups[1].Value;
 | 
	
		
			
				|  |  | +            string endTime = matchesEnd[0].Groups[1].Value + "." + matchesEnd[1].Groups[1].Value + "." + matchesEnd[2].Groups[1].Value;
 | 
	
		
			
				|  |  | +            _ui.m_timeText.text = string.Format("本期特供时间:{0}-{1}", openTime, endTime);
 | 
	
		
			
				|  |  |              UpdateBtn();
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          protected override void OnHide()
 | 
	
	
		
			
				|  | @@ -110,15 +130,14 @@ namespace GFGGame
 | 
	
		
			
				|  |  |              if (remainBuyNum == 0)
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  //已售完
 | 
	
		
			
				|  |  | -                _ui.m_buyBtn.target.visible = false;
 | 
	
		
			
				|  |  | +                _ui.m_buyBtn.visible = false;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              else
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                  //未售完
 | 
	
		
			
				|  |  | -                _ui.m_buyBtn.target.visible = true;
 | 
	
		
			
				|  |  | +                _ui.m_buyBtn.visible = true;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            _ui.m_buyBtn.m_descText.text = string.Format("{0}元购买", shopCfg.configPrice);
 | 
	
		
			
				|  |  | -            _ui.m_descText.text = string.Format("限购次数:{0}/{1}", ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id) ,shopCfg.maxBuyNum);
 | 
	
		
			
				|  |  | +            _ui.m_descText.text = string.Format("库存剩余:{0}/{1}", ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id) ,shopCfg.maxBuyNum);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 |