zhaoyang 2 yıl önce
ebeveyn
işleme
c4cde59174
22 değiştirilmiş dosya ile 254 ekleme ve 274 silme
  1. 5 3
      FGUIProject/assets/Common/components/ComBg.xml
  2. 6 5
      FGUIProject/assets/CommonGame/GoodsItemTips.xml
  3. 28 21
      FGUIProject/assets/CommonGame/ItemExchangeUI.xml
  4. 1 1
      FGUIProject/assets/CommonGame/components/ComItemNew.xml
  5. 15 10
      FGUIProject/assets/CommonGame/components/ComTipsBase.xml
  6. 0 37
      FGUIProject/assets/Store/ItemExchangeUI.xml
  7. 4 4
      FGUIProject/assets/Store/components/ListGiftItem.xml
  8. 3 3
      FGUIProject/assets/Store/components/ListShopItem.xml
  9. 0 1
      FGUIProject/assets/Store/package.xml
  10. 29 43
      GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs
  11. 21 10
      GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs
  12. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComTipsBase.cs
  13. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ItemExchangeUI.cs
  14. 0 113
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_ItemExchangeUI.cs
  15. 75 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreChargeAddUpUI.cs
  16. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreChargeAddUpUI.cs.meta
  17. 17 0
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/GoodsItemTipsView.cs
  18. 43 22
      GameClient/Assets/Game/HotUpdate/Views/Store/ItemExchangeView.cs
  19. BIN
      GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes
  20. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes
  21. BIN
      GameClient/Assets/ResIn/UI/Store/Store_atlas0.png
  22. BIN
      GameClient/Assets/ResIn/UI/Store/Store_fui.bytes

+ 5 - 3
FGUIProject/assets/Common/components/ComBg.xml

@@ -1,11 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="962,1157" overflow="hidden">
   <displayList>
-    <image id="n23_r9ri" name="n23" src="r9ritjk" fileName="imgnew/tc_tydikua_1.png" xy="0,6"/>
-    <image id="n21_si5z" name="n21" src="si5ztie" fileName="imgnew/tc_tydikua_3.png" xy="0,0">
+    <image id="n23_r9ri" name="n23" src="r9ritjk" fileName="components/tc_tydikua_1.png" xy="0,6">
+      <relation target="" sidePair="height-height"/>
+    </image>
+    <image id="n21_si5z" name="n21" src="si5ztie" fileName="components/tc_tydikua_3.png" xy="0,0">
       <relation target="" sidePair="top-top"/>
     </image>
-    <image id="n22_si5z" name="n22" src="si5ztif" fileName="imgnew/tc_tydikua_52.png" xy="0,1143">
+    <image id="n22_si5z" name="n22" src="si5ztif" fileName="components/tc_tydikua_52.png" xy="0,1143">
       <relation target="" sidePair="bottom-bottom"/>
     </image>
   </displayList>

+ 6 - 5
FGUIProject/assets/CommonGame/GoodsItemTips.xml

@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="962,1137" opaque="false">
+<component size="962,1264" opaque="false">
   <displayList>
-    <component id="n21_si5z" name="comBg" src="si5ztih" fileName="components/ComBg.xml" pkg="mk0fwx0x" xy="0,15" size="962,1106">
+    <component id="n21_si5z" name="comBg" src="si5ztih" fileName="components/ComBg.xml" pkg="mk0fwx0x" xy="0,0" size="962,1264">
       <relation target="n17_ohbx" sidePair="height-height,middle-middle"/>
     </component>
-    <component id="n2_s2cc" name="comTipsBase" src="ohbxti3" fileName="components/ComTipsBase.xml" xy="0,30" group="n17_ohbx"/>
-    <component id="n19_ohbx" name="comTipsApproach" src="ohbxti6" fileName="components/ComTipsApproach.xml" xy="0,489" size="962,596" group="n17_ohbx"/>
-    <group id="n17_ohbx" name="grpTips" xy="0,30" size="962,1055" advanced="true" layout="vt" excludeInvisibles="true">
+    <component id="n2_s2cc" name="comTipsBase" src="ohbxti3" fileName="components/ComTipsBase.xml" xy="0,-27" group="n17_ohbx"/>
+    <component id="n19_ohbx" name="comTipsApproach" src="ohbxti6" fileName="components/ComTipsApproach.xml" xy="0,643" size="962,596" group="n17_ohbx"/>
+    <group id="n17_ohbx" name="grpTips" xy="0,-27" size="962,1267" advanced="true" layout="vt" excludeInvisibles="true">
       <relation target="" sidePair="middle-middle"/>
     </group>
   </displayList>
+  <relation target="n17_ohbx" sidePair="height-height"/>
 </component>

+ 28 - 21
FGUIProject/assets/CommonGame/ItemExchangeUI.xml

@@ -1,40 +1,47 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="962,970">
+<component size="962,1025">
   <displayList>
-    <component id="n0_si5z" name="comBg" src="si5ztih" fileName="components/ComBg.xml" pkg="mk0fwx0x" xy="0,-11" size="962,992">
-      <relation target="" sidePair="height-height"/>
+    <component id="n0_si5z" name="comBg" src="si5ztih" fileName="components/ComBg.xml" pkg="mk0fwx0x" xy="0,0" size="962,1025">
+      <relation target="n33_l500" sidePair="height-height"/>
     </component>
     <text id="n5_si5z" name="txtName" xy="65,58" size="186,61" group="n12_si5z" fontSize="46" color="#8a7253" autoClearText="true" text="物品名字"/>
-    <text id="n6_si5z" name="txtOwned" xy="747,80" pivot="1,0" size="134,41" group="n12_si5z" fontSize="30" color="#90877f" vars="true" text="已拥有:{count=20}"/>
+    <text id="n6_si5z" name="txtOwned" xy="752,80" pivot="1,0" size="129,41" group="n12_si5z" fontSize="30" color="#90877f" vars="true" text="已拥有:{count=20}"/>
     <image id="n7_si5z" name="n7" src="si5ztig" fileName="imgnew/tc_xiant.png" xy="56,130" group="n12_si5z"/>
     <loader id="n8_si5z" name="loaRarity" xy="40,164" size="44,94" group="n12_si5z" url="ui://eg2y0ldpd4iw4z" autoSize="true"/>
     <loader id="n9_si5z" name="loaIcon" xy="165,253" pivot="0.5,0.5" anchor="true" size="200,200" group="n12_si5z" aspect="true" autoSize="true"/>
     <image id="n10_si5z" name="n10" src="r9ritjl" fileName="imgnew/tc_kuangk.png" xy="357,167" group="n12_si5z"/>
     <text id="n11_si5z" name="txtDesc" xy="375,189" size="506,166" group="n12_si5z" fontSize="30" color="#998a79" ubb="true" autoSize="none" autoClearText="true" text="手机课程很快就要开课咯!!同学们有没有很期待哇过 几天课上见昂!!28节课希望大家都可以跟下来一起度 过有趣儿的两个月吧。"/>
