zhaoyang 2 years ago
parent
commit
9930802801

+ 10 - 5
FGUIProject/assets/poem/PoemGalleryPreviewUI.xml

@@ -8,6 +8,9 @@
     <remark page="4" value="我的作品"/>
   </controller>
   <displayList>
+    <graph id="n17_r9ri" name="n17" xy="0,0" size="1080,1920" alpha="0.8" type="rect" lineSize="0" fillColor="#ff000000">
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
     <loader id="n1_r9ri" name="loaPicture" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" align="center" vAlign="middle" fill="scaleMatchHeight">
       <relation target="" sidePair="height-height,center-center,middle-middle"/>
     </loader>
@@ -27,14 +30,16 @@
       <Button icon="ui://iyz778gkr9ri12a"/>
     </component>
     <group id="n12_r9ri" name="n12" xy="165,35" size="902,195"/>
-    <image id="n11_r9ri" name="n11" src="r9ri125" fileName="imagesGallery/hl_grxxdi.png" xy="0,1813"/>
-    <component id="n13_r9ri" name="btnCollect" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="718,1853" group="n16_r9ri">
+    <image id="n11_r9ri" name="n11" src="r9ri125" fileName="imagesGallery/hl_grxxdi.png" xy="0,1813" group="n16_r9ri"/>
+    <text id="n15_r9ri" name="txtTheme" xy="52,1845" size="417,46" group="n16_r9ri" fontSize="34" color="#ac9370" text="11/11至11/12主题名称xx"/>
+    <component id="n13_r9ri" name="btnCollect" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="774,1853" group="n16_r9ri">
       <Button title="50000" icon="ui://iyz778gkr9ri128" selectedIcon="ui://iyz778gkr9ri127"/>
     </component>
-    <component id="n14_r9ri" name="btnVote" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="877,1853" group="n16_r9ri">
+    <component id="n14_r9ri" name="btnVote" src="r9ri12j" fileName="componentsGallery/Button10.xml" xy="933,1853" group="n16_r9ri">
       <Button title="50000" icon="ui://iyz778gkr9ri124" selectedIcon="ui://iyz778gkr9ri123"/>
     </component>
-    <text id="n15_r9ri" name="txtTheme" xy="58,1845" size="349,46" group="n16_r9ri" fontSize="34" color="#ac9370" text="2018-10-5主题名称xx"/>
-    <group id="n16_r9ri" name="n16" xy="58,1845" size="851,46" advanced="true"/>
+    <group id="n16_r9ri" name="n16" xy="0,1813" size="1080,107" advanced="true">
+      <relation target="" sidePair="bottom-bottom"/>
+    </group>
   </displayList>
 </component>

+ 0 - 12
FGUIProject/assets/poem/componentsGallery/ComFavorites.xml

@@ -10,18 +10,6 @@
       <Button icon="ui://iyz778gkr9ri12v" selectedIcon="ui://iyz778gkr9ri12y" controller="c1" page="1"/>
     </component>
     <group id="n27_r9ri" name="grpTab" xy="244,210" size="592,83"/>
-    <list id="n28_r9ri" name="listFavorite" xy="24,400" size="1032,936" visible="false" layout="flow_hz" overflow="scroll" ptrRes=",ui://iyz778gkr9ri137" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w" autoClearItems="true">
-      <gearDisplay controller="c1" pages="0"/>
-      <relation target="" sidePair="bottomext-bottom"/>
-      <item/>
-      <item/>
-    </list>
-    <list id="n29_r9ri" name="listMySelf" xy="24,400" size="1032,936" visible="false" layout="flow_hz" overflow="scroll" ptrRes=",ui://iyz778gkr9ri137" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w" autoClearItems="true">
-      <gearDisplay controller="c1" pages="1"/>
-      <relation target="" sidePair="bottomext-bottom"/>
-      <item/>
-      <item/>
-    </list>
     <component id="n30_r9ri" name="comScroll" src="r9ri139" fileName="componentsGallery/ComScroll.xml" xy="24,400" size="1032,936">
       <relation target="" sidePair="height-height"/>
     </component>

