zhaoyang 2 years ago
parent
commit
333ae085e0
40 changed files with 456 additions and 174 deletions
  1. 1 1
      FGUIProject/assets/Card/components/ComRole.xml
  2. 1 1
      FGUIProject/assets/Card/components/ComSkill.xml
  3. BIN
      FGUIProject/assets/Card/images/kp_mudan.jpg
  4. BIN
      FGUIProject/assets/Card/images/test1.jpg
  5. 1 1
      FGUIProject/assets/Card/package.xml
  6. 0 8
      FGUIProject/assets/CommonGame/RuleUI.xml
  7. 0 1
      FGUIProject/assets/CommonGame/package.xml
  8. 1 1
      FGUIProject/assets/Main/components/ComCardMask.xml
  9. 8 2
      FGUIProject/assets/poem/PoemGalleryRewardUI.xml
  10. 19 0
      FGUIProject/assets/poem/PoemGalleryRuleUI.xml
  11. 1 0
      FGUIProject/assets/poem/PoemGalleryUI.xml
  12. 2 2
      FGUIProject/assets/poem/componentsGallery/ComFavorites.xml
  13. 2 2
      FGUIProject/assets/poem/componentsGallery/ComNormal.xml
  14. 1 1
      FGUIProject/assets/poem/componentsGallery/ListItem.xml
  15. 4 3
      FGUIProject/assets/poem/componentsGallery/ListRankRewardItem.xml
  16. BIN
      FGUIProject/assets/poem/imagesGallery/hl_phjltsts.png
  17. BIN
      FGUIProject/assets/poem/imagesPhoto/hl_phjldik.png
  18. BIN
      FGUIProject/assets/poem/imagesPhoto/hl_phjlk_1.png
  19. BIN
      FGUIProject/assets/poem/imagesPhoto/hl_phjlxtxt.png
  20. 5 0
      FGUIProject/assets/poem/package.xml
  21. 94 7
      GameClient/Assets/Game/HotUpdate/Data/PoemGalleryDataManager.cs
  22. 4 0
      GameClient/Assets/Game/HotUpdate/Data/VO/PoemGalleryData.cs
  23. 13 19
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemGalleryRuleUI.cs
  24. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemGalleryRuleUI.cs.meta
  25. 19 9
      GameClient/Assets/Game/HotUpdate/ServerProxy/PoemGallerySProxy.cs
  26. 1 1
      GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs
  27. 7 0
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/ItemView.cs
  28. 0 60
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/RuleView.cs
  29. 8 7
      GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryPreviewView.cs
  30. 34 3
      GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryRewardView.cs
  31. 91 0
      GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryRuleView.cs
  32. 1 1
      GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryRuleView.cs.meta
  33. 137 43
      GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryView.cs
  34. BIN
      GameClient/Assets/ResIn/UI/Card/Card_atlas0.png
  35. BIN
      GameClient/Assets/ResIn/UI/Card/Card_fui.bytes
  36. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes
  37. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0.png
  38. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_1.png
  39. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_atlas0_2.png
  40. BIN
      GameClient/Assets/ResIn/UI/Poem/Poem_fui.bytes

+ 1 - 1
FGUIProject/assets/Card/components/ComRole.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="211,362">
   <displayList>
-    <loader id="n2_ojlz" name="loaStory" xy="0,0" size="211,362" url="ui://7l6lvkaywg7t94" fill="scaleFree"/>
+    <loader id="n2_ojlz" name="loaStory" xy="0,0" size="211,362" url="ui://7l6lvkayr9ri9x" fill="scaleFree"/>
     <image id="n7_wg7t" name="n7" src="wg7t93" fileName="images/kp_kprk_4.png" xy="0,0"/>
   </displayList>
   <customProperty target="loaStory" propertyId="1"/>

+ 1 - 1
FGUIProject/assets/Card/components/ComSkill.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="170,170" mask="n75_rhha">
   <displayList>
-    <loader id="n78_rhha" name="loaSkill" xy="-32,-61" size="234,432" url="ui://7l6lvkaywg7t94" autoSize="true">
+    <loader id="n78_rhha" name="loaSkill" xy="-32,-61" size="234,432" url="ui://7l6lvkayr9ri9x" autoSize="true">
       <relation target="" sidePair="width-width,height-height"/>
     </loader>
     <image id="n75_rhha" name="n75" src="wr9a7r" fileName="images/kp_jnkuang_1.png" xy="3,3">

BIN
FGUIProject/assets/Card/images/kp_mudan.jpg


BIN
FGUIProject/assets/Card/images/test1.jpg


+ 1 - 1
FGUIProject/assets/Card/package.xml

@@ -71,7 +71,6 @@
     <image id="wg7t91" name="kp_kprk_2.png" path="/images/"/>
     <image id="wg7t92" name="kp_kprk_3.png" path="/images/"/>
     <image id="wg7t93" name="kp_kprk_4.png" path="/images/"/>
-    <image id="wg7t94" name="test1.jpg" path="/images/"/>
     <component id="wg7t95" name="ComRole.xml" path="/components/"/>
     <component id="wg7t96" name="cardMask.xml" path="/components/"/>
     <component id="f4xv97" name="ComFilterType.xml" path="/components/"/>
@@ -97,6 +96,7 @@
     <image id="94m19u" name="kp_kuang_2.png" path="/images/" exported="true"/>
     <image id="94m19v" name="kp_kuang_1.png" path="/images/" exported="true"/>
     <image id="94m19w" name="kp_kuang_4.png" path="/images/" exported="true"/>
+    <image id="r9ri9x" name="kp_mudan.jpg" path="/images/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\Card" packageCount="2" genCode="true"/>
 </packageDescription>

+ 0 - 8
FGUIProject/assets/CommonGame/RuleUI.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<component size="800,1200">
-  <displayList>
-    <image id="n2_r9ri" name="bg" src="lwri5u" fileName="imagesExport/hc_kuang_6.png" pkg="mk0fwx0x" xy="0,0" size="800,1200"/>
-    <text id="n0_r9ri" name="txtTitle" xy="309,91" size="182,42" fontSize="30" text="积分奖励规则"/>
-    <richtext id="n1_r9ri" name="txtContent" xy="126,293" size="528,368" fontSize="30" ubb="true" autoSize="none" text=""/>
-  </displayList>
-</component>

+ 0 - 1
FGUIProject/assets/CommonGame/package.xml