-    <text id="n28_s5s9" name="txtExchangeCount" xy="237,314" pivot="1,0" size="62,49" group="n12_si5z" fontSize="36" color="#fbf6eb" vars="true" strokeColor="#5c4e3f" strokeSize="2" text="x{count=20}"/>
-    <group id="n12_si5z" name="n12" xy="40,58" size="866,313"/>
-    <image id="n2_si5z" name="n2" src="si5zti8" fileName="imgnew/tc_zszs.png" xy="32,445" size="897,15" group="n4_si5z"/>
-    <text id="n3_si5z" name="txtShow" xy="359,423" size="244,54" group="n4_si5z" fontSize="40" color="#8a7253" text="选择使用数量"/>
-    <group id="n4_si5z" name="n4" xy="32,423" size="897,54"/>
-    <image id="n13_si5z" name="n13" src="si5ztik" fileName="imgnew/tc_tyjjdi.png" xy="197,530" group="n19_si5z"/>
-    <component id="n17_si5z" name="btnMinus" src="si5ztin" fileName="components/Button2.xml" xy="175,528" group="n19_si5z">
+    <text id="n28_s5s9" name="txtExchangeCount" xy="243,314" pivot="1,0" size="56,49" group="n12_si5z" fontSize="36" color="#fbf6eb" vars="true" strokeColor="#5c4e3f" strokeSize="2" text="x{count=20}"/>
+    <group id="n12_si5z" name="n12" xy="40,58" size="866,313" group="n33_l500" advanced="true"/>
+    <list id="n32_l500" name="listItem" xy="205,391" pivot="0.5,0" size="569,131" group="n33_l500" layout="row" colGap="20" defaultItem="ui://eg2y0ldp9jv6tls" align="center">
+      <item/>
+      <item/>
+      <item/>
+    </list>
+    <image id="n2_si5z" name="n2" src="si5zti8" fileName="imgnew/tc_zszs.png" xy="32,564" size="897,15" group="n4_si5z"/>
+    <text id="n3_si5z" name="txtShow" xy="359,542" size="244,54" group="n4_si5z" fontSize="40" color="#8a7253" text="选择使用数量"/>
+    <group id="n4_si5z" name="n4" xy="32,542" size="897,54" group="n34_l500"/>
+    <image id="n13_si5z" name="n13" src="si5ztik" fileName="imgnew/tc_tyjjdi.png" xy="197,619" group="n19_si5z"/>
+    <component id="n17_si5z" name="btnMinus" src="si5ztin" fileName="components/Button2.xml" xy="175,617" group="n19_si5z">
       <Button icon="ui://eg2y0ldps5s9tip"/>
     </component>
-    <component id="n16_si5z" name="btnAdd" src="si5ztip" fileName="components/Button16.xml" xy="490,529" group="n19_si5z"/>
-    <component id="n18_si5z" name="btnMax" src="si5ztio" fileName="components/Button3.xml" xy="597,527" group="n19_si5z">
+    <component id="n16_si5z" name="btnAdd" src="si5ztip" fileName="components/Button16.xml" xy="490,618" group="n19_si5z"/>
+    <component id="n18_si5z" name="btnMax" src="si5ztio" fileName="components/Button3.xml" xy="597,616" group="n19_si5z">
       <Button icon="ui://eg2y0ldpsi5ztil"/>
     </component>
-    <text id="n22_si5z" name="txtCostCount" xy="341,535" pivot="0.5,0" size="48,54" group="n19_si5z" fontSize="40" color="#816e57" text="50"/>
-    <group id="n19_si5z" name="n19" xy="175,527" size="612,70"/>
-    <text id="n24_si5z" name="txtTips" xy="318,648" pivot="0.5,0" size="326,51" group="n26_si5z" fontSize="38" color="#8e7c6b" align="center" text="是否使用1个道具?"/>
-    <component id="n25_si5z" name="comCost" src="n3xha1" fileName="components/ComCostCurrency.xml" xy="416,739" pivot="0.5,0" group="n26_si5z" controller="c1,0"/>
-    <group id="n26_si5z" name="n26" xy="318,648" size="326,137" advanced="true" layout="vt" lineGap="40" excludeInvisibles="true"/>
-    <component id="n14_si5z" name="btnCancle" src="si5ztim" fileName="components/Button1.xml" xy="124,827" group="n20_si5z">
+    <text id="n22_si5z" name="txtCostCount" xy="343,624" pivot="0.5,0" size="43,54" group="n19_si5z" fontSize="40" color="#816e57" text="50"/>
+    <group id="n19_si5z" name="n19" xy="175,616" size="612,70" group="n34_l500"/>
+    <text id="n24_si5z" name="txtTips" xy="319,706" pivot="0.5,0" size="323,51" group="n26_si5z" fontSize="38" color="#8e7c6b" align="center" text="是否使用1个道具?"/>
+    <component id="n25_si5z" name="comCost" src="n3xha1" fileName="components/ComCostCurrency.xml" xy="416,797" pivot="0.5,0" group="n26_si5z" controller="c1,0"/>
+    <group id="n26_si5z" name="n26" xy="318,706" size="326,137" group="n34_l500" advanced="true" layout="vt" lineGap="40" excludeInvisibles="true"/>
+    <component id="n14_si5z" name="btnCancle" src="si5ztim" fileName="components/Button1.xml" xy="124,863" group="n20_si5z">
       <Button icon="ui://eg2y0ldps5s9tim"/>
     </component>
-    <component id="n15_si5z" name="btnConfirm" src="si5ztim" fileName="components/Button1.xml" xy="544,827" size="294,89" group="n20_si5z">
+    <component id="n15_si5z" name="btnConfirm" src="si5ztim" fileName="components/Button1.xml" xy="544,863" size="294,89" group="n20_si5z">
       <Button icon="ui://eg2y0ldps5s9til"/>
     </component>