+ 0 - 18
FGUIProject/assets/poem/componentsGallery/ComNormal.xml

@@ -35,24 +35,6 @@
       <gearDisplay controller="c1" pages="0"/>
       <ComboBox visibleItemCount="10"/>
     </component>
-    <list id="n14_r9ri" name="listRecommend" xy="24,483" size="1032,1136" visible="false" layout="flow_hz" overflow="scroll" ptrRes="ui://iyz778gkr9ri12p,ui://iyz778gkr9ri137" lineGap="17" colGap="28" lineItemCount="2" defaultItem="ui://iyz778gkr9ri10w" autoItemSize="true" autoClearItems="true">
-      <gearDisplay controller="c1" pages="0"/>
-      <relation target="" sidePair="top-top,bottomext-bottom"/>
-      <item/>
-      <item/>
-      <item/>
-      <item/>
-      <item/>
-      <item/>
-    </list>
-    <list id="n21_r9ri" name="listFriend" xy="24,483" size="1032,1136" visible="false" layout="flow_hz" overflow="scroll" ptrRes=",ui://iyz778gkr9ri137" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w" autoClearItems="true">
-      <gearDisplay controller="c1" pages="1"/>
-      <relation target="" sidePair="top-top,bottomext-bottom"/>
-      <item/>
-      <item/>
-      <item/>
-      <item/>
-    </list>
     <list id="n23_r9ri" name="listRank" xy="24,483" size="1032,1136" overflow="scroll" lineGap="20" defaultItem="ui://iyz778gkr9ri10y" align="center" autoClearItems="true">
       <gearDisplay controller="c1" pages="2"/>
       <relation target="" sidePair="top-top,bottomext-bottom"/>

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

@@ -205,7 +205,7 @@ namespace GFGGame
             }
             string strStartTime = TimeUtil.FormattingTime3(startTime);
             string strEndTime = TimeUtil.FormattingTime3(endTime); ;
-            return string.Format("截止日期:{0}至{1}", strStartTime, strEndTime);
+            return string.Format("{0}至{1}", strStartTime, strEndTime);
         }
 
         /// <summary>

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

@@ -79,6 +79,7 @@ namespace GFGGame
         public static void InitServerData()
         {
             roleName = GameGlobal.zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRoleName();
+            roleId = GameGlobal.zoneScene.GetComponent<RoleInfosComponent>().CurrentRoleId;
         }
 
         private static int oldLvValue;

+ 0 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_ComFavorites.cs

@@ -10,8 +10,6 @@ namespace UI.Poem
         public Controller m_c1;
         public GButton m_btnTab0;
         public GButton m_btnTab1;
-        public GList m_listFavorite;
-        public GList m_listMySelf;
         public UI_ComScroll m_comScroll;
         public const string URL = "ui://iyz778gkr9ri115";
         public const string PACKAGE_NAME = "Poem";
@@ -63,8 +61,6 @@ namespace UI.Poem
             m_c1 = comp.GetController("c1");
             m_btnTab0 = (GButton)comp.GetChild("btnTab0");
             m_btnTab1 = (GButton)comp.GetChild("btnTab1");
-            m_listFavorite = (GList)comp.GetChild("listFavorite");
-            m_listMySelf = (GList)comp.GetChild("listMySelf");
             m_comScroll = (UI_ComScroll)UI_ComScroll.Create(comp.GetChild("comScroll"));
         }
         public void Dispose(bool disposeTarget = false)
@@ -72,8 +68,6 @@ namespace UI.Poem
             m_c1 = null;
             m_btnTab0 = null;
             m_btnTab1 = null;
-            m_listFavorite = null;
-            m_listMySelf = null;
             m_comScroll.Dispose();
             m_comScroll = null;
             if(disposeTarget && target != null)

+ 0 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_ComNormal.cs

@@ -18,8 +18,6 @@ namespace UI.Poem
         public GTextField m_txtRewardCount;
         public GGroup m_grpTime;
         public GComboBox m_comBoBox;