@@ -218,7 +218,6 @@
     <component id="r9ritjj" name="ButtonApproach.xml" path="/components/"/>
     <image id="r9ritjk" name="tc_tydikua_1.png" path="/imgnew/" scale="9grid" scale9grid="240,281,480,562"/>
     <image id="r9ritjl" name="tc_kuangk.png" path="/imgnew/"/>
-    <component id="r9ritjn" name="RuleUI.xml" path="/" exported="true"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\CommonGame" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 1 - 1
FGUIProject/assets/Main/components/ComCardMask.xml

@@ -2,7 +2,7 @@
 <component size="212,224" overflow="hidden" mask="n6_wzce" reversedMask="true">
   <controller name="button" pages="0,up,1,down" selected="0"/>
   <displayList>
-    <loader id="n4_r1a9" name="loaCard" xy="3,-50" pivot="0.5,0.5" size="210,388" url="ui://7l6lvkaywg7t94" fill="scaleMatchWidth"/>
+    <loader id="n4_r1a9" name="loaCard" xy="3,-50" pivot="0.5,0.5" size="210,388" url="ui://7l6lvkayr9ri9x" fill="scaleMatchWidth"/>
     <image id="n6_wzce" name="n6" src="sx2v9t" fileName="imagesStory/zd_tctcdikugn_2.png" xy="-1,-1"/>
   </displayList>
 </component>

+ 8 - 2
FGUIProject/assets/poem/PoemGalleryRewardUI.xml

@@ -1,7 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1080,1920">
+<component size="1070,1500">
   <displayList>
-    <list id="n0_r9ri" name="list" xy="185,502" size="722,1033" overflow="scroll" defaultItem="ui://iyz778gkr9ri118" autoClearItems="true">
+    <image id="n1_r9ri" name="n1" src="r9ri134" fileName="imagesPhoto/hl_phjldik.png" xy="0,0"/>
+    <image id="n2_r9ri" name="n2" src="r9ri135" fileName="imagesPhoto/hl_phjlk_1.png" xy="306,87" group="n4_r9ri"/>
+    <text id="n3_r9ri" name="n3" xy="437,90" size="196,64" group="n4_r9ri" font="ui://eg2y0ldpwonotja" fontSize="48" color="#a98151" text="排名奖励"/>
+    <image id="n5_r9ri" name="n5" src="r9ri133" fileName="imagesPhoto/hl_phjlxtxt.png" xy="114,272" group="n4_r9ri"/>
+    <text id="n6_r9ri" name="n6" xy="305,215" pivot="0.5,0" size="460,44" group="n4_r9ri" fontSize="32" color="#b2997c" text="排名前20的玩家可获得特殊奖励"/>
+    <group id="n4_r9ri" name="n4" xy="114,87" size="842,187"/>
+    <list id="n0_r9ri" name="list" xy="114,274" size="842,1118" overflow="scroll" defaultItem="ui://iyz778gkr9ri118" autoClearItems="true">
       <item/>
       <item/>
       <item/>

+ 19 - 0
FGUIProject/assets/poem/PoemGalleryRuleUI.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1070,1500">
+  <displayList>
+    <image id="n4_r9ri" name="n4" src="r9ri134" fileName="imagesPhoto/hl_phjldik.png" xy="0,0"/>
+    <image id="n5_r9ri" name="n5" src="r9ri135" fileName="imagesPhoto/hl_phjlk_1.png" xy="306,87" group="n9_r9ri"/>
+    <text id="n8_r9ri" name="n8" xy="389,90" pivot="0.5,0" size="292,64" group="n9_r9ri" font="ui://eg2y0ldpwonotja" fontSize="48" color="#a98151" text="积分奖励规则"/>
+    <text id="n6_r9ri" name="n6" xy="155,200" pivot="0.5,0" size="148,49" group="n9_r9ri" fontSize="36" color="#ab9274" text="积分获得"/>
+    <image id="n10_r9ri" name="n10" src="r9ri136" fileName="imagesGallery/hl_phjltsts.png" xy="127,221" group="n9_r9ri"/>
+    <text id="n11_r9ri" name="n11" xy="137,265" size="813,87" group="n9_r9ri" fontSize="30" color="#b2997c" autoSize="none" text="每天前30次点赞时可获得积分以及其他奖励,积分可在积分商 城中兑换背景、人物、道具、边框等照片装饰品"/>
+    <image id="n12_r9ri" name="n12" src="r9ri133" fileName="imagesPhoto/hl_phjlxtxt.png" xy="114,378" group="n9_r9ri"/>
+    <group id="n9_r9ri" name="n9" xy="114,87" size="842,293"/>
+    <list id="n3_r9ri" name="list" xy="114,379" size="842,1021" overflow="scroll" defaultItem="ui://iyz778gkr9ri118" autoClearItems="true">
+      <item/>
+      <item/>
+      <item/>
+      <item/>
+    </list>
+  </displayList>
+</component>

+ 1 - 0
FGUIProject/assets/poem/PoemGalleryUI.xml

@@ -15,6 +15,7 @@
     </component>
     <component id="n23_r9ri" name="comFavorites" src="r9ri115" fileName="componentsGallery/ComFavorites.xml" xy="0,0" size="1080,1736">
       <gearDisplay controller="c1" pages="4"/>
+      <relation target="" sidePair="height-height"/>
     </component>
     <image id="n24_r9ri" name="n24" src="r9ri12k" fileName="imagesGallery/hl_xz_ddik_1.png" xy="0,1736" group="n25_r9ri"/>
     <component id="n2_r9ri" name="btnRecover" src="r9ri12l" fileName="componentsGallery/Button11.xml" xy="0,1710" group="n25_r9ri">

+ 2 - 2
FGUIProject/assets/poem/componentsGallery/ComFavorites.xml

@@ -10,13 +10,13 @@
       <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" layout="flow_hz" overflow="scroll" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w">
+    <list id="n28_r9ri" name="listFavorite" xy="24,400" size="1032,936" layout="flow_hz" overflow="scroll" 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" layout="flow_hz" overflow="scroll" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w">
+    <list id="n29_r9ri" name="listMySelf" xy="24,400" size="1032,936" layout="flow_hz" overflow="scroll" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w" autoClearItems="true">
       <gearDisplay controller="c1" pages="1"/>
       <relation target="" sidePair="bottomext-bottom"/>
       <item/>

