|  | @@ -17,7 +17,10 @@ namespace GFGGame
 | 
											
												
													
														|  |          private List<int> giftBagList = new List<int>();
 |  |          private List<int> giftBagList = new List<int>();
 | 
											
												
													
														|  |          private int indexSuit = 0;
 |  |          private int indexSuit = 0;
 | 
											
												
													
														|  |          private int indexItem = 0;
 |  |          private int indexItem = 0;
 | 
											
												
													
														|  | 
 |  | +        private int muem2;
 | 
											
												
													
														|  |          private List<int> listIndex = new List<int>();
 |  |          private List<int> listIndex = new List<int>();
 | 
											
												
													
														|  | 
 |  | +        private List<int> originalIdList = new List<int>() { 50001, 50002, 50003, 50004 };
 | 
											
												
													
														|  | 
 |  | +        private Dictionary<int, int> discountDic = new Dictionary<int, int>();
 | 
											
												
													
														|  |          public override void Dispose()
 |  |          public override void Dispose()
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  |              if (_valueBarController != null)
 |  |              if (_valueBarController != null)
 | 
											
										
											
												
													
														|  | @@ -44,7 +47,7 @@ namespace GFGGame
 | 
											
												
													
														|  |              this.bringToFontOnClick = false;
 |  |              this.bringToFontOnClick = false;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              _valueBarController = new ValueBarController(_ui.m_valueBar);
 |  |              _valueBarController = new ValueBarController(_ui.m_valueBar);
 | 
											
												
													
														|  | -            _ui.m_Itemlist.itemRenderer = ListItemRender;
 |  | 
 | 
											
												
													
														|  | 
 |  | +            _ui.m_listCom.m_list.itemRenderer = ListItemRender;
 | 
											
												
													
														|  |              _ui.m_suitList.itemRenderer = ListItemSuitRender;
 |  |              _ui.m_suitList.itemRenderer = ListItemSuitRender;
 | 
											
												
													
														|  |              _ui.m_suitList.SetVirtualAndLoop();
 |  |              _ui.m_suitList.SetVirtualAndLoop();
 | 
											
												
													
														|  |              _ui.m_suitList.scrollPane.decelerationRate = 0.9f;
 |  |              _ui.m_suitList.scrollPane.decelerationRate = 0.9f;
 | 
											
										
											
												
													
														|  | @@ -68,12 +71,10 @@ namespace GFGGame
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  |              base.OnShown();
 |  |              base.OnShown();
 | 
											
												
													
														|  |              _valueBarController.OnShown();
 |  |              _valueBarController.OnShown();
 | 
											
												
													
														|  | -            int muem2 = (int)this.viewData;
 |  | 
 | 
											
												
													
														|  | -            _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(102, 0);
 |  | 
 | 
											
												
													
														|  | -            _shopCfgs = ShopDataManager.Instance.RemoveNotOpenCfg(_shopCfgs);
 |  | 
 | 
											
												
													
														|  | -            _shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +            muem2 = (int)this.viewData;
 | 
											
												
													
														|  |              AddgiftBagID();
 |  |              AddgiftBagID();
 | 
											
												
													
														|  | 
 |  | +            UpdateDic();
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |              UpdateView();
 |  |              UpdateView();
 | 
											
												
													
														|  |              Timers.inst.Add(5, 0, UpdateListSuit);
 |  |              Timers.inst.Add(5, 0, UpdateListSuit);
 | 
											
												
													
														|  |              Timers.inst.Add(1, 0, UpdateTime);
 |  |              Timers.inst.Add(1, 0, UpdateTime);
 | 
											
										
											
												
													
														|  | @@ -83,6 +84,7 @@ namespace GFGGame
 | 
											
												
													
														|  |              Timers.inst.Remove(UpdateListSuit);
 |  |              Timers.inst.Remove(UpdateListSuit);
 | 
											
												
													
														|  |              Timers.inst.Remove(UpdateTime);
 |  |              Timers.inst.Remove(UpdateTime);
 | 
											
												
													
														|  |              giftBagList.Clear();
 |  |              giftBagList.Clear();
 | 
											
												
													
														|  | 
 |  | +            discountDic.Clear();
 | 
											
												
													
														|  |              listIndex.Clear();
 |  |              listIndex.Clear();
 | 
											
												
													
														|  |              base.OnHide();
 |  |              base.OnHide();
 | 
											
												
													
														|  |              ShopViewManager.Instance.ClearItemEff();
 |  |              ShopViewManager.Instance.ClearItemEff();
 | 
											
										
											
												
													
														|  | @@ -119,8 +121,11 @@ namespace GFGGame
 | 
											
												
													
														|  |          private void UpdateView()
 |  |          private void UpdateView()
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  |              ShopViewManager.Instance.ClearItemEff();
 |  |              ShopViewManager.Instance.ClearItemEff();
 | 
											
												
													
														|  | -            // 修改直购典藏状态
 |  | 
 | 
											
												
													
														|  | -            _ui.m_Itemlist.numItems = _shopCfgs.Count;
 |  | 
 | 
											
												
													
														|  | 
 |  | +            _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(102, muem2);
 | 
											
												
													
														|  | 
 |  | +            _shopCfgs = ShopDataManager.Instance.RemoveNotOpenCfg(_shopCfgs);
 | 
											
												
													
														|  | 
 |  | +            _shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
 | 
											
												
													
														|  | 
 |  | +            //UpdateShopCfg();
 | 
											
												
													
														|  | 
 |  | +            _ui.m_listCom.m_list.numItems = _shopCfgs.Count;
 | 
											
												
													
														|  |              _ui.m_suitList.numItems = giftBagList.Count;
 |  |              _ui.m_suitList.numItems = giftBagList.Count;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
										
											
												
													
														|  | @@ -231,5 +236,35 @@ namespace GFGGame
 | 
											
												
													
														|  |                  count++;
 |  |                  count++;
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | 
 |  | +        private void UpdateDic()
 | 
											
												
													
														|  | 
 |  | +        {
 | 
											
												
													
														|  | 
 |  | +           for(int i =0;i<giftBagList.Count; i++)
 | 
											
												
													
														|  | 
 |  | +            {
 | 
											
												
													
														|  | 
 |  | +                discountDic.Add(giftBagList[i], originalIdList[i]);
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        private void UpdateShopCfg()
 | 
											
												
													
														|  | 
 |  | +        {
 | 
											
												
													
														|  | 
 |  | +            long endTime;
 | 
											
												
													
														|  | 
 |  | +            long startTime;
 | 
											
												
													
														|  | 
 |  | +            for (int i=0;i < EverydaySaleCfgArray.Instance.dataArray.Length;i++)
 | 
											
												
													
														|  | 
 |  | +            {
 | 
											
												
													
														|  | 
 |  | +                EverydaySaleCfg item = EverydaySaleCfgArray.Instance.dataArray[i];
 | 
											
												
													
														|  | 
 |  | +                endTime = TimeUtil.DateTimeToTimestamp(item.endTime);
 | 
											
												
													
														|  | 
 |  | +                startTime = TimeUtil.DateTimeToTimestamp(item.openTime);
 | 
											
												
													
														|  | 
 |  | +                if (startTime > TimeHelper.ServerNow() || endTime < TimeHelper.ServerNow())
 | 
											
												
													
														|  | 
 |  | +                {
 | 
											
												
													
														|  | 
 |  | +                    for(int j =0;j<_shopCfgs.Count;j++)
 | 
											
												
													
														|  | 
 |  | +                    {
 | 
											
												
													
														|  | 
 |  | +                        if(_shopCfgs[j].id == giftBagList[i])
 | 
											
												
													
														|  | 
 |  | +                        {
 | 
											
												
													
														|  | 
 |  | +                            int id = _shopCfgs[j].id;
 | 
											
												
													
														|  | 
 |  | +                            id = discountDic[id];
 | 
											
												
													
														|  | 
 |  | +                            _shopCfgs[j] = ShopCfgArray.Instance.GetCfg(id);
 | 
											
												
													
														|  | 
 |  | +                        }
 | 
											
												
													
														|  | 
 |  | +                    }
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  }
 |  |  }
 |