-        public GList m_listRecommend;
-        public GList m_listFriend;
         public GList m_listRank;
         public GTextField m_txtRank;
         public GGroup m_grpResult;
@@ -82,8 +80,6 @@ namespace UI.Poem
             m_txtRewardCount = (GTextField)comp.GetChild("txtRewardCount");
             m_grpTime = (GGroup)comp.GetChild("grpTime");
             m_comBoBox = (GComboBox)comp.GetChild("comBoBox");
-            m_listRecommend = (GList)comp.GetChild("listRecommend");
-            m_listFriend = (GList)comp.GetChild("listFriend");
             m_listRank = (GList)comp.GetChild("listRank");
             m_txtRank = (GTextField)comp.GetChild("txtRank");
             m_grpResult = (GGroup)comp.GetChild("grpResult");
@@ -102,8 +98,6 @@ namespace UI.Poem
             m_txtRewardCount = null;
             m_grpTime = null;
             m_comBoBox = null;
-            m_listRecommend = null;
-            m_listFriend = null;
             m_listRank = null;
             m_txtRank = null;
             m_grpResult = null;

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemGalleryPreviewUI.cs

@@ -14,9 +14,9 @@ namespace UI.Poem
         public GTextField m_txtName;
         public GButton m_btnAddFriend;
         public GButton m_btnDelete;
+        public GTextField m_txtTheme;
         public GButton m_btnCollect;
         public GButton m_btnVote;
-        public GTextField m_txtTheme;
         public const string URL = "ui://iyz778gkr9ri116";
         public const string PACKAGE_NAME = "Poem";
         public const string RES_NAME = "PoemGalleryPreviewUI";
@@ -71,9 +71,9 @@ namespace UI.Poem
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_btnAddFriend = (GButton)comp.GetChild("btnAddFriend");
             m_btnDelete = (GButton)comp.GetChild("btnDelete");
+            m_txtTheme = (GTextField)comp.GetChild("txtTheme");
             m_btnCollect = (GButton)comp.GetChild("btnCollect");
             m_btnVote = (GButton)comp.GetChild("btnVote");
-            m_txtTheme = (GTextField)comp.GetChild("txtTheme");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -85,9 +85,9 @@ namespace UI.Poem
             m_txtName = null;
             m_btnAddFriend = null;
             m_btnDelete = null;
+            m_txtTheme = null;
             m_btnCollect = null;
             m_btnVote = null;
-            m_txtTheme = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/PictureStorageHelper.cs

@@ -64,8 +64,7 @@ namespace GFGGame
                 yield return request.SendWebRequest();
                 if (request.result == UnityWebRequest.Result.ProtocolError || request.result == UnityWebRequest.Result.ConnectionError)
                 {
-                    ET.Log.Debug("Error: " + request.error);
-
+                    PromptController.Instance.ShowFloatTextPrompt("下载失败");
                     DownloadFile(pictureTempUrl, callback);
                     // yield return null;
                 }

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

@@ -34,7 +34,7 @@ namespace GFGGame
         public static async ETTask<bool> ReqGalleryList(int sortType, int startIndex, int Count)
         {
             S2C_GetGalleryList response = null;
-            response = (S2C_GetGalleryList)await MessageHelper.SendToServer(new C2S_GetGalleryList());
+            response = (S2C_GetGalleryList)await MessageHelper.SendToServer(new C2S_GetGalleryList() { SortType = sortType, StartIndex = startIndex, Count = Count });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)

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

@@ -167,7 +167,7 @@ namespace GFGGame
             InstanceZonesDataManager.currentScoreType = _fightCfg.scoreType;
             //一级菜单
             _ui.m_comListType1.m_listType.RemoveChildrenToPool();
-            _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 1;
+            _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 2;
             //_ui.m_comListType1.m_listType1.ResizeToFit(_ui.m_listType1.numItems);
             float maxHeight = _ui.target.height - _ui.m_comListType1.m_listType.y - DressUpView.BOTTOM_BLANK;
             if (_ui.m_comListType1.m_listType.height > maxHeight)
