From 0780d6f78efd25030fdbb0701a14d43d73a0ebe2 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 21 三月 2019 09:50:03 +0800
Subject: [PATCH] Merge branch 'master' into Rune

---
 System/Auction/FullServiceAuctionWin.cs |   51 ++++++++++++++++++++++++++++++---------------------
 1 files changed, 30 insertions(+), 21 deletions(-)

diff --git a/System/Auction/FullServiceAuctionWin.cs b/System/Auction/FullServiceAuctionWin.cs
index 4cf4314..c02927a 100644
--- a/System/Auction/FullServiceAuctionWin.cs
+++ b/System/Auction/FullServiceAuctionWin.cs
@@ -26,11 +26,12 @@
         [SerializeField] Button m_TypeTipBtn;
         [SerializeField] Text m_JobTipText;
         [SerializeField] Text m_TypeTipText;
-         List<AuctionItemClass> FullServiceAuctionListSort = new List<AuctionItemClass>();//鍏ㄦ湇鎷嶅搧鍒楄〃
+        List<AuctionItemClass> FullServiceAuctionListSort = new List<AuctionItemClass>();//鍏ㄦ湇鎷嶅搧鍒楄〃
         AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
         AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
 
         private bool IsSendBool = true;
+        private int Times = 0;
         protected override void BindController()
         {
             m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
@@ -48,25 +49,28 @@
 
         protected override void OnPreOpen()
         {
-            IsSendBool = true;
+            Times = 0;
+            auctionHelpModel.isOpenPanel = true;
+            IsSendBool = false;
+            GlobalTimeEvent.Instance.secondEvent += secondEvent;
             model.FullServiceAuctionUpdate += FullServiceAuctionUpdate;//鏁版嵁璇锋眰鍒锋柊
             model.RefreshAuctionItemUpdate += RefreshAuctionItemUpdate;//鍒锋柊
             model.ClearAuctionUpdate += ClearAuctionUpdate;//娓呴櫎
-            model.BiddingItemInfoUpdate += BiddingItemInfoUpdate;//绔炰环鐗╁搧淇℃伅鍒锋柊
-            GlobalTimeEvent.Instance.secondEvent += secondEvent;
+            model.BiddingItemInfoUpdate += BiddingItemInfoUpdate;//绔炰环鐗╁搧淇℃伅鍒锋柊         
             Reset();
             CloseTip();
             ListSort();
             OnCreateGridLineCell(m_ScrollerController);
             OnCreateGridLineCellJob(m_ScrollerControllerJob);
-            OnCreateGridLineCellType(m_ScrollerControllerType);         
+            OnCreateGridLineCellType(m_ScrollerControllerType);
             OnCreateGridLineCellItem(m_ScrollerControllerItem);
             SetTipText();
         }
 
         protected override void OnAfterOpen()
         {
-           
+
+
         }
 
         protected override void OnPreClose()
@@ -77,7 +81,7 @@
             model.BiddingItemInfoUpdate -= BiddingItemInfoUpdate;//绔炰环鐗╁搧淇℃伅鍒锋柊
             GlobalTimeEvent.Instance.secondEvent -= secondEvent;
         }
-     
+
         protected override void OnAfterClose()
         {
         }
@@ -85,6 +89,11 @@
 
         private void secondEvent()
         {
+            Times += 1;
+            if (Times >= 3 && auctionHelpModel.isOpenPanel)
+            {
+                auctionHelpModel.isOpenPanel = false;
+            }
             if (IsSendBool)
             {
                 IsSendBool = false;
@@ -105,7 +114,7 @@
         }
         private void BiddingItemInfoUpdate()
         {
-           
+
         }
         private void OnClickJobTipBtn()
         {
@@ -118,7 +127,7 @@
         }
         private void OnCreateGridLineCell(ScrollerController gridCtrl)
         {
-         
+
             gridCtrl.Refresh();
             for (int i = 0; i < auctionHelpModel.FullServiceAuctionList.Count; i++)
             {
@@ -172,7 +181,7 @@
             if (index != -1)
             {
                 var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
-                if (fullServiceAuction.ChooseItem1 != null && fullServiceAuction.ChooseItem1.Length!=0)
+                if (fullServiceAuction.ChooseItem1 != null && fullServiceAuction.ChooseItem1.Length != 0)
                 {
                     gridCtrl.Refresh();
                     for (int i = 0; i < fullServiceAuction.ChooseItem1.Length; i++)
@@ -200,7 +209,7 @@
                     if (index != config.JobEntry)
                     {
                         auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].JobEntry = index;
-                        IsSendBool = true;                   
+                        IsSendBool = true;
                         SetTipText();
                     }
                 });
@@ -217,7 +226,7 @@
             if (index != -1)
             {
                 var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
-                if (fullServiceAuction.ChooseItem2 != null && fullServiceAuction.ChooseItem2.Length!=0)
+                if (fullServiceAuction.ChooseItem2 != null && fullServiceAuction.ChooseItem2.Length != 0)
                 {
                     gridCtrl.Refresh();
                     for (int i = 0; i < fullServiceAuction.ChooseItem2.Length; i++)
@@ -245,7 +254,7 @@
                     if (index != config.TypeEntry)
                     {
                         auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].TypeEntry = index;
-                        IsSendBool=true;                                        
+                        IsSendBool = true;
                         SetTipText();
                     }
                 });
@@ -271,9 +280,9 @@
             else
             {
                 model.LocationQuery = false;
-            }                   
+            }
             gridCtrl.Refresh();
-            for (int i = 0; i <FullServiceAuctionListSort.Count; i++)
+            for (int i = 0; i < FullServiceAuctionListSort.Count; i++)
             {
                 gridCtrl.AddCell(ScrollerDataType.Header, i);
             }
@@ -297,14 +306,14 @@
             {
                 AuctionInquiry.Instance.SendQueryAuction(string.Empty, sendNumber, 1);
             }
-           
+
         }
         private void CloseTip()
         {
             m_JobTip.SetActive(false);
             m_TypeTip.SetActive(false);
         }
-        private  void SetTipText()
+        private void SetTipText()
         {
             var selectedGenreNow = auctionHelpModel.SelectedGenreNow;
             if (auctionHelpModel.FullServiceAuctionDic.ContainsKey(selectedGenreNow))
@@ -323,7 +332,7 @@
             }
         }
 
-        private void  ListSort()
+        private void ListSort()
         {
             FullServiceAuctionListSort.Clear();
             var sendNumber = AuctionInquiry.Instance.GetSendNumber();
@@ -343,7 +352,7 @@
                     {
                         FullServiceAuctionListSort.Add(vlaue);
                     }
-                }                             
+                }
             }
             FullServiceAuctionListSort.Sort(Compare);
         }
@@ -360,7 +369,7 @@
             if (havex1.CompareTo(havey1) != 0)//鏄惁鍙備笌
             {
                 return -havex1.CompareTo(havey1);
-            }           
+            }
             return 1;
         }
         private bool IsHighestPrice(string GUID)
@@ -383,7 +392,7 @@
                 isBool = true;
             }
             return isBool;
-        }    
+        }
     }
 
 }

--
Gitblit v1.8.0