-    <group id="n20_si5z" name="n20" xy="124,827" size="714,89"/>
+    <group id="n20_si5z" name="n20" xy="124,863" size="714,89" group="n34_l500"/>
+    <group id="n34_l500" name="n34" xy="32,542" size="897,410" group="n33_l500" advanced="true"/>
+    <group id="n33_l500" name="n33" xy="32,58" size="897,894" advanced="true" layout="vt" lineGap="20" excludeInvisibles="true"/>
   </displayList>
 </component>

+ 1 - 1
FGUIProject/assets/CommonGame/components/ComItemNew.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="124,124" overflow="hidden" opaque="false">
+<component size="124,124" pivot="0.5,0.5" overflow="hidden" opaque="false">
   <displayList>
     <component id="n25_pu55" name="comItemIcon" src="9jv6tlt" fileName="components/ComItemIconNew.xml" xy="0,0" pivot="0.5,0.5" aspect="true"/>
     <text id="n15_ehs9" name="txtCount" xy="61,78" pivot="0.5,0" anchor="true" size="97,44" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#ffffff" align="center" vars="true" text="x00200">

+ 15 - 10
FGUIProject/assets/CommonGame/components/ComTipsBase.xml

@@ -1,27 +1,32 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="962,520">
   <displayList>
-    <text id="n1_s2cc" name="txtName" xy="65,50" size="184,61" group="n24_u2u3" fontSize="46" color="#8a7253" autoClearText="true" text="物品名字"/>
-    <text id="n3_s2cc" name="txtOwned" xy="744,72" pivot="1,0" size="137,41" group="n24_u2u3" fontSize="30" color="#90877f" vars="true" text="已拥有:{count=20}"/>
+    <text id="n1_s2cc" name="txtName" xy="65,50" size="186,61" group="n24_u2u3" fontSize="46" color="#8a7253" autoClearText="true" text="物品名字"/>
+    <text id="n3_s2cc" name="txtOwned" xy="752,72" pivot="1,0" size="129,41" group="n24_u2u3" fontSize="30" color="#90877f" vars="true" text="已拥有:{count=20}"/>
     <image id="n7_si5z" name="n7" src="si5ztig" fileName="imgnew/tc_xiant.png" xy="56,122" group="n24_u2u3"/>
     <loader id="n8_si5z" name="loaIcon" xy="187,270" pivot="0.5,0.5" anchor="true" size="200,200" group="n24_u2u3" aspect="true" autoSize="true"/>
     <loader id="n6_ohbx" name="loaRarity" xy="249,156" size="44,94" group="n24_u2u3" url="ui://eg2y0ldpd4iw4z" autoSize="true"/>
     <image id="n20_r9ri" name="n20" src="r9ritjl" fileName="imgnew/tc_kuangk.png" xy="354,162" group="n24_u2u3"/>
     <text id="n9_si5z" name="txtDesc" xy="375,181" size="506,166" group="n24_u2u3" fontSize="30" color="#998a79" ubb="true" autoSize="none" autoClearText="true" text="手机课程很快就要开课咯!!同学们有没有很期待哇过 几天课上见昂!!28节课希望大家都可以跟下来一起度 过有趣儿的两个月吧。"/>
     <group id="n24_u2u3" name="n24" xy="56,50" size="850,320" group="n25_u2u3" advanced="true"/>
-    <image id="n11_si5z" name="n11" src="842s6h" fileName="imagesExport/kp_sx_1.png" xy="75,390" size="50,50" group="n19_si5z"/>
-    <image id="n12_si5z" name="n12" src="842s6i" fileName="imagesExport/kp_sx_2.png" xy="300,390" size="50,50" group="n19_si5z"/>
-    <image id="n13_si5z" name="n13" src="842s6j" fileName="imagesExport/kp_sx_3.png" xy="525,390" size="50,50" group="n19_si5z"/>
-    <image id="n14_si5z" name="n14" src="842s6k" fileName="imagesExport/kp_sx_4.png" xy="750,390" size="50,50" group="n19_si5z"/>
-    <text id="n15_si5z" name="txtGong" xy="135,394" size="72,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
-    <text id="n16_si5z" name="txtShang" xy="360,394" size="72,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
-    <text id="n17_si5z" name="txtJue" xy="585,394" size="72,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
-    <text id="n18_si5z" name="txtZhi" xy="810,394" size="72,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
+    <image id="n11_si5z" name="n11" src="842s6h" fileName="imagesNew/kp_sx_1.png" xy="75,390" size="50,50" group="n19_si5z"/>
+    <image id="n12_si5z" name="n12" src="842s6i" fileName="imagesNew/kp_sx_2.png" xy="300,390" size="50,50" group="n19_si5z"/>
+    <image id="n13_si5z" name="n13" src="842s6j" fileName="imagesNew/kp_sx_3.png" xy="525,390" size="50,50" group="n19_si5z"/>
+    <image id="n14_si5z" name="n14" src="842s6k" fileName="imagesNew/kp_sx_4.png" xy="750,390" size="50,50" group="n19_si5z"/>
+    <text id="n15_si5z" name="txtGong" xy="135,394" size="61,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
+    <text id="n16_si5z" name="txtShang" xy="360,394" size="61,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
+    <text id="n17_si5z" name="txtJue" xy="585,394" size="61,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
+    <text id="n18_si5z" name="txtZhi" xy="810,394" size="61,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
     <group id="n19_si5z" name="grpScore" xy="75,390" size="807,50" group="n25_u2u3" advanced="true"/>
     <list id="n21_u2u3" name="listTag" xy="71,460" size="377,41" group="n25_u2u3" layout="row" colGap="20" defaultItem="ui://eg2y0ldpu2u3tkr">
       <item/>
       <item/>
     </list>
+    <list id="n26_l500" name="listItem" xy="196,521" pivot="0.5,0" size="569,131" group="n25_u2u3" visible="false" layout="row" colGap="20" defaultItem="ui://eg2y0ldp9jv6tls" align="center">
+      <item/>
+      <item/>
+      <item/>
+    </list>
     <group id="n25_u2u3" name="n25" xy="56,50" size="850,451" advanced="true" layout="vt" lineGap="20" excludeInvisibles="true"/>
   </displayList>
   <relation target="n25_u2u3" sidePair="height-height"/>

+ 0 - 37
FGUIProject/assets/Store/ItemExchangeUI.xml