@@ -506,7 +506,7 @@ namespace GFGGame
         {
             _currentList2 = null;
             currentListType = DressUpListType.List1;
-            _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length;
+            _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 2;
             GTween.To(_ui.target.width, listType1X, 0.5f)
                 .SetTarget(_ui.m_comListType1.target)
                 .OnUpdate((GTweener t) =>

+ 15 - 9
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryPreviewView.cs

@@ -44,7 +44,7 @@ namespace GFGGame
         {
             base.OnShown();
             _sortType = (int)(this.viewData as object[])[0];
-            long workId = (int)(this.viewData as object[])[1];
+            long workId = (long)(this.viewData as object[])[1];
             _galleryData = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
 
             UpdateView();
@@ -58,12 +58,13 @@ namespace GFGGame
             string themeTime = PoemGalleryDataManager.Instance.GetThemeTime();
             GalleryThemeCfg themeCfg = GalleryThemeCfgArray.Instance.GetCfg((int)PoemGalleryDataManager.Instance.ThemeId);
             string themeName = themeCfg.theme;
-            _ui.m_txtTheme.text = string.Format("{0} {1}", themeTime, themeName);// PoemGalleryDataManager.Instance.GetThemeTime();
+            _ui.m_txtTheme.text = string.Format("{0}  主题:{1}", themeTime, themeName);// PoemGalleryDataManager.Instance.GetThemeTime();
+            _ui.m_loaPicture.texture = _galleryData.Ntexture;
             _ui.m_btnCollect.selected = _galleryData.CollectOrNot;
             _ui.m_btnCollect.title = _galleryData.CollectCount.ToString();
             _ui.m_btnVote.selected = _galleryData.VoteOrNot;
             _ui.m_btnVote.title = _galleryData.VoteCount.ToString();
-            _ui.m_btnAddFriend.visible = FriendDataManager.Instance.GetFriendDataById(_galleryData.AuthorId) == null;
+            _ui.m_btnAddFriend.visible = _galleryData.AuthorId != RoleDataManager.roleId && FriendDataManager.Instance.GetFriendDataById(_galleryData.AuthorId) == null;
 
             RoleInfoDetailData roleInfo = await FriendSProxy.ReqOtherRoleDetailInfo(_galleryData.AuthorId);
             if (roleInfo != null)
@@ -137,13 +138,18 @@ namespace GFGGame
             }
         }
 
-        private async void OnBtnDeleteClick(EventContext context)
+        private void OnBtnDeleteClick(EventContext context)
         {
-            bool result = await PoemGallerySProxy.ReqDeleteMyWorks(_galleryData.WorkId);
-            if (result)
-            {
-                this.Hide();
-            }
+            AlertUI.Show("是否确认删除此照片?", "(删除的照片将清除点赞数)")
+              .SetLeftButton(true, "否").SetRightButton(true, "是", async (object data) =>
+              {
+                  bool result = await PoemGallerySProxy.ReqDeleteMyWorks(_galleryData.WorkId);
+                  if (result)
+                  {
+                      this.Hide();
+                  }
+              });
+
         }
     }
 }

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

@@ -150,7 +150,14 @@ namespace GFGGame
                 if (_ui.m_comFavorites.m_comScroll.m_listRecommend.numItems > 0) _ui.m_comFavorites.m_comScroll.m_listRecommend.ScrollToView(0);
                 if (_ui.m_comFavorites.m_comScroll.m_listRecommend1.numItems > 0) _ui.m_comFavorites.m_comScroll.m_listRecommend1.ScrollToView(0);
 
+                _ui.m_comNormal.m_comScroll.m_listRecommend.numItems = 0;
+                _ui.m_comNormal.m_comScroll.m_listRecommend1.numItems = 0;
+                _ui.m_comFavorites.m_comScroll.m_listRecommend.numItems = 0;
+                _ui.m_comFavorites.m_comScroll.m_listRecommend1.numItems = 0;
+
+                OnFavoritesTabChange();
                 OnNormalTabChange();