+ 2 - 2
FGUIProject/assets/poem/componentsGallery/ComNormal.xml

@@ -34,7 +34,7 @@
       <item/>
       <item/>
     </list>
-    <list id="n21_r9ri" name="listFriend" xy="24,483" size="1032,1136" layout="flow_hz" overflow="scroll" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w">
+    <list id="n21_r9ri" name="listFriend" xy="24,483" size="1032,1136" layout="flow_hz" overflow="scroll" lineGap="17" colGap="28" defaultItem="ui://iyz778gkr9ri10w" autoClearItems="true">
       <gearDisplay controller="c1" pages="1"/>
       <relation target="" sidePair="top-top,bottomext-bottom"/>
       <item/>
@@ -42,7 +42,7 @@
       <item/>
       <item/>
     </list>
-    <list id="n23_r9ri" name="listRank" xy="24,483" size="1032,1136" layout="flow_hz" overflow="scroll" lineGap="20" defaultItem="ui://iyz778gkr9ri10y" align="center">
+    <list id="n23_r9ri" name="listRank" xy="24,483" size="1032,1136" layout="flow_hz" overflow="scroll" lineGap="20" defaultItem="ui://iyz778gkr9ri10y" align="center" autoClearItems="true">
       <gearDisplay controller="c1" pages="2"/>
       <relation target="" sidePair="top-top,bottomext-bottom"/>
       <item/>

+ 1 - 1
FGUIProject/assets/poem/componentsGallery/ListItem.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="500,630">
   <displayList>
-    <loader id="n15_r9ri" name="loaIcon" xy="4,2" pivot="0.5,0" size="492,550" url="ui://iyz778gkr9ri132" align="center" vAlign="middle" fill="scaleFree" clearOnPublish="true"/>
+    <loader id="n15_r9ri" name="loaIcon" xy="4,2" pivot="0.5,0" size="492,550" url="ui://iyz778gkr9ri132" align="center" vAlign="middle" fill="scaleFree"/>
     <image id="n21_r9ri" name="n21" src="r9ri12h" fileName="imagesGallery/hl_cjkuangdi.png" xy="0,0" size="500,633">
       <relation target="n15_r9ri" sidePair="height-height"/>
     </image>

+ 4 - 3
FGUIProject/assets/poem/componentsGallery/ListRankRewardItem.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="482,151">
+<component size="842,200">
   <displayList>
-    <text id="n1_r9ri" name="txtRank" xy="0,51" size="96,42" fontSize="30" text="11111"/>
-    <list id="n2_r9ri" name="listReward" xy="119,0" size="363,151" layout="row" overflow="scroll" defaultItem="ui://eg2y0ldpj48o98">
+    <text id="n1_r9ri" name="txtRank" xy="52,73" pivot="0.5,0" size="158,54" fontSize="40" color="#a98860" text="第2~5名"/>
+    <image id="n3_r9ri" name="n3" src="r9ri133" fileName="imagesPhoto/hl_phjlxtxt.png" xy="0,198"/>
+    <list id="n2_r9ri" name="listReward" xy="259,-12" size="583,225" layout="row" colGap="-30" defaultItem="ui://eg2y0ldpj48o98">
       <item/>
       <item/>
     </list>

BIN
FGUIProject/assets/poem/imagesGallery/hl_phjltsts.png


BIN
FGUIProject/assets/poem/imagesPhoto/hl_phjldik.png


BIN
FGUIProject/assets/poem/imagesPhoto/hl_phjlk_1.png


BIN
FGUIProject/assets/poem/imagesPhoto/hl_phjlxtxt.png


+ 5 - 0
FGUIProject/assets/poem/package.xml

@@ -123,6 +123,11 @@
     <component id="r9ri130" name="Button12.xml" path="/componentsGallery/"/>
     <component id="r9ri131" name="Button13.xml" path="/componentsGallery/"/>
     <image id="r9ri132" name="kp_mudan.jpg" path="/images/"/>
+    <image id="r9ri133" name="hl_phjlxtxt.png" path="/imagesPhoto/"/>
+    <image id="r9ri134" name="hl_phjldik.png" path="/imagesPhoto/"/>
+    <image id="r9ri135" name="hl_phjlk_1.png" path="/imagesPhoto/"/>
+    <component id="r9ritjn" name="PoemGalleryRuleUI.xml" path="/" exported="true"/>
+    <image id="r9ri136" name="hl_phjltsts.png" path="/imagesGallery/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\Poem" packageCount="2" genCode="true"/>
 </packageDescription>

+ 94 - 7
GameClient/Assets/Game/HotUpdate/Data/PoemGalleryDataManager.cs

@@ -75,36 +75,66 @@ namespace GFGGame
         }
 
 
+        // /// <summary>
+        // /// 推荐数据
+        // /// </summary>
+        // public List<PoemGalleryData> RecommendDatas = new List<PoemGalleryData>();
+
+        // /// <summary>
+        // /// 最新数据
+        // /// </summary>
+        // public List<PoemGalleryData> NewestDatas = new List<PoemGalleryData>();
+
+        // /// <summary>
+        // /// 好友数据
+        // /// </summary>
+        // public List<PoemGalleryData> FrinedDatas = new List<PoemGalleryData>();
+
+        // /// <summary>
+        // /// 收藏数据
+        // /// </summary>
+        // public List<PoemGalleryData> FavoriteDatas = new List<PoemGalleryData>();
+
+        // /// <summary>
+        // /// 我的作品数据
+        // /// </summary>
+        // public List<PoemGalleryData> MySelfDatas = new List<PoemGalleryData>();
+
+        // /// <summary>
+        // /// 排行榜数据
+        // /// </summary>
+        // public List<PoemGalleryData> RankDatas = new List<PoemGalleryData>();
+
         /// <summary>
         /// 推荐数据
         /// </summary>
-        public List<PoemGalleryData> RecommendDatas = new List<PoemGalleryData>();
+        public List<long> RecommendDatas = new List<long>();
         /// <summary>
         /// 最新数据
         /// </summary>
-        public List<PoemGalleryData> NewestDatas = new List<PoemGalleryData>();
+        public List<long> NewestDatas = new List<long>();
 
         /// <summary>
         /// 好友数据
         /// </summary>
-        public List<PoemGalleryData> FrinedDatas = new List<PoemGalleryData>();
+        public List<long> FrinedDatas = new List<long>();
 
         /// <summary>
         /// 收藏数据
         /// </summary>