@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<component size="962,695">
-  <displayList>
-    <component id="n0_hinb" name="bg" src="si5ztih" fileName="components/ComBg.xml" pkg="mk0fwx0x" xy="0,0" size="962,695"/>
-    <text id="n5_hinb" name="txtName" xy="426,28" pivot="0.5,0" size="116,74" group="n33_l500" fontSize="56" color="#8f6e30" align="center" text="名字"/>
-    <image id="n19_ai2z" name="n19" src="dmsi1o" fileName="images/sc_tc_kuang_2.png" xy="64,148" group="n21_ai2z"/>
-    <loader id="n4_hinb" name="icon" xy="73,158" size="200,200" group="n21_ai2z" aspect="true"/>
-    <loader id="n17_ugdz" name="rarity" xy="231,158" size="44,94" group="n21_ai2z" url="ui://eg2y0ldpd4iw52" autoSize="true"/>
-    <text id="n28_10not" name="txtNum" xy="145,313" pivot="0.5,0" size="56,49" group="n21_ai2z" fontSize="36" color="#fff7e6" align="center" strokeColor="#816531" text="x10"/>
-    <text id="n29_10not" name="txtLastCount" xy="109,358" pivot="0.5,0" size="123,44" group="n21_ai2z" fontSize="32" color="#bc8068" text="剩余:100"/>
-    <group id="n21_ai2z" name="n21" xy="64,148" size="220,254" group="n33_l500"/>
-    <text id="n30_10not" name="txtHasCount" xy="708,121" size="138,46" group="n33_l500" fontSize="34" color="#a38e66" align="center" ubb="true" text="已拥有:"/>
-    <text id="n31_10not" name="txtDiscribe" xy="331,176" size="546,187" group="n33_l500" fontSize="36" color="#a38b64" autoSize="none" text="描述描述描述描述描述描述描述描述"/>
-    <group id="n33_l500" name="n33" xy="64,28" size="813,374"/>
-    <list id="n35_l500" name="listItem" xy="46,245" size="200,300" overflow="scroll"/>
-    <text id="n32_10not" name="n32" xy="56,422" size="180,59" group="n22_ai2z" fontSize="44" color="#a08249" align="center" text="兑换数量"/>
-    <image id="n8_hinb" name="n8" src="dmsi1p" fileName="images/sc_tc_kuang_3.png" xy="257,429" group="n22_ai2z"/>
-    <text id="n25_t1at" name="txtCount" xy="384,426" size="200,56" group="n22_ai2z" fontSize="42" color="#fdf3d7" align="center" vAlign="middle" autoSize="none" text="找钱"/>
-    <component id="n9_hinb" name="btnPlus" src="hinb5s" fileName="components/ButtonPlus2.xml" pkg="eg2y0ldp" xy="652,421" group="n22_ai2z"/>
-    <component id="n10_hinb" name="btnMinus" src="hinb5t" fileName="components/ButtonMinus1.xml" pkg="eg2y0ldp" xy="248,421" group="n22_ai2z"/>
-    <component id="n23_ai2z" name="btnAll" src="ai2z9f" fileName="components/Button12.xml" pkg="eg2y0ldp" xy="761,417" group="n22_ai2z">
-      <Button icon="ui://p9mtgheodmsi1n"/>
-    </component>
-    <group id="n22_ai2z" name="n22" xy="56,417" size="849,75" group="n34_l500"/>
-    <image id="n18_ai2z" name="n18" src="j48o9a" fileName="images/kp_sjsj_di_4.png" pkg="eg2y0ldp" xy="346,521" size="276,34" group="n16_ugdz"/>
-    <text id="n20_ai2z" name="n20" xy="374,510" size="76,49" group="n27_10not" fontSize="36" color="#a08249" text="花费"/>
-    <loader id="n14_ugdz" name="iconPrice" xy="459,519" size="32,32" group="n27_10not" aspect="true" url="ui://eg2y0ldpq08x3" fill="scale"/>
-    <text id="n15_ugdz" name="txtPrice" xy="500,510" size="74,49" group="n27_10not" fontSize="36" color="#fdf3d7" autoClearText="true" text="9999"/>
-    <group id="n27_10not" name="n27" xy="374,510" size="219,49" group="n16_ugdz"/>
-    <group id="n16_ugdz" name="n16" xy="346,510" size="276,49" group="n34_l500" advanced="true"/>
-    <component id="n6_hinb" name="btnExchange" src="q08x7" fileName="components/Button2.xml" pkg="mk0fwx0x" xy="294,566" group="n34_l500">
-      <Button title="购买"/>
-    </component>
-    <group id="n34_l500" name="n34" xy="56,417" size="849,260"/>
-  </displayList>
-  <relation target="n0_hinb" sidePair="height-height"/>
-</component>

+ 4 - 4
FGUIProject/assets/Store/components/ListGiftItem.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="460,270" overflow="hidden">
-  <controller name="c1" alias="礼包购买状态" pages="0,,1," selected="0">
+  <controller name="c1" alias="礼包购买状态" pages="0,,1," selected="1">
     <remark page="0" value="可购买"/>
     <remark page="1" value="已售罄"/>
   </controller>
@@ -12,9 +12,9 @@
     <image id="n22_10not" name="n22" src="hhx91f" fileName="imagesNew/GiftBag_baseboard1.png" xy="26,0"/>
     <image id="n47_l500" name="imgDouble" src="hhx9v" fileName="imagesNew/font_save_baseboard.png" xy="0,-1" group="n26_10not"/>
     <text id="n48_l500" name="n48" xy="17,7" size="69,46" group="n26_10not" fontSize="34" color="#ffffff" letterSpacing="-2" text="超值"/>
-    <text id="n49_l500" name="txtDesc" xy="18,32" pivot="0.5,0" size="55,51" group="n51_l500" fontSize="38" color="#ffffff" align="center" letterSpacing="-2" strokeColor="#cc3300" text="800"/>
-    <text id="n50_l500" name="n50" xy="67,45" size="19,31" group="n51_l500" fontSize="22" color="#ffffff" letterSpacing="-2" text="%"/>
-    <group id="n51_l500" name="n51" xy="18,32" size="68,52" group="n26_10not" advanced="true" layout="hz" colGap="-6" excludeInvisibles="true">
+    <text id="n49_l500" name="txtDesc" xy="13,32" pivot="0.5,0" size="55,51" group="n51_l500" fontSize="38" color="#ffffff" align="center" letterSpacing="-2" strokeColor="#cc3300" text="800"/>
+    <text id="n50_l500" name="n50" xy="68,42" size="22,36" group="n51_l500" fontSize="26" color="#ffffff" letterSpacing="-2" text="%"/>
+    <group id="n51_l500" name="n51" xy="13,32" size="77,51" group="n26_10not" advanced="true" layout="hz" excludeInvisibles="true">
       <relation target="" sidePair="center-center"/>
     </group>
     <group id="n26_10not" name="grpDiscount" xy="0,-1" size="100,96" advanced="true"/>