+
             }
 
             _ui.m_c1.selectedIndex = _tabIndex;
@@ -164,6 +171,7 @@ namespace GFGGame
             base.OnHide();
             ResetPullRelease();
             _ui.m_comNormal.m_comBoBox.selectedIndex = 0;
+
         }
 
         protected override void RemoveEventListener()
@@ -215,6 +223,7 @@ namespace GFGGame
             _tabIndex = _ui.m_c1.selectedIndex;
             _subtabIndex = _ui.m_comNormal.m_c1.selectedIndex;
             _comScroll = _ui.m_comNormal.m_comScroll.target;
+
         }
 
         /// <summary>
@@ -231,15 +240,14 @@ namespace GFGGame
         /// </summary>
         private void OnBtnFavoritesClick()
         {
-            ResetPullRelease();
+            if (_tabIndex == TabType.FAVORITES) return;
 
+            ResetPullRelease();
             _tabIndex = _ui.m_c1.selectedIndex;
             _comScroll = _ui.m_comFavorites.m_comScroll.target;
-            if (_ui.m_comFavorites.m_c1.selectedIndex != FavoritesType.FAVORITE)
-            {
-                _ui.m_comFavorites.m_c1.selectedIndex = FavoritesType.FAVORITE;
-            }
+            _ui.m_comFavorites.m_c1.selectedIndex = FavoritesType.FAVORITE;
             _subtabIndex = _ui.m_comFavorites.m_c1.selectedIndex;
+            OnFavoritesTabChange();
         }
 
         /// <summary>
@@ -292,15 +300,15 @@ namespace GFGGame
             if (_ui.m_comFavorites.m_c1.selectedIndex == FavoritesType.FAVORITE)//我的收藏
             {
                 _sortType = (int)GallerySortType.MyCollect;
-                _galleryDatas = PoemGalleryDataManager.Instance.FrinedDatas;
+                _galleryDatas = PoemGalleryDataManager.Instance.FavoriteDatas;
             }
             else if (_ui.m_comFavorites.m_c1.selectedIndex == FavoritesType.MY_SELF)//我的作品
             {
                 _sortType = (int)GallerySortType.MyWorks;
-                _galleryDatas = PoemGalleryDataManager.Instance.FrinedDatas;
+                _galleryDatas = PoemGalleryDataManager.Instance.MySelfDatas;
             }
-            _list = _ui.m_comNormal.m_comScroll.m_listRecommend;
-            _list1 = _ui.m_comNormal.m_comScroll.m_listRecommend1;
+            _list = _ui.m_comFavorites.m_comScroll.m_listRecommend;
+            _list1 = _ui.m_comFavorites.m_comScroll.m_listRecommend1;
             if (_list.numItems > 0) _list.ScrollToView(0);
             if (_list1.numItems > 0) _list.ScrollToView(0);
             ReqGalleryList(0);
@@ -327,15 +335,22 @@ namespace GFGGame
         }
         private void UpdateGalleryList()
         {
-            if (_galleryDatas.Count % 2 == 0)
+            if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RANK)
             {
-                _list.numItems = _galleryDatas.Count / 2;
-                _list1.numItems = _galleryDatas.Count / 2;
+                _ui.m_comNormal.m_listRank.numItems = _galleryDatas.Count;
             }
             else
             {
-                _list.numItems = (_galleryDatas.Count + 1) / 2;
-                _list1.numItems = (_galleryDatas.Count - 1) / 2;
+                if (_galleryDatas.Count % 2 == 0)
+                {
+                    _list.numItems = _galleryDatas.Count / 2;
+                    _list1.numItems = _galleryDatas.Count / 2;
+                }
+                else
+                {
+                    _list.numItems = (_galleryDatas.Count + 1) / 2;
+                    _list1.numItems = (_galleryDatas.Count - 1) / 2;
+                }
             }
 
             _list.ResizeToFit();
@@ -355,19 +370,19 @@ namespace GFGGame
             UpdateView();
         }
 