-        public List<PoemGalleryData> FavoriteDatas = new List<PoemGalleryData>();
+        public List<long> FavoriteDatas = new List<long>();
 
         /// <summary>
         /// 我的作品数据
         /// </summary>
-        public List<PoemGalleryData> MySelfDatas = new List<PoemGalleryData>();
+        public List<long> MySelfDatas = new List<long>();
 
         /// <summary>
         /// 排行榜数据
         /// </summary>
-        public List<PoemGalleryData> RankDatas = new List<PoemGalleryData>();
-
+        public List<long> RankDatas = new List<long>();
 
+        private Dictionary<long, PoemGalleryData> _dicGalleryData = new Dictionary<long, PoemGalleryData>();
         public void Clear()
         {
             RecommendDatas.Clear();
@@ -114,6 +144,50 @@ namespace GFGGame
             RankDatas.Clear();
         }
 
+        public void UpdateGalleryData(PoemGalleryData data)
+        {
+            if (_dicGalleryData.ContainsKey(data.WorkId))
+            {
+                _dicGalleryData[data.WorkId] = data;
+            }
+            else
+            {
+                _dicGalleryData.Add(data.WorkId, data);
+            }
+        }
+        public void RemoveGalleryData(long workId)
+        {
+            if (_dicGalleryData.ContainsKey(workId))
+            {
+                _dicGalleryData.Remove(workId);
+            }
+        }
+
+        public PoemGalleryData GetGalleryDataById(long workId)
+        {
+            if (_dicGalleryData.ContainsKey(workId))
+            {
+                return _dicGalleryData[workId];
+            }
+            return null;
+        }
+        public void UpdateFavoriteState(long workId, bool state, long count)
+        {
+            if (_dicGalleryData.ContainsKey(workId))
+            {
+                _dicGalleryData[workId].CollectOrNot = state;
+                _dicGalleryData[workId].CollectCount = count;
+            }
+        }
+        public void UpdateVoteiteState(long workId, bool state, long count)
+        {
+            if (_dicGalleryData.ContainsKey(workId))
+            {
+                _dicGalleryData[workId].VoteOrNot = state;
+                _dicGalleryData[workId].VoteCount = count;
+            }
+        }
+
         public string GetThemeTime()
         {
             long monday = TimeUtil.GetCurWeekMondayTime(GlobalCfgArray.globalCfg.refreshTime);//本周一5点
@@ -133,5 +207,18 @@ namespace GFGGame
             string strEndTime = TimeUtil.FormattingTime3(endTime); ;
             return string.Format("截止日期:{0}至{1}", strStartTime, strEndTime);
         }
+
+        /// <summary>
+        /// 是否结算中
+        /// </summary>
+        /// <returns></returns>
+        public bool IsResulting()
+        {
+            long monday0 = TimeUtil.GetCurWeekMondayTime();//本周一0点
+            long monday5 = TimeUtil.GetCurWeekMondayTime(GlobalCfgArray.globalCfg.refreshTime);//本周一5点
+            long now = TimeInfo.Instance.ServerNow() / 1000;
+            return now > monday0 && now < monday5;
+
+        }
     }
 }

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/PoemGalleryData.cs

@@ -10,6 +10,10 @@ namespace GFGGame
         /// </summary>
         public long WorkId = 0;
         /// <summary>
+        /// 作品排名
+        /// </summary>
+        public long Rank = 0;
+        /// <summary>
         /// 作者id
         /// </summary>
         public long AuthorId = 0;

+ 13 - 19
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_RuleUI.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemGalleryRuleUI.cs

@@ -2,22 +2,20 @@
 
 using FairyGUI;
 
