zhaoyang 2 years ago
parent
commit
89856e9a89

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Data/PoemGalleryDataManager.cs

@@ -9,6 +9,7 @@ namespace GFGGame
 {
     public class PoemGalleryDataManager : SingletonBase<PoemGalleryDataManager>
     {
+        public const int pageCount = 10;
         private long _themeOrder = 0;
         /// <summary>
         /// 主题期数

+ 7 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/PoemGallerySProxy.cs

@@ -168,7 +168,12 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    PoemGalleryDataManager.Instance.MyWorksCountOfTheme = PoemGalleryDataManager.Instance.MyWorksCountOfTheme + 1;
+                    bool result = await ReqGalleryList((int)GallerySortType.MyWorks, 0, PoemGalleryDataManager.pageCount);
+                    if (result)
+                    {
+                        EventAgent.DispatchEvent(ConstMessage.GALLERY_DATA_CHANGE);
+                    }
+                    PoemGalleryDataManager.Instance.MyWorksCountOfTheme = response.MyWorksCountOfTheme;
                     PromptController.Instance.ShowFloatTextPrompt("上传成功");
                     return true;
                 }
@@ -187,6 +192,7 @@ namespace GFGGame
                 if (response.Error == ErrorCode.ERR_Success)
                 {
                     PoemGalleryDataManager.Instance.RemoveGalleryData(response.WorksId);
+                    PoemGalleryDataManager.Instance.MyWorksCountOfTheme = response.MyWorksCountOfTheme;
                     EventAgent.DispatchEvent(ConstMessage.GALLERY_DATA_CHANGE);
                     return true;
                 }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpView.cs

@@ -152,6 +152,7 @@ namespace GFGGame
                 GameObject.Destroy(_sceneObject);
                 _sceneObject = null;
             }
+            Reset();
             Timers.inst.Remove(CheckGuide);
         }
         protected override void RemoveEventListener()

+ 4 - 2
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -566,6 +566,8 @@ namespace GFGGame
             }
             else if (_ui.m_c1.selectedIndex == 1)
             {
+
+
                 AlertUI.Show("是否确认上传此作品?")
                 .SetLeftButton(true, "否").SetRightButton(true, "是", async (object data) =>
                 {
@@ -581,8 +583,8 @@ namespace GFGGame
                     {
                         _ui.m_txtCount.text = string.Format("{0}/{1}", PoemGalleryDataManager.Instance.MyWorksCountOfTheme, GlobalCfgArray.globalCfg.maxGalleryWorksCount);
                         ViewManager.Hide<ModalStatusView>();
-                        object[] objs = ViewManager.GetGoBackDatas(typeof(DressUpView).FullName)[1] as object[];
-                        ViewManager.Show<PoemGalleryView>(objs, null, true);
+                        OnClickBtnBack();
+                        ViewManager.GoBackFrom(typeof(DressUpView).FullName);
                     }
                 });
             }

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryView.cs

@@ -58,7 +58,7 @@ namespace GFGGame
         // private List<PoemGalleryData> _galleryDatas = new List<PoemGalleryData>();
         private List<long> _galleryDatas = new List<long>();
         private int _sortType = 0;//由GallerySortType定义
-        private int _pageCount = 10;
+
         private int _lastListCount = 0;
         private int _lastList1Count = 0;
         private int _lastGalleryDatasCount = 0;
@@ -378,7 +378,7 @@ namespace GFGGame
                     return;
                 }
             }
-            bool result = await PoemGallerySProxy.ReqGalleryList(_sortType, startIndex, _pageCount);
+            bool result = await PoemGallerySProxy.ReqGalleryList(_sortType, startIndex, PoemGalleryDataManager.pageCount);
             if (result)
             {
                 Timers.inst.StartCoroutine(PictureStorageHelper.Download(_galleryDatas, startIndex, UpdateGalleryList));
@@ -629,7 +629,7 @@ namespace GFGGame
             isPullDown = true;
             _comScroll.scrollPane.LockHeader(header.sourceHeight);
 
-            bool result = await PoemGallerySProxy.ReqGalleryList(_sortType, 0, _pageCount);
+            bool result = await PoemGallerySProxy.ReqGalleryList(_sortType, 0, PoemGalleryDataManager.pageCount);
             // OnPullDownTimeComplete();
             if (result)
             {
@@ -664,7 +664,7 @@ namespace GFGGame
             isPullUp = true;
             _comScroll.scrollPane.LockFooter(footer.sourceHeight + 10);
 
-            bool result = await PoemGallerySProxy.ReqGalleryList(_sortType, _galleryDatas.Count, _pageCount);
+            bool result = await PoemGallerySProxy.ReqGalleryList(_sortType, _galleryDatas.Count, PoemGalleryDataManager.pageCount);
             // OnPullUpTimeComplete();
             if (result)
             {

+ 1 - 1
GameClient/Assets/StreamingAssets/build_info

@@ -1 +1 @@
-Build from PC-20220613VZOA at 2022/11/26 15:39:26
+Build from PC-20210915NALA at 2022/11/26 19:20:35