+ 3 - 3
FGUIProject/assets/Store/components/ListShopItem.xml

@@ -12,9 +12,9 @@
     <image id="n22_10not" name="n22" src="hhx9w" fileName="imagesNew/GiftBag_baseboard.png" xy="0,0"/>
     <image id="n47_l500" name="imgDouble" src="hhx9v" fileName="imagesNew/font_save_baseboard.png" xy="191,263" group="n26_10not"/>
     <text id="n48_l500" name="n48" xy="208,271" size="69,46" group="n26_10not" fontSize="34" color="#ffffff" letterSpacing="-2" text="超值"/>
-    <text id="n49_l500" name="txtDesc" xy="205,301" pivot="0.5,0" size="55,51" group="n51_l500" fontSize="38" color="#ffffff" align="center" letterSpacing="-2" strokeColor="#cc3300" text="800"/>
-    <text id="n50_l500" name="n50" xy="254,314" size="19,31" group="n51_l500" fontSize="22" color="#ffffff" letterSpacing="-2" text="%"/>
-    <group id="n51_l500" name="n51" xy="205,301" size="68,51" group="n26_10not" advanced="true" layout="hz" colGap="-6" excludeInvisibles="true">
+    <text id="n49_l500" name="txtDesc" xy="207,301" pivot="0.5,0" size="55,51" group="n51_l500" fontSize="38" color="#ffffff" align="center" letterSpacing="-2" strokeColor="#cc3300" text="800"/>
+    <text id="n50_l500" name="n50" xy="262,310" size="22,36" group="n51_l500" fontSize="26" color="#ffffff" letterSpacing="-2" text="%"/>
+    <group id="n51_l500" name="n51" xy="207,301" size="77,51" group="n26_10not" advanced="true" layout="hz" excludeInvisibles="true">
       <relation target="" sidePair="center-center"/>
     </group>
     <group id="n26_10not" name="grpDiscount" xy="191,263" size="100,96" advanced="true"/>

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

@@ -64,7 +64,6 @@
     <image id="fqortb7" name="sc_beijing_shang.png" path="/imagesNew/"/>
     <image id="fqortb8" name="sc_yeqian_zhedang.png" path="/imagesNew/"/>
     <component id="10not1v" name="GiftBagBuyUI.xml" path="/" exported="true"/>
-    <component id="10nota8" name="ItemExchangeUI.xml" path="/" exported="true"/>
     <component id="fqor7x" name="StoreUI.xml" path="/" exported="true"/>
     <component id="hhx90" name="ComZhuangShi.xml" path="/components/"/>
     <image id="hhx91" name="VipLevel_baseboard.png" path="/imagesNew/"/>

+ 29 - 43
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -5,20 +5,6 @@ using ET;
 
 namespace GFGGame
 {
-    public class LockType
-    {
-        public static int NONE = 0;
-        public static int STORY_LV = 1;
-        public static int ROLE_LV = 2;
-        public static int MONTH_CARD_TYPE = 3;
-    }
-
-    public class CostType
-    {
-        public static int FREE = 0;
-        public static int ITEM = 1;
-        public static int RMB = 2;
-    }
 
     public class ShopDataManager : SingletonBase<ShopDataManager>
     {
@@ -149,15 +135,15 @@ namespace GFGGame
         {
             return !_goodsDic.ContainsKey(goodsId) ? 0 : _goodsDic[goodsId];
         }
-        /// <summary>
-        /// 根据充值id获取购买次数
-        /// </summary>
-        /// <param name="exchangeId"></param>
-        /// <returns></returns>
-        public int GetExchangeBuyNumById(int exchangeId)
-        {
-            return !_exchangeDic.ContainsKey(exchangeId) ? 0 : _exchangeDic[exchangeId];
-        }
+        // /// <summary>
+        // /// 根据充值id获取购买次数
+        // /// </summary>
+        // /// <param name="exchangeId"></param>
+        // /// <returns></returns>
+        // public int GetExchangeBuyNumById(int exchangeId)
+        // {
+        //     return !_exchangeDic.ContainsKey(exchangeId) ? 0 : _exchangeDic[exchangeId];
+        // }
 
 
         public List<GiftBagCfg> GetGiftBagCfgs()
@@ -278,20 +264,20 @@ namespace GFGGame
             return giftBagCfgs[0];
         }
 
-        public List<ShopExchangeCfg> GetExchangeCfgs()
-        {
-            List<ShopExchangeCfg> shopExchangeCfgs = new List<ShopExchangeCfg>(ShopExchangeCfgArray.Instance.dataArray);
-            shopExchangeCfgs.Sort((ShopExchangeCfg a, ShopExchangeCfg b) =>
-            {
-                //未售罄的>已售罄的
-                int buyTypeA = (a.maxLimit == 0 || a.maxLimit - GetExchangeBuyNumById(a.id) > 0) ? 1 : -1;
-                int buyTypeB = (b.maxLimit == 0 || b.maxLimit - GetExchangeBuyNumById(b.id) > 0) ? 1 : -1;
-                if (buyTypeA > buyTypeB) return -1;
-                if (buyTypeA < buyTypeB) return 1;
-                return 0;
-            });
-            return shopExchangeCfgs;
-        }
+        // public List<ShopExchangeCfg> GetExchangeCfgs()
+        // {
+        //     List<ShopExchangeCfg> shopExchangeCfgs = new List<ShopExchangeCfg>(ShopExchangeCfgArray.Instance.dataArray);
+        //     shopExchangeCfgs.Sort((ShopExchangeCfg a, ShopExchangeCfg b) =>
+        //     {
+        //         //未售罄的>已售罄的
+        //         int buyTypeA = (a.maxLimit == 0 || a.maxLimit - GetExchangeBuyNumById(a.id) > 0) ? 1 : -1;
+        //         int buyTypeB = (b.maxLimit == 0 || b.maxLimit - GetExchangeBuyNumById(b.id) > 0) ? 1 : -1;
+        //         if (buyTypeA > buyTypeB) return -1;
+        //         if (buyTypeA < buyTypeB) return 1;
+        //         return 0;
+        //     });
+        //     return shopExchangeCfgs;
+        // }
         /// <summary>
         /// 根据商品Id获取商品是否解锁解锁
         /// /// </summary>
@@ -307,15 +293,15 @@ namespace GFGGame
             }
             else if (cfg.lockType == LockType.STORY_LV)
             {
-                return InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
+                return InstanceZonesDataManager.CheckLevelPass(cfg.lockValue);
             }
             else if (cfg.lockType == LockType.ROLE_LV)
             {
-                return GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) >= cfg.lv;
+                return GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) >= cfg.lockValue;
             }
             else if (cfg.lockType == LockType.MONTH_CARD_TYPE)
             {
-                return RoleDataManager.CheckIsMonthCardOpenByType(cfg.MonthlyCardType);
+                return RoleDataManager.CheckIsMonthCardOpenByType(cfg.lockValue);
             }
             return true;
         }
