Эх сурвалжийг харах

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

guodong 1 жил өмнө
parent
commit
568f2c40b3
36 өөрчлөгдсөн 655 нэмэгдсэн , 151 устгасан
  1. 6 8
      GameClient/Assets/Game/HotUpdate/Data/LeagueDataManager.cs
  2. 34 0
      GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs
  3. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Travel/UI_TravelRewardUI.cs
  4. 0 71
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_Button7.cs
  5. 88 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemPhotoSaveUI.cs
  6. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemPhotoSaveUI.cs.meta
  7. 17 9
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemPhotoUI.cs
  8. 21 0
      GameClient/Assets/Game/HotUpdate/Utils/TimeUtil.cs
  9. 4 4
      GameClient/Assets/Game/HotUpdate/Views/ActivityGetYuanXiao/ActivityGetYuanXiaoView.cs
  10. 5 1
      GameClient/Assets/Game/HotUpdate/Views/ActivityThemeLuckyBox/ActivityThemeLuckyBoxView.cs
  11. 4 1
      GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailySignView.cs
  12. 3 1
      GameClient/Assets/Game/HotUpdate/Views/League/LeagueAnswerView.cs
  13. 16 1
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs
  14. 9 1
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewCardView.cs
  15. 9 6
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewDressView.cs
  16. 1 1
      GameClient/Assets/Game/HotUpdate/Views/Mail/MailView.cs
  17. 203 0
      GameClient/Assets/Game/HotUpdate/Views/Poem/PoemPhotoSaveView.cs
  18. 11 0
      GameClient/Assets/Game/HotUpdate/Views/Poem/PoemPhotoSaveView.cs.meta
  19. 206 31
      GameClient/Assets/Game/HotUpdate/Views/Poem/PoemPhotoView.cs
  20. 5 14
      GameClient/Assets/Game/HotUpdate/Views/RoleInfo/PersonalPhotoView.cs
  21. 1 0
      GameClient/Assets/Game/HotUpdate/Views/RoleInfo/RoleInfoView.cs
  22. 8 1
      GameClient/Assets/Game/HotUpdate/Views/Travel/TravelRewardView.cs
  23. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_7!a.png
  24. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_7.png
  25. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes
  26. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0!a.png
  27. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0.png
  28. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_1!a.png
  29. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_1.png
  30. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_2!a.png
  31. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_2.png
  32. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_3.png
  33. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_4!a.png
  34. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_4.png
  35. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_fui.bytes
  36. BIN
      GameClient/Assets/ResIn/UI/Travel/Travel_fui.bytes

+ 6 - 8
GameClient/Assets/Game/HotUpdate/Data/LeagueDataManager.cs

@@ -193,31 +193,29 @@ namespace GFGGame
             for (int i = 0; i < LeagueWelfareCfgArray.Instance.dataArray.Length; i++)
             {
                 LeagueWelfareCfg welfareCfg = LeagueWelfareCfgArray.Instance.dataArray[i];
-                bool hasDay = false;
+                bool isBuy = false;
                 bool isGet = false;
                 switch (welfareCfg.type)
                 {
                     case LeagueWelfareType.Day:
-                        hasDay = GetNumeriValue(LeagueNumericType.LeagueWelfareDay) == 1;
+                        isBuy = GetNumeriValue(LeagueNumericType.LeagueWelfareDay) == 1;
                         isGet = GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueWelfareDay) == 1;
                         break;
                     case LeagueWelfareType.Week:
-                        //hasDay = GetNumeriValue(LeagueNumericType.LeagueWelfareWeekLeftTimes) > 0;
-                        hasDay = GetNumeriValue(LeagueNumericType.LeagueWelfareWeek) == 1;
+                        isBuy = GetNumeriValue(LeagueNumericType.LeagueWelfareWeek) == 1;
                         isGet = GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueWelfareWeek) == 1;
                         break;
                     case LeagueWelfareType.SuperWeek:
-                        //hasDay = GetNumeriValue(LeagueNumericType.LeagueWelfareSuperLeftTimes) > 0;
-                        hasDay = GetNumeriValue(LeagueNumericType.LeagueWelfareSuperWeek) == 1;
+                        isBuy = GetNumeriValue(LeagueNumericType.LeagueWelfareSuperWeek) == 1;
                         isGet = GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueWelfareSuperWeek) == 1;
                         break;
                     case LeagueWelfareType.SuperDay:
-                        hasDay = GetNumeriValue(LeagueNumericType.LeagueWelfareSuperDay) == 1;
+                        isBuy = GetNumeriValue(LeagueNumericType.LeagueWelfareSuperDay) == 1;
                         isGet = GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueWelfareSuperDay) == 1;
                         break;
                 }
                 // ET.Log.Debug("isBuy:" + isBuy);
-                if (hasDay)
+                if (isBuy)
                 {
                     LeagueGiftGetData giftGetData = new LeagueGiftGetData();
                     giftGetData.Type = welfareCfg.type;

+ 34 - 0
GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs

@@ -387,5 +387,39 @@ namespace GFGGame
             mainBgID = bgID;
             RoleInfoSProxy.ReqSaveMainBgID(bgID);
         }