-namespace UI.CommonGame
+namespace UI.Poem
 {
-    public partial class UI_RuleUI
+    public partial class UI_PoemGalleryRuleUI
     {
         public GComponent target;
-        public GImage m_bg;
-        public GTextField m_txtTitle;
-        public GRichTextField m_txtContent;
-        public const string URL = "ui://eg2y0ldpr9ritjn";
-        public const string PACKAGE_NAME = "CommonGame";
-        public const string RES_NAME = "RuleUI";
-        private static UI_RuleUI _proxy;
+        public GList m_list;
+        public const string URL = "ui://iyz778gkr9ritjn";
+        public const string PACKAGE_NAME = "Poem";
+        public const string RES_NAME = "PoemGalleryRuleUI";
+        private static UI_PoemGalleryRuleUI _proxy;
 
-        public static UI_RuleUI Create(GObject gObject = null)
+        public static UI_PoemGalleryRuleUI Create(GObject gObject = null)
         {
-            var ui = new UI_RuleUI();
+            var ui = new UI_PoemGalleryRuleUI();
             if(gObject == null)
             	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
@@ -26,11 +24,11 @@ namespace UI.CommonGame
             return ui;
         }
 
-        public static UI_RuleUI Proxy(GObject gObject = null)
+        public static UI_PoemGalleryRuleUI Proxy(GObject gObject = null)
         {
             if(_proxy == null)
             {
-                _proxy = new UI_RuleUI();
+                _proxy = new UI_PoemGalleryRuleUI();
             }
             var ui = _proxy;
             if(gObject == null)
@@ -57,15 +55,11 @@ namespace UI.CommonGame
 
         private void Init(GComponent comp)
         {
-            m_bg = (GImage)comp.GetChild("bg");
-            m_txtTitle = (GTextField)comp.GetChild("txtTitle");
-            m_txtContent = (GRichTextField)comp.GetChild("txtContent");
+            m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_bg = null;
-            m_txtTitle = null;
-            m_txtContent = null;
+            m_list = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/RuleView.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/poem/UI_PoemGalleryRuleUI.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 73c30f20d6ba30b45a6103042b789102
+guid: 6bb13f3925701614d80031cf92009f11
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 19 - 9
GameClient/Assets/Game/HotUpdate/ServerProxy/PoemGallerySProxy.cs

@@ -39,7 +39,8 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    List<PoemGalleryData> list = new List<PoemGalleryData>();
+                    // List<PoemGalleryData> list = new List<PoemGalleryData>();
+                    List<long> list = new List<long>();
                     switch (response.SortType)
                     {
                         case (int)GallerySortType.Recommend:
@@ -74,10 +75,13 @@ namespace GFGGame
                         data.ThemeOrder = response.WorksList[i].ThemeOrder;
                         data.ThemeId = response.WorksList[i].ThemeId;
                         data.PictureTempUrl = response.WorksList[i].PictureTempUrl;
+
                         Timers.inst.StartCoroutine(PictureStorageHelper.DownloadFile(data.PictureTempUrl, (Texture2D texture) =>
                         {
                             data.Ntexture = new NTexture(texture);
-                            list.Add(data);
+                            list.Add(data.WorkId);
+
+                            PoemGalleryDataManager.Instance.UpdateGalleryData(data);
                             if (list.Count == response.StartIndex + response.WorksList.Count - 1)
                             {
                                 EventAgent.DispatchEvent(ConstMessage.GALLERY_DATA_CHANGE);
@@ -128,12 +132,13 @@ namespace GFGGame
         //删除我的作品
         public static async ETTask<bool> ReqDeleteMyWorks(long worksId)
         {
-            S2C_NoticeGalleryWorksUploaded response = null;
-            response = (S2C_NoticeGalleryWorksUploaded)await MessageHelper.SendToServer(new C2S_NoticeGalleryWorksUploaded() { WorksId = worksId });
+            S2C_DeleteMyWorks response = null;
+            response = (S2C_DeleteMyWorks)await MessageHelper.SendToServer(new C2S_DeleteMyWorks() { WorksId = worksId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
+                    PoemGalleryDataManager.Instance.RemoveGalleryData(response.WorksId);
                     return true;
                 }
             }
@@ -149,6 +154,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
+                    PoemGalleryDataManager.Instance.UpdateFavoriteState(response.WorksId, true, response.BeCollectedCount);
                     return true;
                 }
             }
@@ -164,6 +170,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
+                    PoemGalleryDataManager.Instance.UpdateFavoriteState(response.WorksId, false, response.BeCollectedCount);
                     return true;
                 }
             }
@@ -179,6 +186,8 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
+                    PoemGalleryDataManager.Instance.UpdateFavoriteState(response.WorksId, true, response.BelikedCount);
+
                     return true;
                 }
             }
@@ -194,6 +203,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
+                    PoemGalleryDataManager.Instance.UpdateFavoriteState(response.WorksId, false, response.BelikedCount);
                     return true;
                 }
             }
@@ -210,13 +220,15 @@ namespace GFGGame
                 if (response.Error == ErrorCode.ERR_Success)
                 {
 
-                    List<PoemGalleryData> list = PoemGalleryDataManager.Instance.RankDatas;
+                    // List<PoemGalleryData> list = PoemGalleryDataManager.Instance.RankDatas;
+                    List<long> list = PoemGalleryDataManager.Instance.RankDatas;
 
                     for (int i = 0; i < response.RankList.Count; i++)
                     {
 
                         PoemGalleryData data = new PoemGalleryData();
                         data.WorkId = response.RankList[i].WorksId;
+                        data.Rank = i + 1;
                         data.AuthorId = response.RankList[i].AuthorId;
                         data.AuthorName = response.RankList[i].AuthorName;
                         data.VoteCount = response.RankList[i].BelikedCount;
@@ -230,7 +242,8 @@ namespace GFGGame
                         Timers.inst.StartCoroutine(PictureStorageHelper.DownloadFile(data.PictureTempUrl, (Texture2D texture) =>
                         {
                             data.Ntexture = new NTexture(texture);
-                            list.Add(data);
+                            list.Add(data.WorkId);
+                            PoemGalleryDataManager.Instance.UpdateGalleryData(data);
                             if (list.Count == response.RankList.Count)
                             {
                                 EventAgent.DispatchEvent(ConstMessage.GALLERY_RANK_DATA_CHANGE);
@@ -242,9 +255,6 @@ namespace GFGGame
             }
             return false;
         }
-
-
-
     }
 }
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -60,7 +60,7 @@ namespace GFGGame
             });
             _valueBar.m_btnGallery.onClick.Add(() =>
             {
-                ViewManager.Show<RuleView>(new object[] { "积分奖励规则", "" });
+                ViewManager.Show<PoemGalleryRuleView>();
             });
         }
 

+ 7 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ItemView.cs

@@ -217,6 +217,13 @@ namespace GFGGame
                 _item.SetScale(value, value);
             }
         }
+        public float SetTxtCountScale
+        {
+            set
+            {
+                _txtCount.SetScale(value, value);
+            }
+        }
         public void SetTxtCountPos(int x, int y)
         {
             _txtCount.SetPosition(x, y, 0);

+ 0 - 60
GameClient/Assets/Game/HotUpdate/Views/CommonGame/RuleView.cs

@@ -1,60 +0,0 @@
-using ET;
-using FairyGUI;
-using UI.CommonGame;
-using UnityEngine;
-
-namespace GFGGame
-{
-    public class RuleView : BaseWindow
-    {
-        private UI_RuleUI _ui;
-        private string _title;
-        private string _content;
-        public override void Dispose()
-        {
-            if (_ui != null)
-            {
-                _ui.Dispose();
-                _ui = null;
-            }
-            base.Dispose();
-        }
-
-        protected override void OnInit()
-        {
-            base.OnInit();
-            packageName = UI_RuleUI.PACKAGE_NAME;
-            _ui = UI_RuleUI.Create();
-            this.viewCom = _ui.target;
-            this.viewCom.Center();
-            this.modal = true;
-            viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
-
-        }
-        protected override void AddEventListener()
-        {
-            base.AddEventListener();
-
-        }
-        protected override void OnShown()
-        {
-            base.OnShown();
-            this._title = (this.viewData as object[])[0].ToString();
-            this._content = (this.viewData as object[])[1].ToString();
-            this._ui.m_txtTitle.text = _title;
-            this._ui.m_txtContent.text = _content;
-        }
-
-        protected override void OnHide()
-        {
-            base.OnHide();
-
-        }
-
-        protected override void RemoveEventListener()
-        {
-            base.RemoveEventListener();
-
-        }
-    }
-}

+ 8 - 7
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryPreviewView.cs

@@ -44,7 +44,8 @@ namespace GFGGame
         {
             base.OnShown();
             _sortType = (int)(this.viewData as object[])[0];
-            _galleryData = (this.viewData as object[])[1] as PoemGalleryData;
+            long workId = (int)(this.viewData as object[])[1];
+            _galleryData = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
 
         }
 
@@ -88,8 +89,8 @@ namespace GFGGame
                 bool result = await PoemGallerySProxy.ReqCancelCollecteGalleryWorks(_galleryData.WorkId);
                 if (result)
                 {
-                    _galleryData.CollectOrNot = false;
-                    _galleryData.CollectCount = _galleryData.CollectCount - 1;
+                    // _galleryData.CollectOrNot = false;
+                    // _galleryData.CollectCount = _galleryData.CollectCount - 1;
                     UpdateView();
                 }
             }