@@ -329,16 +315,16 @@ namespace GFGGame
             ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(goodsId);
             if (shopCfg.lockType == LockType.STORY_LV)
             {
-                StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(shopCfg.storyLevelId);
+                StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(shopCfg.lockValue);
                 return string.Format("通关{0}-{1}解锁", StoryUtil.GetChapterOrder(storyLevelCfg.chapterId), storyLevelCfg.order);
             }
             else if (shopCfg.lockType == LockType.ROLE_LV)
             {
-                return string.Format("角色达到{0}级解锁", shopCfg.lv);
+                return string.Format("角色达到{0}级解锁", shopCfg.lockValue);
             }
             else if (shopCfg.lockType == LockType.MONTH_CARD_TYPE)
             {
-                return string.Format("开通{0}解锁", shopCfg.MonthlyCardType == MonthCardType.Gold ? "金卡" : "黑金卡");
+                return string.Format("开通{0}解锁", shopCfg.lockValue == MonthCardType.Gold ? "金卡" : "黑金卡");
             }
             return "";
         }

+ 21 - 10
GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs

@@ -102,32 +102,43 @@ namespace GFGGame
 
             if (item.target.data == null)
             {
-                item.target.onClick.Add(OnBtnBuyClick);
+                item.target.onClick.Add(OnBtnBugItem);
             }
-            item.target.data = shopCfg.id;
+            item.target.data = shopCfg;
             bool isRed = item.m_c1.selectedIndex == 0 && item.m_c2.selectedIndex == 0 && shopCfg.price == 0;
 
             RedDotController.Instance.SetComRedDot(item.target, isRed, "", -6, 100);
             UI_ListShopItem.ProxyEnd();
         }
 
-        private void OnBtnBuyClick(EventContext context)
+        private async void OnBtnBugItem(EventContext context)
         {
-            GObject btn = context.sender as GObject;
-            int giftId = (int)btn.data;
-            ShopCfg cfg = ShopCfgArray.Instance.GetCfg(giftId);
-            if (cfg.maxBuyNum != 0 && ShopDataManager.Instance.GetGoodsBuyNumById(giftId) == cfg.maxBuyNum)
+            ShopCfg cfg = (context.sender as GObject).data as ShopCfg;
+            bool isSellOut = cfg.maxBuyNum > 0 && cfg.maxBuyNum - ShopDataManager.Instance.GetGoodsBuyNumById(cfg.id) <= 0;
+            if (isSellOut)
             {
                 PromptController.Instance.ShowFloatTextPrompt("已售罄");
                 return;
             }
-            if (cfg.price == 0 || cfg.costType == CostType.FREE)
+            if (cfg.costType == CostType.RMB)
             {
-                RechargeSProxy.ReqBuyGiftBag((int)btn.data).Coroutine();
+                if (!AntiAddictionController.CheckAntiAddictionRecharge(cfg.price))
+                {
+                    RechargeSProxy.ReqRecharge(cfg.id).Coroutine();
+                    LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
+                }
+            }
+            else if (cfg.costType == CostType.FREE)
+            {
+                bool result = await RechargeSProxy.ReqExchangeShopItem(cfg.id, 1);
+                if (result)
+                {
+                    LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
+                }
             }
             else
             {
-                ViewManager.Show<GiftBagBuyView>(btn.data);
+                ViewManager.Show<ItemExchangeView>(cfg.id);
             }
         }
     }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComTipsBase.cs

@@ -18,6 +18,7 @@ namespace UI.CommonGame
         public GTextField m_txtZhi;
         public GGroup m_grpScore;
         public GList m_listTag;
+        public GList m_listItem;
         public const string URL = "ui://eg2y0ldpohbxti3";
         public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComTipsBase";
@@ -76,6 +77,7 @@ namespace UI.CommonGame
             m_txtZhi = (GTextField)comp.GetChild("txtZhi");
             m_grpScore = (GGroup)comp.GetChild("grpScore");
             m_listTag = (GList)comp.GetChild("listTag");
+            m_listItem = (GList)comp.GetChild("listItem");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -90,6 +92,7 @@ namespace UI.CommonGame
             m_txtZhi = null;
             m_grpScore = null;
             m_listTag = null;
+            m_listItem = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ItemExchangeUI.cs

@@ -14,6 +14,7 @@ namespace UI.CommonGame
         public GLoader m_loaIcon;
         public GTextField m_txtDesc;
         public GTextField m_txtExchangeCount;
+        public GList m_listItem;
         public GTextField m_txtShow;
         public UI_Button2 m_btnMinus;
         public UI_Button16 m_btnAdd;
@@ -77,6 +78,7 @@ namespace UI.CommonGame
             m_loaIcon = (GLoader)comp.GetChild("loaIcon");
             m_txtDesc = (GTextField)comp.GetChild("txtDesc");
             m_txtExchangeCount = (GTextField)comp.GetChild("txtExchangeCount");
+            m_listItem = (GList)comp.GetChild("listItem");
             m_txtShow = (GTextField)comp.GetChild("txtShow");
             m_btnMinus = (UI_Button2)UI_Button2.Create(comp.GetChild("btnMinus"));
             m_btnAdd = (UI_Button16)UI_Button16.Create(comp.GetChild("btnAdd"));