-        private void RefreshList()
-        {
-            if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RANK)
-            {
-                _ui.m_comNormal.m_listRank.RefreshVirtualList();
-            }
-            else
-            {
-                _list.RefreshVirtualList();
-                _list1.RefreshVirtualList();
-            }
-            UpdateView();
-        }
+        // private void RefreshList()
+        // {
+        //     if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RANK)
+        //     {
+        //         _ui.m_comNormal.m_listRank.numItems = _galleryDatas.Count;
+        //     }
+        //     else
+        //     {
+        //         _list.numItems = _galleryDatas.Count;
+        //         _list1.numItems = _galleryDatas.Count;
+        //     }
+        //     UpdateView();
+        // }
 
 
         /********************************************************界面更新*************************************************/
@@ -377,7 +392,7 @@ namespace GFGGame
             _ui.m_comNormal.m_txtTheme.text = string.Format("本期主题:{0}", themeCfg.theme);
             _ui.m_comNormal.m_txtRank.text = string.Format("我的排名:{0}", PoemGalleryDataManager.Instance.MyRank);
             _ui.m_comNormal.m_txtRewardCount.text = string.Format("奖励次数:{0}/{1}", PoemGalleryDataManager.Instance.VoteCount, GalleryRewardCfgArray.Instance.dataArray.Length);
-            _ui.m_comNormal.m_txtTime.text = PoemGalleryDataManager.Instance.GetThemeTime();
+            _ui.m_comNormal.m_txtTime.text = string.Format("截止日期:{0}", PoemGalleryDataManager.Instance.GetThemeTime());
             _ui.m_comNormal.m_grpResult.visible = PoemGalleryDataManager.Instance.IsResulting();
         }
 
@@ -399,19 +414,19 @@ namespace GFGGame
             PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
             UI_ListItem item = UI_ListItem.Proxy(obj);
 
-            if (data.Ntexture == null)
-            {
-                Timers.inst.StartCoroutine(PictureStorageHelper.DownloadFile(data.PictureTempUrl, (Texture2D texture) =>
-                {
-                    data.Ntexture = new NTexture(texture);
-                    item.m_loaIcon.texture = data.Ntexture;
-                }));
-            }
-            else
-            {
-                item.m_loaIcon.texture = data.Ntexture;
-            }
-            item.m_loaIcon.height = item.m_loaIcon.width * item.m_loaIcon.texture.height / item.m_loaIcon.texture.width;
+            // if (data.Ntexture == null)
+            // {
+            //     Timers.inst.StartCoroutine(PictureStorageHelper.DownloadFile(data.PictureTempUrl, (Texture2D texture) =>
+            //     {
+            //         data.Ntexture = new NTexture(texture);
+            //         item.m_loaIcon.texture = data.Ntexture;
+            //     }));
+            // }
+            // else
+            // {
+            //     item.m_loaIcon.texture = data.Ntexture;
+            // }
+            // item.m_loaIcon.height = item.m_loaIcon.width * item.m_loaIcon.texture.height / item.m_loaIcon.texture.width;
             item.m_txtName.text = data.AuthorName;
             item.m_btnCollect.title = data.CollectCount.ToString();
             item.m_btnCollect.selected = data.CollectOrNot;
@@ -441,31 +456,42 @@ namespace GFGGame
             long workId = _galleryDatas[index];
             PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
             UI_ListRankItem item = UI_ListRankItem.Proxy(obj);
-
-            // item.target.height = item.m_loaIcon.height + 80;
-            // item.m_loaIcon.texture = data.Ntexture;
-            // item.m_txtName.text = data.AuthorName;
-            // item.m_btnCollect.title = data.CollectCount.ToString();
-            // item.m_btnCollect.selected = data.CollectOrNot;
-            // item.m_btnVote.title = data.VoteCount.ToString();
-            // item.m_btnVote.selected = data.VoteOrNot;
-            // item.m_c1.selectedIndex = index < 3 ? index : 3;
-
-            // if (item.m_loaIcon.data == null)
+            // if (data.Ntexture == null)
             // {