@@ -98,8 +99,8 @@ namespace GFGGame
                 bool result = await PoemGallerySProxy.ReqCollecteGalleryWorks(_galleryData.WorkId);
                 if (result)
                 {
-                    _galleryData.CollectOrNot = true;
-                    _galleryData.CollectCount = _galleryData.CollectCount + 1;
+                    // _galleryData.CollectOrNot = true;
+                    // _galleryData.CollectCount = _galleryData.CollectCount + 1;
                     UpdateView();
                 }
             }
@@ -112,8 +113,8 @@ namespace GFGGame
             bool result = await PoemGallerySProxy.ReqVoteGalleryWorks(_galleryData.WorkId);
             if (result)
             {
-                _galleryData.VoteOrNot = true;
-                _galleryData.CollectCount = _galleryData.CollectCount + 1;
+                // _galleryData.VoteOrNot = true;
+                // _galleryData.CollectCount = _galleryData.CollectCount + 1;
                 UpdateView();
                 int Count = GameGlobal.myNumericComponent.GetAsInt(NumericType.LikeGalleryWorksCountDaily);
                 GalleryIntegralCfg integralCfg = GalleryIntegralCfgArray.Instance.GetCfg(Count);

+ 34 - 3
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryRewardView.cs

@@ -1,5 +1,6 @@
 using ET;
 using FairyGUI;
+using UI.CommonGame;
 using UI.Poem;
 using UnityEngine;
 
@@ -25,8 +26,11 @@ namespace GFGGame
             packageName = UI_PoemGalleryRewardUI.PACKAGE_NAME;
             _ui = UI_PoemGalleryRewardUI.Create();
             this.viewCom = _ui.target;
-            isfullScreen = true;
-            // _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("gzs_bjbj");
+            this.viewCom.Center();
+            this.modal = true;
+            viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
+
+            _ui.m_list.itemRenderer = RenderListItem;
         }
         protected override void AddEventListener()
         {
@@ -36,7 +40,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-
+            _ui.m_list.numItems = GalleryRewardCfgArray.Instance.dataArray.Length;
         }
 
         protected override void OnHide()
@@ -50,5 +54,32 @@ namespace GFGGame
             base.RemoveEventListener();
 
         }
+
+        private void RenderListItem(int index, GObject obj)
+        {
+            GalleryRewardCfg cfg = GalleryRewardCfgArray.Instance.dataArray[index];
+            UI_ListRankRewardItem item = UI_ListRankRewardItem.Proxy(obj);
+            item.m_txtRank.text = cfg.desc;
+            item.m_listReward.data = index;
+            item.m_listReward.itemRenderer = RenderListRewardItem;
+            item.m_listReward.numItems = cfg.itemsArr.Length;
+            UI_ListRankRewardItem.ProxyEnd();
+        }
+        private void RenderListRewardItem(int index, GObject obj)
+        {
+            int rewardIndex = (int)obj.parent.data;
+            int[][] rewards = GalleryRewardCfgArray.Instance.dataArray[rewardIndex].itemsArr;
+            UI_ComItem item = UI_ComItem.Proxy(obj);
+            ItemData reward = ItemUtil.createItemData(rewards[index]);//_rewardDatas[index];
+            if (obj.data == null)
+            {
+                obj.data = new ItemView(obj as GComponent);
+            }
+            (obj.data as ItemView).SetData(reward);
+            (obj.data as ItemView).SetComItemScale = 0.72f;
+            // (obj.data as ItemView).SetTxtCountScale = 0.8f;
+            (obj.data as ItemView).SetTxtCountPos(185, 155);
+            UI_ComItem.ClearProxy();
+        }
     }
 }

+ 91 - 0
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryRuleView.cs