@@ -96,6 +98,7 @@ namespace UI.CommonGame
             m_loaIcon = null;
             m_txtDesc = null;
             m_txtExchangeCount = null;
+            m_listItem = null;
             m_txtShow = null;
             m_btnMinus.Dispose();
             m_btnMinus = null;

+ 0 - 113
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_ItemExchangeUI.cs

@@ -1,113 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.Store
-{
-    public partial class UI_ItemExchangeUI
-    {
-        public GComponent target;
-        public GComponent m_bg;
-        public GTextField m_txtName;
-        public GLoader m_icon;
-        public GLoader m_rarity;
-        public GTextField m_txtNum;
-        public GTextField m_txtLastCount;
-        public GTextField m_txtHasCount;
-        public GTextField m_txtCount;
-        public GButton m_btnPlus;
-        public GButton m_btnMinus;
-        public GButton m_btnAll;
-        public GLoader m_iconPrice;
-        public GTextField m_txtPrice;
-        public GButton m_btnExchange;
-        public GTextField m_txtDiscribe;
-        public const string URL = "ui://p9mtgheo10nota8";
-        public const string PACKAGE_NAME = "Store";
-        public const string RES_NAME = "ItemExchangeUI";
-        private static UI_ItemExchangeUI _proxy;
-
-        public static UI_ItemExchangeUI Create(GObject gObject = null)
-        {
-            var ui = new UI_ItemExchangeUI();
-            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_ItemExchangeUI Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ItemExchangeUI();
-            }
-            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_bg = (GComponent)comp.GetChild("bg");
-            m_txtName = (GTextField)comp.GetChild("txtName");
-            m_icon = (GLoader)comp.GetChild("icon");
-            m_rarity = (GLoader)comp.GetChild("rarity");
-            m_txtNum = (GTextField)comp.GetChild("txtNum");
-            m_txtLastCount = (GTextField)comp.GetChild("txtLastCount");
-            m_txtHasCount = (GTextField)comp.GetChild("txtHasCount");
-            m_txtCount = (GTextField)comp.GetChild("txtCount");
-            m_btnPlus = (GButton)comp.GetChild("btnPlus");
-            m_btnMinus = (GButton)comp.GetChild("btnMinus");
-            m_btnAll = (GButton)comp.GetChild("btnAll");
-            m_iconPrice = (GLoader)comp.GetChild("iconPrice");
-            m_txtPrice = (GTextField)comp.GetChild("txtPrice");
-            m_btnExchange = (GButton)comp.GetChild("btnExchange");
-            m_txtDiscribe = (GTextField)comp.GetChild("txtDiscribe");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_bg = null;
-            m_txtName = null;
-            m_icon = null;
-            m_rarity = null;
-            m_txtNum = null;
-            m_txtLastCount = null;
-            m_txtHasCount = null;
-            m_txtCount = null;
-            m_btnPlus = null;
-            m_btnMinus = null;
-            m_btnAll = null;
-            m_iconPrice = null;
-            m_txtPrice = null;
-            m_btnExchange = null;
-            m_txtDiscribe = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 75 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreChargeAddUpUI.cs

@@ -0,0 +1,75 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Store
+{
+    public partial class UI_StoreChargeAddUpUI
+    {
+        public GComponent target;
+        public UI_ComVipLv m_comVipLv;
+        public GList m_list;
+        public const string URL = "ui://p9mtgheol500tbf";
+        public const string PACKAGE_NAME = "Store";
+        public const string RES_NAME = "StoreChargeAddUpUI";
+        private static UI_StoreChargeAddUpUI _proxy;
+
+        public static UI_StoreChargeAddUpUI Create(GObject gObject = null)
+        {
+            var ui = new UI_StoreChargeAddUpUI();
+            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_StoreChargeAddUpUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_StoreChargeAddUpUI();
+            }
+            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_comVipLv = (UI_ComVipLv)UI_ComVipLv.Create(comp.GetChild("comVipLv"));
+            m_list = (GList)comp.GetChild("list");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_comVipLv.Dispose();
+            m_comVipLv = null;
+            m_list = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_ItemExchangeUI.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreChargeAddUpUI.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 0adf97d266705df459244c1dcea99270
+guid: 86fc32513afb09e4da7f6bf7406b9557
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 17 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GoodsItemTipsView.cs

@@ -38,6 +38,7 @@ namespace GFGGame
             approachView.OnInit(_ui.m_comTipsApproach.target);
 
             _ui.m_comTipsBase.m_listTag.itemRenderer = RenderListTagItem;
+            _ui.m_comTipsBase.m_listItem.itemRenderer = ListItemRenderer;
         }
         protected override void AddEventListener()
         {
@@ -54,6 +55,7 @@ namespace GFGGame
             UpdateBase();
             UpdateScore();
             UpdateTags();
+            UpdateItems();
             UpdateSourec(sourceDatas);
             // this.viewCom.height = _ui.m_grpTips.height;
             // this.viewCom.Center();
@@ -114,6 +116,21 @@ namespace GFGGame
             item.m_txtTagScore.text = itemCfg.tagsArr[index][1].ToString();
             UI_ListTagItem.ProxyEnd();
         }
+        private void UpdateItems()
+        {
+            _ui.m_comTipsBase.m_listItem.visible = itemCfg.itemsArr.Length > 0;
+            _ui.m_comTipsBase.m_listItem.numItems = itemCfg.itemsArr.Length;
+        }
+        private void ListItemRenderer(int index, GObject obj)
+        {
+            ItemData itemData = ItemUtil.createItemData(itemCfg.itemsArr[index]);
+            if (obj.data == null)
+            {
+                obj.data = new ItemView(obj as GComponent);
+            }
+            (obj.data as ItemView).SetData(itemData);
+            (obj.data as ItemView).ChangeTxtCountStyle();
+        }
         private void UpdateSourec(object[] sourceDatas)
         {
             _ui.m_comTipsApproach.target.visible = sourceDatas != null;

+ 43 - 22
GameClient/Assets/Game/HotUpdate/Views/Store/ItemExchangeView.cs

@@ -2,14 +2,14 @@ using System;
 using ET;
 using FairyGUI;
 using UI.CommonGame;
-// using UI.RechargeStore;
 
 namespace GFGGame
 {
     public class ItemExchangeView : BaseWindow
     {
         private UI_ItemExchangeUI _ui;
-        private int _exchangeId;
+        private ShopCfg _shopCfg;
+        private int _goodIds;
         private long _buyCount = 0;
         private long _maxCanBuy = 0;
         public override void Dispose()
@@ -41,25 +41,37 @@ namespace GFGGame
             _ui.m_btnMax.target.onClick.Add(OnBtnAllClick);
             _ui.m_btnConfirm.onClick.Add(OnBtnExchangeClick);
             _ui.m_btnCancle.onClick.Add(this.Hide);
+
+            _ui.m_listItem.itemRenderer = ListItemRenderer;
         }
 
         protected override void OnShown()
         {
             base.OnShown();
 
-            _exchangeId = (int)this.viewData;
-            ShopExchangeCfg cfg = ShopExchangeCfgArray.Instance.GetCfg(_exchangeId);
+            _goodIds = (int)this.viewData;
+            _shopCfg = ShopCfgArray.Instance.GetCfg(_goodIds);
 
             _buyCount = 1;
-            long curMoneyCanBuy = ItemDataManager.GetItemNum(cfg.costId) / cfg.costNum;
-            if (cfg.maxLimit == 0)
+            if (_shopCfg.costType == CostType.RMB)
             {
-                _maxCanBuy = Math.Min(curMoneyCanBuy, GameConst.MAX_COUNT_TO_BUY_ITEMS);
+                _maxCanBuy = 1;
             }
             else
             {
-                int lastBuyCount = cfg.maxLimit - ShopDataManager.Instance.GetExchangeBuyNumById(cfg.id);//剩余购买次数
-                _maxCanBuy = Math.Min(curMoneyCanBuy, lastBuyCount);
+                long curMoneyCanBuy = ItemDataManager.GetItemNum(_shopCfg.costId) / _shopCfg.price;
+
+                if (_shopCfg.maxBuyNum == 0)
+                {
+
+                    _maxCanBuy = Math.Min(curMoneyCanBuy, GameConst.MAX_COUNT_TO_BUY_ITEMS);
+                }
+                else
+                {
+                    int lastBuyCount = _shopCfg.maxBuyNum - ShopDataManager.Instance.GetGoodsBuyNumById(_shopCfg.id);//剩余购买次数
+                    _maxCanBuy = Math.Min(curMoneyCanBuy, lastBuyCount);
+                }
+
             }
             _maxCanBuy = Math.Max(1, _maxCanBuy);
             _ui.m_txtExchangeCount.visible = true;
@@ -69,26 +81,35 @@ namespace GFGGame
         }
         private void UpdateStaticView()
         {
-            ShopExchangeCfg cfg = ShopExchangeCfgArray.Instance.GetCfg(_exchangeId);
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemId);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_shopCfg.itemId);
             _ui.m_txtName.text = itemCfg.name;
             _ui.m_txtDesc.text = string.IsNullOrEmpty(itemCfg.desc) ? "暂无描述" : itemCfg.desc;
-            _ui.m_txtOwned.SetVar("count", ItemDataManager.GetItemNum(cfg.itemId).ToString()).FlushVars();
+            _ui.m_txtOwned.SetVar("count", ItemDataManager.GetItemNum(_shopCfg.itemId).ToString()).FlushVars();
             _ui.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
             _ui.m_loaRarity.visible = false;
-            if (ItemUtilCS.IsDressUpItem(cfg.itemId))
+            if (ItemUtilCS.IsDressUpItem(_shopCfg.itemId))
             {
                 _ui.m_loaRarity.visible = true;
-                RarityIconController.UpdateRarityIcon(_ui.m_loaRarity, cfg.itemId, false);
+                RarityIconController.UpdateRarityIcon(_ui.m_loaRarity, _shopCfg.itemId, false);
+            }
+            _ui.m_listItem.numItems = itemCfg.itemsArr.Length;
+            _ui.m_listItem.visible = itemCfg.itemsArr.Length > 0;
+        }
+        private void ListItemRenderer(int index, GObject obj)
+        {
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_shopCfg.itemId);
+            ItemData itemData = ItemUtil.createItemData(itemCfg.itemsArr[index]);
+            if (obj.data == null)
+            {
+                obj.data = new ItemView(obj as GComponent);
             }
+            (obj.data as ItemView).SetData(itemData);
+            (obj.data as ItemView).ChangeTxtCountStyle();
         }
         private void UpdateView()
         {
-
-            ShopExchangeCfg cfg = ShopExchangeCfgArray.Instance.GetCfg(_exchangeId);
-            _ui.m_txtExchangeCount.text = string.Format("x{0}", cfg.num * _buyCount);
-
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(cfg.itemId);
+            _ui.m_txtExchangeCount.text = string.Format("x{0}", _shopCfg.itemNum * _buyCount);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_shopCfg.itemId);
             _ui.m_txtCostCount.text = _buyCount.ToString();
             _ui.m_btnMinus.m_c1.selectedIndex = _buyCount == 1 ? 1 : 0;
             _ui.m_btnMinus.target.touchable = _buyCount == 1 ? false : true;
@@ -100,7 +121,7 @@ namespace GFGGame
 
             _ui.m_txtShow.text = "选择购买数量";
             _ui.m_txtTips.text = string.Format("确定购买{0}个{1}?", _buyCount, itemCfg.name);
-            ItemUtil.UpdateItemNeedNum(_ui.m_comCost.target, cfg.costId, (int)_buyCount * cfg.costNum);
+            ItemUtil.UpdateItemNeedNum(_ui.m_comCost.target, _shopCfg.costId, (int)_buyCount * _shopCfg.price);
         }
 
 
@@ -131,14 +152,14 @@ namespace GFGGame
         }
         private async void OnBtnExchangeClick()
         {
-            ShopExchangeCfg cfg = ShopExchangeCfgArray.Instance.GetCfg(_exchangeId);
+            ShopExchangeCfg cfg = ShopExchangeCfgArray.Instance.GetCfg(_goodIds);
             if (ItemDataManager.GetItemNum(cfg.costId) < cfg.costNum)
             {
                 PromptController.Instance.ShowFloatTextPrompt("道具不足");
                 return;
             }
 
-            bool result = await RechargeSProxy.ReqExchangeShopItem(_exchangeId, _buyCount);
+            bool result = await RechargeSProxy.ReqExchangeShopItem(_goodIds, _buyCount);
             if (result)
             {
                 LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes


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


BIN
GameClient/Assets/ResIn/UI/Store/Store_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Store/Store_fui.bytes