-            //     item.m_loaIcon.onClick.Add(OnLoaIconClick);
+            //     Timers.inst.StartCoroutine(PictureStorageHelper.DownloadFile(data.PictureTempUrl, (Texture2D texture) =>
+            //     {
+            //         data.Ntexture = new NTexture(texture);
+            //         item.m_loaIcon.texture = data.Ntexture;
+            //     }));
             // }
-            // item.m_loaIcon.data = workId;
-            // if (item.m_btnCollect.data == null)
+            // else
             // {
-            //     item.m_btnCollect.onClick.Add(OnBtnCollectClick);
+            //     item.m_loaIcon.texture = data.Ntexture;
             // }
-            // item.m_btnCollect.data = workId;
-            // if (item.m_btnVote.data == null)
-            // {
-            //     item.m_btnVote.onClick.Add(OnBtnVoteClick);
-            // }
-            // item.m_btnVote.data = workId;
+            // item.m_loaIcon.height = item.m_loaIcon.width * item.m_loaIcon.texture.height / item.m_loaIcon.texture.width;
+
+            item.m_txtName.text = data.AuthorName;
+            item.m_btnCollect.title = data.CollectCount.ToString();
+            item.m_btnCollect.selected = data.CollectOrNot;
+            item.m_btnVote.title = data.VoteCount.ToString();
+            item.m_btnVote.selected = data.VoteOrNot;
+            item.m_c1.selectedIndex = index < 3 ? index : 3;
+
+            if (item.m_loaIcon.data == null)
+            {
+                item.m_loaIcon.onClick.Add(OnLoaIconClick);
+            }
+            item.m_loaIcon.data = workId;
+            if (item.m_btnCollect.data == null)
+            {
+                item.m_btnCollect.onClick.Add(OnBtnCollectClick);
+            }
+            item.m_btnCollect.data = workId;
+            if (item.m_btnVote.data == null)
+            {
+                item.m_btnVote.onClick.Add(OnBtnVoteClick);
+            }
+            item.m_btnVote.data = workId;
             UI_ListRankItem.ProxyEnd();
         }
 
@@ -473,7 +499,7 @@ namespace GFGGame
 
         private void OnLoaIconClick(EventContext context)
         {
-            GObject obj = context.data as GObject;
+            GObject obj = context.sender as GObject;
             long workId = (long)obj.data;
             object[] gobackParamDatas = new object[] { _tabIndex, _subtabIndex, _ui.m_comNormal.m_comBoBox.selectedIndex };
             ViewManager.Show<PoemGalleryPreviewView>(new object[] { _sortType, workId }, new object[] { typeof(PoemGalleryView).FullName, gobackParamDatas });
@@ -481,7 +507,7 @@ namespace GFGGame
 
         private async void OnBtnCollectClick(EventContext context)
         {
-            GObject obj = context.data as GObject;
+            GObject obj = context.sender as GObject;
             long workId = (long)obj.data;
             PoemGalleryData galleryData = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
 
@@ -496,7 +522,7 @@ namespace GFGGame
                     }
                     else
                     {
-                        RefreshList();
+                        UpdateGalleryList();
                     }
                 }
             }
@@ -511,7 +537,7 @@ namespace GFGGame
                     }
                     else
                     {
-                        RefreshList();
+                        UpdateGalleryList();
                     }
                 }
             }
@@ -519,7 +545,7 @@ namespace GFGGame
 
         private async void OnBtnVoteClick(EventContext context)
         {
-            GObject obj = context.data as GObject;
+            GObject obj = context.sender as GObject;
             long workId = (long)obj.data;
             PoemGalleryData galleryData = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
 
@@ -528,7 +554,7 @@ namespace GFGGame
             if (result)
             {
 
-                RefreshList();
+                UpdateGalleryList();
 
                 int Count = GameGlobal.myNumericComponent.GetAsInt(NumericType.LikeGalleryWorksCountDaily);
                 GalleryIntegralCfg integralCfg = GalleryIntegralCfgArray.Instance.GetCfg(Count);

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