@@ -0,0 +1,91 @@
+using ET;
+using FairyGUI;
+using UI.CommonGame;
+using UI.Poem;
+using UnityEngine;
+
+namespace GFGGame
+{
+    public class PoemGalleryRuleView : BaseWindow
+    {
+        private UI_PoemGalleryRuleUI _ui;
+        private string _title;
+        private string _content;
+        public override void Dispose()
+        {
+            if (_ui != null)
+            {
+                _ui.Dispose();
+                _ui = null;
+            }
+            base.Dispose();
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_PoemGalleryRuleUI.PACKAGE_NAME;
+            _ui = UI_PoemGalleryRuleUI.Create();
+            this.viewCom = _ui.target;
+            this.viewCom.Center();
+            this.modal = true;
+            viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
+
+            _ui.m_list.itemRenderer = RenderListItem;
+        }
+        protected override void AddEventListener()
+        {
+            base.AddEventListener();
+
+        }
+        protected override void OnShown()
+        {
+            base.OnShown();
+            // this._title = (this.viewData as object[])[0].ToString();
+            // this._content = (this.viewData as object[])[1].ToString();
+            // this._ui.m_txtTitle.text = _title;
+            // this._ui.m_txtContent.text = _content;
+            _ui.m_list.numItems = GalleryRewardCfgArray.Instance.dataArray.Length;
+
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+
+        }
+
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+
+        }
+
+        private void RenderListItem(int index, GObject obj)
+        {
+            GalleryRewardCfg cfg = GalleryRewardCfgArray.Instance.dataArray[index];
+            UI_ListRankRewardItem item = UI_ListRankRewardItem.Proxy(obj);
+            item.m_txtRank.text = cfg.desc;
+            item.m_listReward.data = index;
+            item.m_listReward.itemRenderer = RenderListRewardItem;
+            item.m_listReward.numItems = cfg.itemsArr.Length;
+            UI_ListRankRewardItem.ProxyEnd();
+        }
+        private void RenderListRewardItem(int index, GObject obj)
+        {
+            int rewardIndex = (int)obj.parent.data;
+            int[][] rewards = GalleryRewardCfgArray.Instance.dataArray[rewardIndex].itemsArr;
+            UI_ComItem item = UI_ComItem.Proxy(obj);
+            ItemData reward = ItemUtil.createItemData(rewards[index]);//_rewardDatas[index];
+            if (obj.data == null)
+            {
+                obj.data = new ItemView(obj as GComponent);
+            }
+            (obj.data as ItemView).SetData(reward);
+            (obj.data as ItemView).SetComItemScale = 0.72f;
+            // (obj.data as ItemView).SetTxtCountScale = 0.8f;
+            (obj.data as ItemView).SetTxtCountPos(185, 155);
+            UI_ComItem.ClearProxy();
+        }
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_RuleUI.cs.meta → GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryRuleView.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 35e19e0e89df767478dad944bae71ead
+guid: 503d967b504dff64092f812984d7ca99
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

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

@@ -6,6 +6,21 @@ using UnityEngine;
 
 namespace GFGGame
 {
+    class TabType
+    {
+        /// <summary>
+        /// 首页
+        /// </summary>
+        public static int RECOVER = 0;
+        /// <summary>
+        /// 投稿
+        /// </summary>
+        public static int JOIN = 1;
+        /// <summary>
+        /// 收藏
+        /// </summary>
+        public static int FAVORITES = 2;
+    }
     class RecommendType
     {
         /// <summary>
@@ -38,7 +53,8 @@ namespace GFGGame
     {
         private UI_PoemGalleryUI _ui;
         private GList _list;
-        private List<PoemGalleryData> _galleryDatas = new List<PoemGalleryData>();
+        // 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 _tabIndex = 0;//当前选中大页签下标,首页0投稿1收藏2
@@ -123,8 +139,8 @@ namespace GFGGame
             }
             else
             {
-                _tabIndex = 0;
-                _subtabIndex = 0;
+                _tabIndex = TabType.RECOVER;
+                _subtabIndex = RecommendType.RECOMMEND;
                 _ui.m_comNormal.m_comBoBox.selectedIndex = 0;
                 _ui.m_comNormal.m_c1.selectedIndex = _subtabIndex;
                 _ui.m_comFavorites.m_c1.selectedIndex = _subtabIndex;
@@ -171,15 +187,32 @@ namespace GFGGame
             ViewManager.GoBackFrom(typeof(PoemGalleryView).FullName);
         }
 
+        /// <summary>
+        /// 积分商店
+        /// </summary>
+        private void OnBtnShopClick()
+        {
+            object[] gobackParamDatas = new object[] { _tabIndex, _subtabIndex, _ui.m_comNormal.m_comBoBox.selectedIndex };
+            ViewManager.Show<ClothingShopView>(new object[] { ConstStoreId.GALLERY_STORE_ID }, new object[] { typeof(PoemGalleryView).FullName, gobackParamDatas }, true);
+        }
 
+        /// <summary>
+        /// 排行榜奖励
+        /// </summary>
+        private void OnBtnRewardClick()
+        {
+            ViewManager.Show<PoemGalleryRewardView>(null, new object[] { typeof(PoemGalleryView).FullName, this.viewData });
+        }
 
+
+        /********************************************************页签切换*************************************************/
         /// <summary>
         /// 首页
         /// </summary>
         private void OnBtnRecoverClick()
         {
 
-            if (_tabIndex == 0 && _ui.m_comNormal.m_c1.selectedIndex == RecommendType.RECOMMEND)//当前在推荐页要刷新
+            if (_tabIndex == TabType.RECOVER && _ui.m_comNormal.m_c1.selectedIndex == RecommendType.RECOMMEND)//当前在推荐页要刷新
             {
                 PullDown();
                 onPullDownRelease();
@@ -226,7 +259,8 @@ namespace GFGGame
             _subtabIndex = _ui.m_comNormal.m_c1.selectedIndex;
             if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RANK)//排行榜
             {
-
+                _galleryDatas = PoemGalleryDataManager.Instance.RankDatas;
+                ReqGalleryRankList();
             }
             else
             {
@@ -281,6 +315,8 @@ namespace GFGGame
 
         }
 
+        /********************************************************请求更新列表*************************************************/
+
         //分页刷新
         private void onScroll()
         {
@@ -298,36 +334,38 @@ namespace GFGGame
         {
             PoemGallerySProxy.ReqGalleryList(_sortType, startIndex, _pageCount).Coroutine();
         }
-
         private void UpdateGalleryList()
         {
             _list.numItems = _galleryDatas.Count;
             UpdateView();
         }
+
+        //请求排行榜刷新
+        private void ReqGalleryRankList()
+        {
+            PoemGallerySProxy.ReqRankList().Coroutine();
+        }
         private void UpdateGalleryRankList()
         {
             _ui.m_comNormal.m_listRank.numItems = _galleryDatas.Count;
             UpdateView();
         }
 
-
-        /// <summary>
-        /// 积分商店
-        /// </summary>
-        private void OnBtnShopClick()
+        private void RefreshList()
         {
-            object[] gobackParamDatas = new object[] { _tabIndex, _subtabIndex, _ui.m_comNormal.m_comBoBox.selectedIndex };
-            ViewManager.Show<ClothingShopView>(new object[] { ConstStoreId.GALLERY_STORE_ID }, new object[] { typeof(PoemGalleryView).FullName, gobackParamDatas }, true);
+            if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RANK)
+            {
+                _ui.m_comNormal.m_listRank.RefreshVirtualList();
+            }
+            else
+            {
+                _list.RefreshVirtualList();
+            }
+            UpdateView();
         }
 
-        /// <summary>
-        /// 排行榜奖励
-        /// </summary>
-        private void OnBtnRewardClick()
-        {
-            ViewManager.Show<PoemGalleryRewardView>(null, new object[] { typeof(PoemGalleryView).FullName, this.viewData });
-        }
 
+        /********************************************************界面更新*************************************************/
         private void UpdateView()
         {
             GalleryThemeCfg themeCfg = GalleryThemeCfgArray.Instance.GetCfg((int)PoemGalleryDataManager.Instance.ThemeId);
@@ -335,10 +373,13 @@ namespace GFGGame
             _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_grpResult.visible = PoemGalleryDataManager.Instance.IsResulting();
         }
+
         private void RenderListItem(int index, GObject obj)
         {
-            // PoemGalleryData data = _galleryDatas[index];
+            // long workId = _galleryDatas[index];
+            // PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
             UI_ListItem item = UI_ListItem.Proxy(obj);
             // item.m_loaIcon.height = 550 + Random.Range(40, 100);
             // if (index > 1)
@@ -357,17 +398,17 @@ namespace GFGGame
             // {
             //     item.m_loaIcon.onClick.Add(OnLoaIconClick);
             // }
-            // item.m_loaIcon.data = data;
+            // item.m_loaIcon.data = workId;
             // if (item.m_btnCollect.data == null)
             // {
             //     item.m_btnCollect.onClick.Add(OnBtnCollectClick);
             // }
-            // item.m_btnCollect.data = data;
+            // item.m_btnCollect.data = workId;
             // if (item.m_btnVote.data == null)
             // {
             //     item.m_btnVote.onClick.Add(OnBtnVoteClick);
             // }
-            // item.m_btnVote.data = data;
+            // item.m_btnVote.data = workId;
             UI_ListItem.ProxyEnd();
 
         }
@@ -375,67 +416,119 @@ namespace GFGGame
 
         private void RenderListRankItem(int index, GObject obj)
         {
+            // long workId = _galleryDatas[index];
+            // PoemGalleryData data = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
+            // UI_ListRankItem item = UI_ListRankItem.Proxy(obj);
+            // item.m_loaIcon.height = 550 + Random.Range(40, 100);
+
+            // 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)
+            // {
+            //     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();
         }
 
 
+
         private void OnLoaIconClick(EventContext context)
         {
             GObject obj = context.data as GObject;
-            PoemGalleryData data = obj.data as PoemGalleryData;
+            // PoemGalleryData data = obj.data as PoemGalleryData;
+            long workId = (long)obj.data;
             object[] gobackParamDatas = new object[] { _tabIndex, _subtabIndex, _ui.m_comNormal.m_comBoBox.selectedIndex };
-            ViewManager.Show<PoemGalleryPreviewView>(new object[] { _sortType, data }, new object[] { typeof(PoemGalleryView).FullName, gobackParamDatas });
+            ViewManager.Show<PoemGalleryPreviewView>(new object[] { _sortType, workId }, new object[] { typeof(PoemGalleryView).FullName, gobackParamDatas });
         }
 
         private async void OnBtnCollectClick(EventContext context)
         {
             GObject obj = context.data as GObject;
-            PoemGalleryData galleryData = obj.data as PoemGalleryData;
+            long workId = (long)obj.data;
+            PoemGalleryData galleryData = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
+
             if (galleryData.CollectOrNot)
             {
-                bool result = await PoemGallerySProxy.ReqCancelCollecteGalleryWorks(galleryData.WorkId);
+                bool result = await PoemGallerySProxy.ReqCancelCollecteGalleryWorks(workId);
                 if (result)
                 {
-                    galleryData.CollectOrNot = false;
-                    galleryData.CollectCount = galleryData.CollectCount - 1;
-                    UpdateView();
-                    if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RANK)
+                    // galleryData.CollectOrNot = false;
+                    // galleryData.CollectCount = galleryData.CollectCount - 1;
+
+                    if (_tabIndex == TabType.FAVORITES && _subtabIndex == FavoritesType.FAVORITE)
                     {
-                        _ui.m_comNormal.m_listRank.RefreshVirtualList();
+                        ReqGalleryList(0);//当前为收藏页要重新拉取数据
                     }
                     else
                     {
-                        _list.RefreshVirtualList();
+                        RefreshList();
                     }
                 }
             }
             else
             {
-                bool result = await PoemGallerySProxy.ReqCollecteGalleryWorks(galleryData.WorkId);
+                bool result = await PoemGallerySProxy.ReqCollecteGalleryWorks(workId);
                 if (result)
                 {
-                    galleryData.CollectOrNot = true;
-                    galleryData.CollectCount = galleryData.CollectCount + 1;
-                    UpdateView();
-                    if (_ui.m_comNormal.m_c1.selectedIndex == RecommendType.RANK)
+                    // galleryData.CollectOrNot = true;
+                    // galleryData.CollectCount = galleryData.CollectCount + 1;
+                    if (_tabIndex == TabType.FAVORITES && _subtabIndex == FavoritesType.FAVORITE)
                     {
-                        _ui.m_comNormal.m_listRank.RefreshVirtualList();
+                        ReqGalleryList(0);//当前为收藏页要重新拉取数据
                     }
                     else
                     {
-                        _list.RefreshVirtualList();
+                        RefreshList();
                     }
                 }
             }
         }
 
-        private void OnBtnVoteClick(EventContext context)
+        private async void OnBtnVoteClick(EventContext context)
         {
             GObject obj = context.data as GObject;
-            PoemGalleryData data = obj.data as PoemGalleryData;
+            // PoemGalleryData galleryData = obj.data as PoemGalleryData;
+            long workId = (long)obj.data;
+            PoemGalleryData galleryData = PoemGalleryDataManager.Instance.GetGalleryDataById(workId);
+
+            if (galleryData.VoteOrNot) return;
+            bool result = await PoemGallerySProxy.ReqVoteGalleryWorks(workId);
+            if (result)
+            {
+                // galleryData.VoteOrNot = true;
+                // galleryData.CollectCount = galleryData.CollectCount + 1;
+                RefreshList();
 
+                int Count = GameGlobal.myNumericComponent.GetAsInt(NumericType.LikeGalleryWorksCountDaily);
+                GalleryIntegralCfg integralCfg = GalleryIntegralCfgArray.Instance.GetCfg(Count);
+                if (integralCfg != null)
+                {
+                    ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(integralCfg.itemId);
+                    PromptController.Instance.ShowFloatTextPrompt(string.Format("{0} +{1}", itemCfg.name, integralCfg.Count));
+                }
+            }
         }
 
+
+        /********************************************************下拉刷新*************************************************/
         private void PullDown()
         {
             if (_ui.m_comNormal.m_listRecommend.numItems > 0) _ui.m_comNormal.m_listRecommend.ScrollToView(0);
@@ -456,6 +549,7 @@ namespace GFGGame
             _ui.m_comNormal.m_listRecommend.scrollPane.LockHeader(header.sourceHeight);
             Timers.inst.Add(2, 1, OnTimeComplete);
         }
+
         private void OnTimeComplete(object param)
         {
             GComponent header = _ui.m_comNormal.m_listRecommend.scrollPane.header;

BIN
GameClient/Assets/ResIn/UI/Card/Card_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes


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


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


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


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