+
+        public static void UpdatePhotoData()
+        {
+            List<long> numArr = new List<long>();
+            // 提取有数据的位置
+            for (int i = 0; i < RoleDataManager.photoDatas.Count; i++)
+            {
+                if (RoleDataManager.photoDatas[i] > 0)
+                {
+                    numArr.Add(RoleDataManager.photoDatas[i]);
+                }
+            }
+
+            // 找到可用空位赋值
+            int index = 0;
+            for (int i = 0; i < photoDatas.Count; i++)
+            {
+                if (RoleInfoManager.GetPosType(i) == MonthCardType.Gold && !CheckIsMonthCardOpenByType(MonthCardType.Gold)
+|| RoleInfoManager.GetPosType(i) == MonthCardType.BlackGold && !CheckIsMonthCardOpenByType(MonthCardType.BlackGold))
+                {
+                    photoDatas[i] = -1;
+                    continue;
+                }
+
+                if (index < numArr.Count)
+                {
+                    photoDatas[i] = numArr[index++];
+                }
+                else
+                {
+                    photoDatas[i] = 0;
+                }
+            }
+        }
     }
 }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Travel/UI_TravelRewardUI.cs

@@ -7,6 +7,7 @@ namespace UI.Travel
     public partial class UI_TravelRewardUI
     {
         public GComponent target;
+        public GGraph m_mask;
         public UI_ComPostcard m_comPostCard;
         public GList m_list;
         public GButton m_btnGet;
@@ -60,6 +61,7 @@ namespace UI.Travel
 
         private void Init(GComponent comp)
         {
+            m_mask = (GGraph)comp.GetChild("mask");
             m_comPostCard = (UI_ComPostcard)UI_ComPostcard.Create(comp.GetChild("comPostCard"));
             m_list = (GList)comp.GetChild("list");
             m_btnGet = (GButton)comp.GetChild("btnGet");
@@ -69,6 +71,7 @@ namespace UI.Travel
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_mask = null;
             m_comPostCard.Dispose();
             m_comPostCard = null;
             m_list = null;

+ 0 - 71
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_Button7.cs

@@ -1,71 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.Poem
-{
-    public partial class UI_Button7
-    {
-        public GButton target;
-        public GTextField m_txtTitle;
-        public const string URL = "ui://iyz778gkuyux103";
-        public const string PACKAGE_NAME = "Poem";
-        public const string RES_NAME = "Button7";
-        private static UI_Button7 _proxy;
-
-        public static UI_Button7 Create(GObject gObject = null)
-        {
-            var ui = new UI_Button7();
-            if(gObject == null)
-            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GButton)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_Button7 Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_Button7();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GButton)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_txtTitle = (GTextField)comp.GetChild("txtTitle");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_txtTitle = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 88 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemPhotoSaveUI.cs

@@ -0,0 +1,88 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Poem
+{
+    public partial class UI_PoemPhotoSaveUI
+    {
+        public GComponent target;
+        public Controller m_c1;
+        public GGraph m_grhBg;
+        public UI_ListPhotoPreviewItem m_personalPhoto;
+        public GGraph m_saveImg;
+        public GProgressBar m_progress;
+        public UI_ComPostcard m_travelPhoto;
+        public const string URL = "ui://iyz778gkdns3tl5";
+        public const string PACKAGE_NAME = "Poem";
+        public const string RES_NAME = "PoemPhotoSaveUI";
+        private static UI_PoemPhotoSaveUI _proxy;
+
+        public static UI_PoemPhotoSaveUI Create(GObject gObject = null)
+        {
+            var ui = new UI_PoemPhotoSaveUI();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_PoemPhotoSaveUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_PoemPhotoSaveUI();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_c1 = comp.GetController("c1");
+            m_grhBg = (GGraph)comp.GetChild("grhBg");
+            m_personalPhoto = (UI_ListPhotoPreviewItem)UI_ListPhotoPreviewItem.Create(comp.GetChild("personalPhoto"));
+            m_saveImg = (GGraph)comp.GetChild("saveImg");
+            m_progress = (GProgressBar)comp.GetChild("progress");
+            m_travelPhoto = (UI_ComPostcard)UI_ComPostcard.Create(comp.GetChild("travelPhoto"));
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_c1 = null;
+            m_grhBg = null;
+            m_personalPhoto.Dispose();
+            m_personalPhoto = null;
+            m_saveImg = null;
+            m_progress = null;
+            m_travelPhoto.Dispose();
+            m_travelPhoto = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_Button7.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemPhotoSaveUI.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 5580fab9c66fa04439feef5e49193383
+guid: a5156e9dee7fe0246bd965fd76a009f8
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 17 - 9
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemPhotoUI.cs

@@ -15,10 +15,13 @@ namespace UI.Poem
         public GList m_listTravel;
         public GLoader m_icon;
         public GList m_typeList;
-        public UI_Button7 m_btnConfirmDelete;
-        public GButton m_btnRule;
-        public GTextField m_txtCount;
+        public GButton m_btnConfirmDelete;
+        public GButton m_btnConfirmSave;
         public GButton m_btnDelete;
+        public GButton m_btnSave;
+        public GTextField m_txtCount;
+        public GButton m_btnChooseAll;
+        public GButton m_btnRule;
         public const string URL = "ui://iyz778gkv4825";
         public const string PACKAGE_NAME = "Poem";
         public const string RES_NAME = "PoemPhotoUI";
@@ -74,10 +77,13 @@ namespace UI.Poem
             m_listTravel = (GList)comp.GetChild("listTravel");
             m_icon = (GLoader)comp.GetChild("icon");
             m_typeList = (GList)comp.GetChild("typeList");
-            m_btnConfirmDelete = (UI_Button7)UI_Button7.Create(comp.GetChild("btnConfirmDelete"));
-            m_btnRule = (GButton)comp.GetChild("btnRule");
-            m_txtCount = (GTextField)comp.GetChild("txtCount");
+            m_btnConfirmDelete = (GButton)comp.GetChild("btnConfirmDelete");
+            m_btnConfirmSave = (GButton)comp.GetChild("btnConfirmSave");
             m_btnDelete = (GButton)comp.GetChild("btnDelete");
+            m_btnSave = (GButton)comp.GetChild("btnSave");
+            m_txtCount = (GTextField)comp.GetChild("txtCount");
+            m_btnChooseAll = (GButton)comp.GetChild("btnChooseAll");
+            m_btnRule = (GButton)comp.GetChild("btnRule");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -89,11 +95,13 @@ namespace UI.Poem
             m_listTravel = null;
             m_icon = null;
             m_typeList = null;
-            m_btnConfirmDelete.Dispose();
             m_btnConfirmDelete = null;
-            m_btnRule = null;
-            m_txtCount = null;
+            m_btnConfirmSave = null;
             m_btnDelete = null;
+            m_btnSave = null;
+            m_txtCount = null;
+            m_btnChooseAll = null;
+            m_btnRule = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 21 - 0
GameClient/Assets/Game/HotUpdate/Utils/TimeUtil.cs

@@ -36,6 +36,27 @@ namespace GFGGame
             return string.Format("{0}秒", time);
         }
 
+        public static string FormattingTimeDetail(long curTime, long endTime)
+        {
+            long time = (endTime / 1000) - (curTime / 1000);
+            int days = (int)Math.Floor((decimal)time / TimeUtil.SECOND_PER_DAY);
+            int hours = (int)Math.Floor((decimal)time / TimeUtil.SECOND_PER_HOUR);
+            if (days >= 1)
+            {
+                return string.Format("{0}天{0}小时", days, hours);
+            }
+            int minutes = (int)Math.Floor((decimal)time / TimeUtil.SECOND_PER_MUNITE);
+            if (hours >= 1)
+            {
+                return string.Format("{0}小时{0}分钟", hours, minutes);
+            }
+            if (minutes >= 1)
+            {
+                return string.Format("{0}分钟{0}秒", minutes, time);
+            }
+            return string.Format("{0}秒", time);
+        }
+
         public static int FormattingTime11(long curTime, long endTime)
         {
             long time = (endTime / 1000) - (curTime / 1000);

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/ActivityGetYuanXiao/ActivityGetYuanXiaoView.cs

@@ -237,7 +237,7 @@ namespace GFGGame
             _ui.m_catcher.target.visible = true;
             _ui.m_catcher.target.draggable = true;
             //_ui.m_catcher.target.dragBounds = new Rect(-_ui.m_catcher.target.width / 2, _ui.m_catcher.target.y, Stage.inst.width + _ui.m_catcher.target.width, 0);
-            Vector2 dragLeftPos = _ui.m_startLeft.LocalToGlobal(Vector2.zero)/(UIContentScaler.scaleFactor);
+            Vector2 dragLeftPos = _ui.m_startLeft.LocalToGlobal(Vector2.zero) / (UIContentScaler.scaleFactor);
             Vector2 dragRightPos = _ui.m_startRight.LocalToGlobal(Vector2.zero) / (UIContentScaler.scaleFactor);
 
 
@@ -272,7 +272,7 @@ namespace GFGGame
 
             _ui.m_time.text = TimeUtil.FormattingTimeTo_mmss(_countTime * 1000);
             --_countTime;
-                
+
             if (_countTime < 0)
             {
                 Timers.inst.Remove(UpdateTime);
@@ -397,7 +397,7 @@ namespace GFGGame
                 }
             }
 
-            if(_ui.m_catcher.target.visible)
+            if (_ui.m_catcher.target.visible)
             {
                 GameEnd(true);
             }
@@ -491,7 +491,7 @@ namespace GFGGame
                 return;
             }
             _timer += Time.deltaTime * 1000;
-            if(_timer >= _cfg.dropTime)
+            if (_timer >= _cfg.dropTime)
             {
                 CreateItems(null);
                 _timer = 0;

+ 5 - 1
GameClient/Assets/Game/HotUpdate/Views/ActivityThemeLuckyBox/ActivityThemeLuckyBoxView.cs

@@ -58,7 +58,11 @@ namespace GFGGame
             _activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitLuckyBox);
 
             // 界面根据ID改变
-            _ui.m_c1.SetSelectedPage(_activityId.ToString());
+            if (_activityId == 2)
+                _ui.m_c1.selectedIndex = 1;
+            else
+                _ui.m_c1.selectedIndex = 0;
+
             _ui.target.GetTransition("In_" + _activityId.ToString())?.Play();
             _activityCfg = ActivityOpenCfgArray.Instance.GetCfg(_activityId);
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath(_activityCfg.res);

+ 4 - 1
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailySignView.cs

@@ -81,7 +81,6 @@ namespace GFGGame
             _ui.m_t0.SetHook("touch", () => { GRoot.inst.touchable = true; });
             _ui.m_t0.Play(() =>
             {
-                _ui.m_proSign.m_holder.visible = true;
                 //不知道sethook会不会出问题,在这里也加一个
                 GRoot.inst.touchable = true;
                 if (m_holderSign != null)
@@ -145,6 +144,10 @@ namespace GFGGame
             {
                 _ui.m_proSign.m_holder.visible = false;
             }
+            else
+            {
+                _ui.m_proSign.m_holder.visible = true;
+            }
             _ui.m_proSign.m_holder.x = _signCount / signCfgs[signCfgs.Count - 1].day * _ui.m_proSign.target.width - 88;
             
             _ui.m_proSign.m_holderReward.visible = false;

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Views/League/LeagueAnswerView.cs

@@ -53,7 +53,9 @@ namespace GFGGame
                 var index = (int)this.viewData;
                 _ui.m_c1.selectedIndex = index;
                 var openCfg = TeapartyOpenCfgArray.Instance.GetCfg(LeagueDataManager.Instance.TeaPartyId);
-                _ui.m_txtPlayRule.text =  TextDescCfgArray.Instance.GetCfg(300023).text + openCfg.preview;
+                if (openCfg != null) { 
+                    _ui.m_txtPlayRule.text =  TextDescCfgArray.Instance.GetCfg(300023).text + openCfg.preview;
+                }
                 _ui.m_btnTeaParty.visible = LeagueDataManager.Instance.TeaPartyStatus != 0;
             }
             else {

+ 16 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -22,6 +22,7 @@ namespace GFGGame
         private int _countShow = 0;   //第几次展示
         private bool _handClick = false;   //手动点击开启
         private bool _AnimationWait = true;   //抽卡动画等待加载完毕
+        bool _touchLoaBg = true;    //防止点击背景事件太快
 
         private EffectUI _effectUI1;
         private EffectUI _effectUI2;
@@ -170,7 +171,9 @@ namespace GFGGame
             Timers.inst.Remove(UpDataTime);
             Timers.inst.Remove(UpClickDataTime);
             Timers.inst.Remove(touchFlipOpen);
+            Timers.inst.Remove(UpDataTimeTouchLoaBg);
             GetSuitItemController.isAuto = false;
+            _touchLoaBg = true;
 
             foreach (var v in _effectUIDic)
             {
@@ -319,8 +322,20 @@ namespace GFGGame
             }
         }
 
-        private void OnClickLoaBg()
+        private void UpDataTimeTouchLoaBg(object param = null)
         {
+            _touchLoaBg = true;
+        }
+
+        private void OnClickLoaBg(EventContext context)
+        {
+            if (!_touchLoaBg)
+            {
+                return;
+            }
+            _touchLoaBg = false;
+            Timers.inst.Add(0.3f, 1, UpDataTimeTouchLoaBg);
+
             if (_recordOpenIndex.Count >= _rewardList.Count)
             {
                 _chooseIndex = -1;

+ 9 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewCardView.cs

@@ -30,7 +30,7 @@ namespace GFGGame
             this.viewCom = _ui.target;
             isfullScreen = true;
 
-            _ui.m_loaBg.onClick.Add(Hide);
+            _ui.m_loaBg.onClick.Add(OnClickBg);
         }
         protected override void AddEventListener()
         {
@@ -62,5 +62,13 @@ namespace GFGGame
 
         }
 
+        private void OnClickBg()
+        {
+            if (!GetSuitItemController.isAuto)
+            {
+                this.Hide();
+            }
+        }
+
     }
 }

+ 9 - 6
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewDressView.cs

@@ -173,12 +173,15 @@ namespace GFGGame
         {
             //_ui.m_t_close.Play(() =>
             //{
-                //_ui.m_comCard.m_holder.visible = false;
-                //_ui.m_comCard.m_holder1.visible = false;
-                //if (_newRewardList.Count == 0 && _oldRewardList.Count == 0)
-                //{
-                    this.Hide();
-                    EventAgent.DispatchEvent(ConstMessage.LUCKY_BOX_REWARD_SHOW);
+            //_ui.m_comCard.m_holder.visible = false;
+            //_ui.m_comCard.m_holder1.visible = false;
+            //if (_newRewardList.Count == 0 && _oldRewardList.Count == 0)
+            //{
+            if (!GetSuitItemController.isAuto)
+            {
+                this.Hide();
+                EventAgent.DispatchEvent(ConstMessage.LUCKY_BOX_REWARD_SHOW);
+            }
             //    }
             //    else {
             //        _ui.m_t_open.Play();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Mail/MailView.cs

@@ -114,7 +114,7 @@ namespace GFGGame
             item.m_c1.selectedIndex = mailDataMgr.GetMailState(data);
             item.m_txtTitle.text = data.title;
             long endTime = (data.timeSec + _retainDay * TimeUtil.SECOND_PER_DAY * 1000);
-            string str = TimeUtil.FormattingTime(TimeHelper.ServerNow(), endTime);
+            string str = TimeUtil.FormattingTimeDetail(TimeHelper.ServerNow(), endTime);
             item.m_txtTime.text = string.Format("剩余时间:{0}", str);
             if (item.m_bg.data == null)
             {

+ 203 - 0
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemPhotoSaveView.cs

@@ -0,0 +1,203 @@
+using System.Collections;
+using UnityEngine;
+using UI.Poem;
+using System.Collections.Generic;
+using ET;
+using FairyGUI;
+using System.Threading.Tasks;
+
+namespace GFGGame
+{
+    public class PoemPhotoSaveView : BaseWindow
+    {
+        private UI_PoemPhotoSaveUI _ui;
+        private int curIndex;
+        private bool saveFinished;
+        private bool captureFinished;
+        private byte[] byteArr;
+
+        public override void Dispose()
+        {
+            if(_ui != null)
+            {
+                _ui.Dispose();
+                _ui = null;
+            }
+
+            base.Dispose();
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+
+            packageName = UI_PoemPhotoSaveUI.PACKAGE_NAME;
+            _ui = UI_PoemPhotoSaveUI.Create();
+            viewCom = _ui.target;
+            isfullScreen = true;
+            this.modal = false;
+            clickBlankToClose = false;
+        }
+
+        protected override void OnShown()
+        {
+            base.OnShown();
+
+            SavePhotoList savePhoto = (SavePhotoList)viewData;
+            _ui.m_c1.selectedIndex = savePhoto.pageIndex;
+            UpdateProgress(0, savePhoto.listChoose.Count);
+            RefreshUI(savePhoto);
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+            ResetData();
+        }
+
+        private void ResetData()
+        {
+            curIndex = 0;
+            byteArr = null;
+            saveFinished = false;
+            captureFinished = false;
+        }
+
+        private async void RefreshUI(SavePhotoList savePhoto)
+        {
+            for(int i = 0; i < savePhoto.listChoose.Count; i++)
+            {
+                int index = GetPhotoListIndex(savePhoto.photoInfos, savePhoto.listChoose[i]);
+
+                byte[] bytes = null;
+                if (_ui.m_c1.selectedIndex == 0)
+                {
+                    RefreshPhoto(savePhoto.photoInfos[index]);
+                    bytes = savePhoto.photoInfos[index].Bytes;
+                }
+                else
+                {
+                    RefreshTravelPhoto(savePhoto.photoInfos[i]);
+                    await Task.Delay(50);
+                    captureFinished = false;
+                    Timers.inst.StartCoroutine(CaptureByUI());
+                    while (!captureFinished)
+                    {
+                        await Task.Delay(17);
+                    }
+                    bytes = byteArr;
+                }
+
+                saveFinished = false;
+                SavePhoto(bytes);
+                while (!saveFinished)
+                {
+                    await Task.Delay(17);
+                }
+
+                ++curIndex;
+                UpdateProgress(curIndex, savePhoto.listChoose.Count);
+                if (curIndex == savePhoto.listChoose.Count)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("已全部保存至相册!");
+                    Hide();
+                }
+            }
+
+        }
+
+        private int GetPhotoListIndex(List<PoemPhotoData> photoInfos, long pictureID)
+        {
+            for (int i = 0; i < photoInfos.Count; i++)
+            {
+                if (photoInfos[i].PictureId == pictureID)
+                {
+                    return i;
+                }
+            }
+            return -1;
+        }
+
+        private void UpdateProgress(int cur, int max)
+        {
+            _ui.m_progress.value = cur;
+            _ui.m_progress.max = max;
+        }
+
+        private void RefreshPhoto(PoemPhotoData data)
+        {
+            UI_ListPhotoPreviewItem item = UI_ListPhotoPreviewItem.Proxy(_ui.m_personalPhoto.target);
+
+            item.m_comPhoto.m_loaPhoto.texture = data.Ntexture;
+            UI_ListPhotoPreviewItem.ProxyEnd();
+        }
+
+        private void RefreshTravelPhoto(PoemPhotoData data)
+        {
+            UI_ComPostcard item = UI_ComPostcard.Proxy(_ui.m_travelPhoto.target);
+
+            PoemPhotoData photoData = data;
+            TravelLoactionCfg loactionCfg = TravelLoactionCfgArray.Instance.GetCfg(photoData.TravelLocationId);
+
+            item.m_comTravel.m_loaBg.url = ResPathUtil.GetTravelBgPath(loactionCfg.res);
+            item.m_txtLocationName.text = loactionCfg.name;
+            item.m_txtTime.text = TimeUtil.FormattingTimeTo_yyyMMdd1(photoData.CreationTime);
+            item.m_comTravel.m_loaRole.url = "";
+            if (photoData.TravelSuitId > 0)
+            {
+                TravelSuitCfg travelSuitCfg = TravelSuitCfgArray.Instance.GetCfg(photoData.TravelSuitId);
+                item.m_comTravel.m_loaRole.url = ResPathUtil.GetTravelRolePath(travelSuitCfg.reourcesArr[photoData.SuitResIndex]);
+                item.m_comTravel.m_loaRole.SetXY(loactionCfg.positionsArr[photoData.PositionIndex][0], loactionCfg.positionsArr[photoData.PositionIndex][1]);
+            }
+
+            UI_ComPostcard.ProxyEnd();
+        }
+
+        private IEnumerator CaptureByUI()
+        {
+            //等待帧画面渲染结束
+            yield return new WaitForEndOfFrame();
+
+            int width = (int)(_ui.m_saveImg.width * UIContentScaler.scaleFactor);
+            int height = (int)(_ui.m_saveImg.height * UIContentScaler.scaleFactor);
+
+            Vector2 pos = _ui.m_saveImg.LocalToGlobal(Vector2.zero);
+            pos.y = Screen.height - pos.y - height;
+
+            Texture2D tex = new Texture2D(width, height, TextureFormat.RGB24, false);
+            //从屏幕读取像素, leftBtmX/leftBtnY 是读取的初始位置,width、height是读取像素的宽度和高度
+            tex.ReadPixels(new Rect(pos.x, pos.y, width, height), 0, 0);
+            //执行读取操作
+            tex.Apply();
+            byte[] bytes = tex.EncodeToPNG();
+
+            captureFinished = true;
+            byteArr = bytes;
+        }
+
+        private void SavePhoto(byte[] bytes)
+        {
+#if UNITY_EDITOR
+            // pc端保存
+            string path = Application.dataPath + "/StreamingAssets/" + TimeHelper.ServerNowSecs + curIndex + ".png";
+            System.IO.File.WriteAllBytes(path, bytes);
+            Debug.Log("the photo saved in:" + path);
+            saveFinished = true;
+#else
+            // 手机端
+            string fileName = "wsj" + TimeHelper.ServerNowSecs + curIndex + ".jpg";
+            NativeGallery.Permission permission = NativeGallery.SaveImageToGallery(bytes, "Wanshijing", fileName, (success, path) =>
+            {
+                if (success)
+                {
+                    saveFinished = true;
+                }
+                else
+                {
+
+                }
+            });
+#endif
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemPhotoSaveView.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 12dae7166790ac84ea13211730f2cb49
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 206 - 31
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemPhotoView.cs

@@ -2,17 +2,27 @@ using System.Collections.Generic;
 using ET;
 using FairyGUI;
 using UI.Poem;
+using UnityEngine;
 
 namespace GFGGame
 {
+    public struct SavePhotoList
+    {
+        public int pageIndex;
+        public List<PoemPhotoData> photoInfos;
+        public List<long> listChoose;
+    }
+
     public class PoemPhotoView : BaseWindow
     {
         private UI_PoemPhotoUI _ui;
-        private List<long> _listDelete = new List<long>();
+        private List<long> _listChoose = new List<long>();
+
         private List<PoemPhotoData> _photoInfos;
         private int _sourceType = 0;
 
 
+
         public override void Dispose()
         {
             if (_ui != null)
@@ -42,8 +52,11 @@ namespace GFGGame
 
             _ui.m_btnback.onClick.Add(OnBtnBackClick);
             _ui.m_btnDelete.onClick.Add(OnBtnDeleteClick);
-            _ui.m_btnConfirmDelete.target.onClick.Add(OnBtnConfirmDeleteClick);
+            _ui.m_btnSave.onClick.Add(OnBtnSaveClick);
+            _ui.m_btnConfirmDelete.onClick.Add(OnBtnConfirmDeleteClick);
             _ui.m_c1.onChanged.Add(OnBtnTabChange);
+            _ui.m_btnChooseAll.onClick.Add(OnClickBtnChooseAll);
+            _ui.m_btnConfirmSave.onClick.Add(OnClickConfirmSave);
 
             InitTypeList();
         }
@@ -56,7 +69,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            if(this.viewData != null)
+            if (this.viewData != null)
             {
                 _ui.m_c1.selectedIndex = (int)this.viewData;
             }
@@ -70,7 +83,7 @@ namespace GFGGame
         {
             base.OnHide();
             _ui.m_c2.selectedIndex = 0;
-            _listDelete.Clear();
+            _listChoose.Clear();
             Timers.inst.Remove(CheckGuide);
         }
 
@@ -97,23 +110,40 @@ namespace GFGGame
         }
         private void OnBtnDeleteClick()
         {
-            if (_ui.m_c1.selectedIndex == 0 && _ui.m_list.numItems == 0)
+            if (_ui.m_c1.selectedIndex == 0 && GetEnablePhotoNum(true) == 0)
             {
                 PromptController.Instance.ShowFloatTextPrompt("暂无照片可删除");
                 return;
             }
-            if (_ui.m_c1.selectedIndex == 1 && _ui.m_listTravel.numItems == 0)
+            if (_ui.m_c1.selectedIndex == 1 && GetEnablePhotoNum(true) == 0)
             {
                 PromptController.Instance.ShowFloatTextPrompt("暂无明信片可删除");
                 return;
             }
             _ui.m_c2.selectedIndex = 1;
+            _ui.m_btnChooseAll.selected = false;
+        }
+
+        private void OnBtnSaveClick()
+        {
+            if (_ui.m_c1.selectedIndex == 0 && _photoInfos.Count == 0)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("暂无照片可保存");
+                return;
+            }
+            if (_ui.m_c1.selectedIndex == 1 && _photoInfos.Count == 0)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("暂无明信片可保存");
+                return;
+            }
+            _ui.m_c2.selectedIndex = 2;
+            _ui.m_btnChooseAll.selected = false;
         }
 
         private void OnBtnTabChange()
         {
             _ui.m_c2.selectedIndex = 0;
-            _listDelete.Clear();
+            _listChoose.Clear();
             UpdateView();
 
         }
@@ -138,14 +168,16 @@ namespace GFGGame
                 _ui.m_txtCount.text = string.Format("{0}/{1}", _photoInfos.Count, RoleDataManager.WanShuiQianShanMaxStorageCount);
             }
 
-           
-            _ui.m_btnConfirmDelete.m_txtTitle.text = string.Format("删除 {0}/{1}", _listDelete.Count, _photoInfos.Count);
+
+            _ui.m_btnConfirmDelete.title = string.Format("删除 {0}/{1}", _listChoose.Count, _photoInfos.Count);
+            _ui.m_btnConfirmSave.title = string.Format("保存 {0}/{1}", _listChoose.Count, _photoInfos.Count);
+
         }
 
         private void RenderListItem(int index, GObject obj)
         {
             UI_ListPhotoItem item = UI_ListPhotoItem.Proxy(obj);
-            if (_ui.m_c2.selectedIndex == 1 && _listDelete.IndexOf(_photoInfos[index].PictureId) >= 0)
+            if (_ui.m_c2.selectedIndex != 0 && _listChoose.IndexOf(_photoInfos[index].PictureId) >= 0)
             {
                 item.m_c1.SetSelectedIndex(1);
             }
@@ -193,7 +225,7 @@ namespace GFGGame
 
             UI_ComPhotoPostcard item = UI_ComPhotoPostcard.Proxy(obj);
 
-            item.m_c1.selectedIndex = _ui.m_c2.selectedIndex == 1 && _listDelete.IndexOf(_photoInfos[index].PictureId) >= 0 ? 1 : 0;
+            item.m_c1.selectedIndex = _ui.m_c2.selectedIndex != 0 && _listChoose.IndexOf(_photoInfos[index].PictureId) >= 0 ? 1 : 0;
             item.m_comTravel.m_loaBg.url = ResPathUtil.GetTravelBgPath(loactionCfg.res);
             item.m_comTravel.m_loaRole.url = "";
             if (poemPhotoData.TravelSuitId > 0)
@@ -235,36 +267,51 @@ namespace GFGGame
             {
                 ViewManager.Show<PoemPhotoPreView>(new object[] { index, _photoInfos, _sourceType });
             }
-            else if (_ui.m_c2.selectedIndex == 1)
+            else
             {
-                if (photoData.LockingStatus)
+                if (_ui.m_c2.selectedIndex == 1)
                 {
-                    PromptController.Instance.ShowFloatTextPrompt("锁定的照片无法删除");
-                    return;
-                }
-                if (photoData.ToppingStatus)
-                {
-                    PromptController.Instance.ShowFloatTextPrompt("置顶的照片无法删除");
-                    return;
+                    if (photoData.LockingStatus)
+                    {
+                        PromptController.Instance.ShowFloatTextPrompt("锁定的照片无法删除");
+                        return;
+                    }
+                    if (photoData.ToppingStatus)
+                    {
+                        PromptController.Instance.ShowFloatTextPrompt("置顶的照片无法删除");
+                        return;
+                    }
                 }
+
                 UI_ListPhotoItem item = UI_ListPhotoItem.Proxy(obj.parent);
 
                 item.m_c1.selectedIndex ^= 1;
                 if (item.m_c1.selectedIndex == 1)
                 {
-                    _listDelete.Add(photoData.PictureId);
+                    _listChoose.Add(photoData.PictureId);
                 }
                 else
                 {
-                    _listDelete.Remove(photoData.PictureId);
+                    _listChoose.Remove(photoData.PictureId);
                 }
                 UI_ListPhotoItem.ProxyEnd();
-                _ui.m_btnConfirmDelete.m_txtTitle.text = string.Format("删除({0}/{1})", _listDelete.Count, _photoInfos.Count);
+
+                if (_ui.m_c2.selectedIndex == 1)
+                {
+                    _ui.m_btnConfirmDelete.title = string.Format("删除({0}/{1})", _listChoose.Count, _photoInfos.Count);
+                    _ui.m_btnChooseAll.selected = (GetEnablePhotoNum(true) == _listChoose.Count);
+                }
+                else if (_ui.m_c2.selectedIndex == 2)
+                {
+                    _ui.m_btnConfirmSave.title = string.Format("保存({0}/{1})", _listChoose.Count, _photoInfos.Count);
+                    _ui.m_btnChooseAll.selected = (GetEnablePhotoNum(false) == _listChoose.Count);
+                }
+
             }
         }
         private void OnBtnConfirmDeleteClick()
         {
-            if (_listDelete.Count == 0)
+            if (_listChoose.Count == 0)
             {
                 PromptController.Instance.ShowFloatTextPrompt("请选择要删除的照片");
                 return;
@@ -272,10 +319,10 @@ namespace GFGGame
             AlertUI.Show("删除后的照片无法恢复,是否确认删除?")
             .SetLeftButton(true, "否").SetRightButton(true, "是", async (object data) =>
             {
-                bool result = await PoemPhotoSProxy.ReqRemovedPhoto(_listDelete, _sourceType);
+                bool result = await PoemPhotoSProxy.ReqRemovedPhoto(_listChoose, _sourceType);
                 if (result)
                 {
-                    _listDelete.Clear();
+                    _listChoose.Clear();
                     OnBtnTabChange();
                 }
             });
@@ -283,9 +330,9 @@ namespace GFGGame
 
         private void OnBtnLockClick(EventContext context)
         {
-            if (_ui.m_c2.selectedIndex == 1)
+            if (_ui.m_c2.selectedIndex != 0)
             {
-                PromptController.Instance.ShowFloatTextPrompt("删除状态无法操作");
+                //PromptController.Instance.ShowFloatTextPrompt("删除状态无法操作");
                 return;
             }
             GObject item = context.sender as GObject;
@@ -314,9 +361,9 @@ namespace GFGGame
 
         private void OnBtnUpClick(EventContext context)
         {
-            if (_ui.m_c2.selectedIndex == 1)
+            if (_ui.m_c2.selectedIndex != 0)
             {
-                PromptController.Instance.ShowFloatTextPrompt("删除状态无法操作");
+                //PromptController.Instance.ShowFloatTextPrompt("删除状态无法操作");
                 return;
             }
             GObject item = context.sender as GObject;
@@ -364,12 +411,140 @@ namespace GFGGame
         /// </summary>
         private void InitTypeList()
         {
-            for(int i = 0; i < _ui.m_typeList.numChildren; i++)
+            for (int i = 0; i < _ui.m_typeList.numChildren; i++)
             {
                 UI_Button6 button6 = UI_Button6.Proxy(_ui.m_typeList.GetChildAt(i));
                 button6.m_title1.text = button6.target.title;
                 UI_Button6.ProxyEnd();
             }
         }
+
+        /// <summary>
+        /// 获取当前相册可操作的相片数量
+        /// </summary>
+        /// <param name="delete">为true时跳过锁住的和置顶的相片</param>
+        /// <returns></returns>
+        private int GetEnablePhotoNum(bool delete)
+        {
+            int num = 0;
+            for (int i = 0; i < _photoInfos.Count; i++)
+            {
+                PoemPhotoData photoData = _photoInfos[i];
+
+                if (delete && (photoData.LockingStatus || photoData.ToppingStatus))
+                {
+                    continue;
+                }
+
+                ++num;
+            }
+
+            return num;
+        }
+
+        private void OnClickBtnChooseAll()
+        {
+            _listChoose.Clear();
+
+            GList list = ((_ui.m_c1.selectedIndex == 0) ? _ui.m_list : _ui.m_listTravel);
+            for (int i = 0; i < _photoInfos.Count; i++)
+            {
+                PoemPhotoData photoData = _photoInfos[i];
+
+                // 删除全选时不选择 置顶或者锁住 的照片
+                if (_ui.m_c2.selectedIndex == 1 && (photoData.LockingStatus || photoData.ToppingStatus))
+                {
+                    continue;
+                }
+
+                if (_ui.m_btnChooseAll.selected)
+                {
+                    _listChoose.Add(photoData.PictureId);
+                }
+            }
+
+            list.numItems = _photoInfos.Count;
+            if (_ui.m_c2.selectedIndex == 1)
+            {
+                _ui.m_btnConfirmDelete.title = string.Format("删除({0}/{1})", _listChoose.Count, _photoInfos.Count);
+            }
+            else if (_ui.m_c2.selectedIndex == 2)
+            {
+                _ui.m_btnConfirmSave.title = string.Format("保存({0}/{1})", _listChoose.Count, _photoInfos.Count);
+            }
+        }
+
+        private void OnClickConfirmSave()
+        {
+            if (_listChoose.Count == 0)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("请选择要保存的照片");
+                return;
+            }
+
+#if UNITY_EDITOR
+            OpenSaveView();
+#else
+            CheckSaveLocal();
+#endif
+        }
+
+        /// <summary>
+        /// 检查保存相片相应权限
+        /// </summary>
+        private async void CheckSaveLocal()
+        {
+            string permissionName = "存储";
+#if UNITY_IOS
+            permissionName = "相册";
+#endif
+            NativeGallery.Permission permission = NativeGallery.CheckPermission(NativeGallery.PermissionType.Write, NativeGallery.MediaType.Image);
+            Debug.Log("Permission result: " + permission);
+
+            if (permission.Equals(NativeGallery.Permission.Denied))
+            {
+                string tips = $"保存至本地需要使用{permissionName}权限,您已经禁止!请前往手机系统设置开启应用的{permissionName}权限。";
+                if (NativeGallery.CanOpenSettings())
+                {
+                    AlertSystem.Show(tips)
+                                .SetLeftButton(true, "前往", (data) => { NativeGallery.OpenSettings(); })
+                                .SetRightButton(true, "拒绝");
+                }
+                else
+                {
+                    AlertSystem.Show(tips)
+                            .SetLeftButton(true, "知道了");
+                }
+            }
+            else
+            {
+                if (permission.Equals(NativeGallery.Permission.ShouldAsk))
+                {
+                    string tips = $"保存至本地需要使用{permissionName}权限,请同意!";
+                    PromptController.Instance.ShowFloatTextPrompt(tips);
+                    permission = await NativeGallery.RequestPermissionAsync(NativeGallery.PermissionType.Write, NativeGallery.MediaType.Image);
+                    //Debug.Log("Permission result: " + permission);
+                    if (!permission.Equals(NativeGallery.Permission.Granted))
+                    {
+                        PromptController.Instance.ShowFloatTextPrompt($"由于被禁止{permissionName}权限,保存失败!");
+                        return;
+                    }
+                }
+
+                //Debug.Log("Permission result: " + permission);
+            }
+
+            OpenSaveView();
+        }
+
+        private void OpenSaveView()
+        {
+            SavePhotoList savePhoto = new SavePhotoList();
+            savePhoto.pageIndex = _ui.m_c1.selectedIndex;
+            savePhoto.photoInfos = _photoInfos;
+            savePhoto.listChoose = _listChoose;
+
+            ViewManager.Show<PoemPhotoSaveView>(savePhoto);
+        }
     }
 }

+ 5 - 14
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/PersonalPhotoView.cs

@@ -1,5 +1,6 @@
 using UI.RoleInfo;
 using FairyGUI;
+using System.Collections.Generic;
 
 namespace GFGGame
 {
@@ -82,27 +83,15 @@ namespace GFGGame
             UI_ListPhotoItemDetail.ProxyEnd();
 
         }
+
         private async void OnListItemClick(EventContext context)
         {
             GObject obj = context.data as GObject;
             long selectPictureId = (long)obj.data;
+            
             if (selectPictureId == _showPictureId)//删除:点击相同id照片
             {
                 RoleDataManager.photoDatas[_showIndex] = 0;
-
-                // 将空位移动到后面
-                for (int i = _showIndex; i < RoleDataManager.photoDatas.Count - 1; i++)
-                {
-                    if (RoleDataManager.photoDatas[i + 1] == 0)
-                    {
-                        break;
-                    }
-                    else
-                    {
-                        RoleDataManager.photoDatas[i] = RoleDataManager.photoDatas[i + 1];
-                        RoleDataManager.photoDatas[i + 1] = 0;
-                    }
-                }
             }
             else
             {
@@ -136,6 +125,8 @@ namespace GFGGame
                     }
                 }
             }
+
+            RoleDataManager.UpdatePhotoData();
             bool result = await RoleInfoSProxy.ReqModifyShowPhoto(RoleDataManager.photoDatas);
             if (result)
             {

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/RoleInfoView.cs

@@ -114,6 +114,7 @@ namespace GFGGame
 
         private void UpdatePhotoList()
         {
+            RoleDataManager.UpdatePhotoData();
             _ui.m_photoList.numItems = RoleDataManager.photoDatas.Count;
         }
 

+ 8 - 1
GameClient/Assets/Game/HotUpdate/Views/Travel/TravelRewardView.cs

@@ -6,7 +6,7 @@ using UnityEngine;
 
 namespace GFGGame
 {
-    public class TravelRewardView : BaseWindow
+    public class TravelRewardView :BaseWindow
     {
         private UI_TravelRewardUI _ui;
 
@@ -33,6 +33,8 @@ namespace GFGGame
             _ui.m_list.onClickItem.Add(OnListItemClick);
 
             _ui.m_btnGet.onClick.Add(OnBtnGetClick);
+            _ui.m_mask.onClick.Add(OnClickBtnMask);
+
         }
         protected override void AddEventListener()
         {
@@ -105,5 +107,10 @@ namespace GFGGame
             }
         }
 
+        private void OnClickBtnMask()
+        {
+            Hide();
+        }
+
     }
 }

BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_7!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_7.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_2!a.png


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_2.png


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_4!a.png


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_4.png


BIN
GameClient/Assets/ResIn/UI/Poem/Poem_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Travel/Travel_fui.bytes