Переглянути джерело

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

* 'master' of http://10.108.64.190:3000/gfg/Client:
  修复一些BUG
  首充红点
  主界面入口
  背包打开自选礼包加入改一下条件
Jae 2 роки тому
батько
коміт
20e3d57f93

+ 50 - 16
FGUIProject/assets/EnduringGiftBox/RushSaleGiftBoxUI.xml

@@ -1,24 +1,58 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,958">
   <displayList>
-    <image id="n1_yjmk" name="n1" src="yjmk2j" fileName="images/xsqg_db.png" xy="1,-72"/>
-    <image id="n0_yjmk" name="n0" src="yjmk2l" fileName="images/xsqg_lihui.png" xy="44,23"/>
-    <image id="n2_yjmk" name="n2" src="yjmk2i" fileName="images/wz_xsqg.png" xy="335,26"/>
-    <image id="n5_yjmk" name="n5" src="yjmk2m" fileName="images/xsqg_nr_db.png" xy="193,215"/>
-    <text id="n4_yjmk" name="txtBoxItemName" xy="363,207" size="283,65" fontSize="40" color="#fffbf5" align="center" autoSize="none" strokeColor="#d69546" text="体力限时礼包"/>
-    <image id="n6_yjmk" name="n6" src="yjmk2n" fileName="images/xsqg_sj_db.png" xy="639,216"/>
-    <text id="n8_yjmk" name="txtBoxResidueTime" xy="683,214" size="207,48" fontSize="35" color="#fffbf5" align="center" autoSize="none" text="6天23分23秒"/>
-    <list id="n11_yjmk" name="list" xy="344,377" size="425,203" layout="flow_vt" overflow="scroll" scroll="horizontal" colGap="50" defaultItem="ui://bdi1qe15yjmk2p" align="center">
+    <image id="n1_yjmk" name="n1" src="yjmk2j" fileName="images/xsqg_db.png" xy="1,-72" group="n22_droi"/>
+    <image id="n0_yjmk" name="n0" src="yjmk2l" fileName="images/xsqg_lihui.png" xy="44,23" group="n22_droi"/>
+    <image id="n2_yjmk" name="n2" src="yjmk2i" fileName="images/wz_xsqg.png" xy="335,26" group="n22_droi"/>
+    <component id="n19_droi" name="btnUp" src="droi3c" fileName="components/BtnUp.xml" xy="63,380" group="n22_droi"/>
+    <component id="n20_droi" name="btnNext" src="droi3d" fileName="components/BtnNext.xml" xy="877,386" group="n22_droi"/>
+    <component id="n21_droi" name="btnBack" src="qqhz26" fileName="components/BnBack.xml" xy="498,940" group="n22_droi"/>
+    <group id="n22_droi" name="n22" xy="1,-72" size="1077,1231"/>
+    <image id="n5_yjmk" name="n5" src="yjmk2m" fileName="images/xsqg_nr_db.png" xy="193,215" group="n23_droi"/>
+    <text id="n4_yjmk" name="txtBoxItemName" xy="363,207" size="283,65" group="n23_droi" fontSize="40" color="#fffbf5" align="center" autoSize="none" strokeColor="#d69546" text="体力限时礼包"/>
+    <image id="n6_yjmk" name="n6" src="yjmk2n" fileName="images/xsqg_sj_db.png" xy="639,216" group="n23_droi"/>
+    <text id="n8_yjmk" name="txtBoxResidueTime" xy="683,214" size="207,48" group="n23_droi" fontSize="35" color="#fffbf5" align="center" autoSize="none" text="6天23分23秒"/>
+    <list id="n11_yjmk" name="list" xy="344,377" size="425,203" group="n23_droi" layout="flow_vt" overflow="scroll" scroll="horizontal" scrollBarFlags="32" colGap="50" defaultItem="ui://bdi1qe15yjmk2p" align="center">
       <item/>
       <item/>
     </list>
-    <image id="n12_yjmk" name="n12" src="yjmk2b" fileName="images/xsqg_zsx.png" xy="302,602"/>
-    <text id="n13_yjmk" name="txtUrc" xy="453,623" size="224,68" fontSize="34" color="#b8857b" align="center" vAlign="middle" autoSize="shrink" text="今日限购0/1"/>
-    <component id="n15_yjmk" name="btnBuyPink" src="yjmk2q" fileName="components/BtnBuyPink.xml" xy="408,693"/>
-    <component id="n14_yjmk" name="comDiscount" src="yjmk2r" fileName="components/ComDiscount2.xml" xy="333,642"/>
-    <text id="n16_yjmk" name="txtLrc" xy="379,787" size="380,46" fontSize="34" color="#b8857b" align="center" autoSize="shrink" text="可获得60充值经验"/>
-    <component id="n19_droi" name="btnUp" src="droi3c" fileName="components/BtnUp.xml" xy="63,380"/>
-    <component id="n20_droi" name="btnNext" src="droi3d" fileName="components/BtnNext.xml" xy="877,386"/>
-    <component id="n21_droi" name="btnBack" src="qqhz26" fileName="components/BnBack.xml" xy="498,940"/>
+    <image id="n12_yjmk" name="n12" src="yjmk2b" fileName="images/xsqg_zsx.png" xy="302,602" group="n23_droi"/>
+    <text id="n13_yjmk" name="txtUrc" xy="453,623" size="224,68" group="n23_droi" fontSize="34" color="#b8857b" align="center" vAlign="middle" autoSize="shrink" text="今日限购0/1"/>
+    <component id="n15_yjmk" name="btnBuyPink" src="yjmk2q" fileName="components/BtnBuyPink.xml" xy="408,693" group="n23_droi"/>
+    <component id="n14_yjmk" name="comDiscount" src="yjmk2r" fileName="components/ComDiscount2.xml" xy="333,642" group="n23_droi"/>
+    <text id="n16_yjmk" name="txtLrc" xy="379,787" size="380,46" group="n23_droi" fontSize="34" color="#b8857b" align="center" autoSize="shrink" text="可获得60充值经验"/>
+    <group id="n23_droi" name="n23" xy="193,207" size="746,626"/>
   </displayList>
+  <transition name="t3">
+    <item time="0" type="Alpha" target="n0_yjmk" tween="true" startValue="0" endValue="1" duration="27"/>
+    <item time="0" type="Alpha" target="n11_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n12_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n13_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n14_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n15_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n16_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n19_droi" tween="true" startValue="0" endValue="1" duration="27"/>
+    <item time="0" type="Alpha" target="n1_yjmk" tween="true" startValue="0" endValue="1" duration="27"/>
+    <item time="0" type="Alpha" target="n20_droi" tween="true" startValue="0" endValue="1" duration="27"/>
+    <item time="0" type="Alpha" target="n21_droi" tween="true" startValue="0" endValue="1" duration="27" ease="Quad.InOut"/>
+    <item time="0" type="Alpha" target="n2_yjmk" tween="true" startValue="0" endValue="1" duration="27"/>
+    <item time="0" type="Alpha" target="n4_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n5_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n6_yjmk" value="1"/>
+    <item time="0" type="Alpha" target="n6_yjmk" value="0"/>
+    <item time="0" type="Alpha" target="n8_yjmk" value="1"/>
+    <item time="0" type="Alpha" target="n8_yjmk" value="0"/>
+    <item time="0" type="XY" target="n19_droi" tween="true" startValue="70,380" endValue="63,380" duration="10" ease="Quad.In"/>
+    <item time="0" type="XY" target="n2_yjmk" tween="true" startValue="335,20" endValue="335,26" duration="11" ease="Quad.InOut"/>
+    <item time="15" type="Alpha" target="n11_yjmk" tween="true" startValue="0.2" endValue="1" duration="19"/>
+    <item time="15" type="Alpha" target="n12_yjmk" tween="true" startValue="0.2" endValue="1" duration="19"/>
+    <item time="15" type="Alpha" target="n13_yjmk" tween="true" startValue="0.2" endValue="1" duration="19"/>
+    <item time="15" type="Alpha" target="n14_yjmk" tween="true" startValue="0.2" endValue="1" duration="19"/>
+    <item time="15" type="Alpha" target="n16_yjmk" tween="true" startValue="0.2" endValue="1" duration="19"/>
+    <item time="15" type="Alpha" target="n4_yjmk" tween="true" startValue="0.2" endValue="1" duration="19"/>
+    <item time="15" type="Alpha" target="n5_yjmk" tween="true" startValue="0.2" endValue="1" duration="19"/>
+    <item time="15" type="Alpha" target="n6_yjmk" tween="true" startValue="0.2" endValue="1" duration="19"/>
+    <item time="15" type="Alpha" target="n8_yjmk" tween="true" startValue="0.2" endValue="1" duration="19"/>
+    <item time="18" type="Alpha" target="n15_yjmk" tween="true" startValue="0.2" endValue="1" duration="16"/>
+  </transition>
 </component>

+ 1 - 1
FGUIProject/assets/EnduringGiftBox/components/BtnBuy.xml

@@ -4,7 +4,7 @@
   <displayList>
     <image id="n3_qqhz" name="bagGrey" src="qqhzm" fileName="images/cz_an_grey.png" xy="0,0"/>
     <image id="n6_yjmk" name="bagYellow" src="yjmk2y" fileName="images/button.png" xy="0,0"/>
-    <text id="n1_qqhz" name="txtNewPrice" xy="146,2" size="104,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="12元"/>
+    <text id="n1_qqhz" name="txtNewPrice" xy="134,2" size="104,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="12元"/>
     <text id="n2_qqhz" name="txtOldPrice" xy="21,2" size="84,69" font="ui://eg2y0ldpa0cftky" fontSize="32" color="#fffdf4" align="center" vAlign="middle" autoSize="shrink" strike="true" text="86"/>
     <loader id="n5_yjmk" name="loaIcon" xy="104,22" size="38,34" fill="scale" shrinkOnly="true"/>
   </displayList>

+ 1 - 1
FGUIProject/assets/EnduringGiftBox/components/BtnBuyPink.xml

@@ -5,7 +5,7 @@
     <image id="n7_yjmk" name="bagGrey" src="qqhzm" fileName="images/cz_an_grey.png" xy="0,7" size="316,75" aspect="true"/>
     <image id="n6_yjmk" name="bagPink" src="yjmk3b" fileName="images/an_pink.png" xy="0,7" size="316,75" aspect="true"/>
     <text id="n1_qqhz" name="txtNewPrice" xy="166,5" size="104,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="300元"/>
-    <text id="n2_qqhz" name="txtOldPrice" xy="37,5" size="84,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" strike="true" text="2000"/>
+    <text id="n2_qqhz" name="txtOldPrice" xy="47,5" size="84,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" align="right" vAlign="middle" autoSize="shrink" strike="true" text="2000"/>
     <loader id="n5_yjmk" name="loaIcon" xy="122,22" size="33,31" fill="scale" shrinkOnly="true"/>
   </displayList>
   <Button/>

+ 1 - 1
FGUIProject/assets/EnduringGiftBox/components/ComCurSupplyItem.xml

@@ -10,7 +10,7 @@
     <component id="n28_qqhz" name="comLeftGiftBox" src="qqhz1q" fileName="components/ComLeftGiftBox.xml" xy="25,22"/>
     <text id="n15_qqhz" name="txtTitle" xy="290,15" size="275,47" font="ui://eg2y0ldpa0cftkz" fontSize="28" color="#cc9974" align="center" autoSize="none" text="体力超值返利包"/>
     <text id="n22_qqhz" name="txtWeekPrompt" xy="294,46" size="266,39" font="ui://eg2y0ldpa0cftks" fontSize="26" color="#bda5a8" align="center" autoSize="none" text="连续七天每日获得"/>
-    <image id="n23_qqhz" name="icoWeekPromptTag" src="qqhz1p" fileName="images/lm_tb_tishi.png" xy="530,48"/>
+    <component id="n29_droi" name="btnIcoWeekPromptTag" src="droi3e" fileName="components/BtnIcoWeekPromptTag.xml" xy="530,48"/>
     <list id="n18_qqhz" name="list" xy="231,83" size="402,132" layout="flow_vt" overflow="scroll" scroll="horizontal" scrollBarFlags="32" colGap="35" defaultItem="ui://bdi1qe15qqhz1g" align="center" autoClearItems="true">
       <item/>
     </list>

+ 2 - 1
FGUIProject/assets/EnduringGiftBox/package.xml

@@ -40,7 +40,7 @@
     <component id="qqhz1g" name="ComRewardIconItem.xml" path="/components/" exported="true"/>
     <image id="qqhz1n" name="hlhdjficon.png" path="/images/" exported="true"/>
     <component id="qqhz1o" name="ComDiscount.xml" path="/components/" exported="true"/>
-    <image id="qqhz1p" name="lm_tb_tishi.png" path="/images/" exported="true"/>
+    <image id="qqhz1p" name="lm_tb_tishi.png" path="/images/"/>
     <component id="qqhz1q" name="ComLeftGiftBox.xml" path="/components/" exported="true"/>
     <component id="qqhz1r" name="ComGouMaiGetText.xml" path="/components/" exported="true"/>
     <image id="qqhz25" name="tili.png" path="/images/"/>
@@ -83,6 +83,7 @@
     <image id="yjmk3b" name="an_pink.png" path="/images/"/>
     <component id="droi3c" name="BtnUp.xml" path="/components/" exported="true"/>
     <component id="droi3d" name="BtnNext.xml" path="/components/" exported="true"/>
+    <component id="droi3e" name="BtnIcoWeekPromptTag.xml" path="/components/" exported="true"/>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/EnduringGiftBox" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

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

@@ -622,7 +622,7 @@
     <image id="ktf2o7" name="cj_meirith.png" path="/images/"/>
     <image id="ktf2o8" name="cj_sj_db.png" path="/images/"/>
     <component id="volso9" name="BtnModle.xml" path="/components/"/>
-    <image id="volsoa" name="zjm_hd_sj_db.png" path="/imagesNew/"/>
+    <image id="volsoa" name="zjm_hd_sj_db.png" path="/imagesNew/" scale="9grid" scale9grid="28,6,56,12"/>
     <image id="volsob" name="zjm_tb_cz_sc.png" path="/imagesNew/"/>
     <image id="volsoc" name="zjm_tb_cz_thlb.png" path="/imagesNew/"/>
     <image id="volsod" name="zjm_tb_cz_xsqg.png" path="/imagesNew/"/>

+ 4 - 3
GameClient/Assets/Game/HotUpdate/Data/LimitedTimeGiftBoxDataManager.cs

@@ -25,7 +25,7 @@ namespace GFGGame
             _ltgGbItemData4.Clear();
             _ltgGbItemData5.Clear();
         }
-        
+
         public void UpLtgGbItemData3()
         {
             _ltgGbItemData3.Clear();
@@ -51,6 +51,8 @@ namespace GFGGame
                             _ltgGbItemData3.FirstOrDefault(a => a.IndexType == shopCfg.menu2);
                         if (ltgGbItemData != null)
                         {
+                            var index = _ltgGbItemData3.IndexOf(ltgGbItemData);
+                            ltgGbItemData.EndTime = activityInfo.endTime;
                             if (ltgGbItemData.ShopCfgIds != null)
                             {
                                 if (ltgGbItemData.ShopCfgIds.Count < 3)
@@ -63,8 +65,7 @@ namespace GFGGame
                                 ltgGbItemData.ShopCfgIds = new List<int> { shopCfgId };
                             }
 
-                            ltgGbItemData.EndTime = activityInfo.endTime;
-                            _ltgGbItemData3.Add(ltgGbItemData);
+                            _ltgGbItemData3[index] = ltgGbItemData;
                         }
                         else
                         {

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComCurSupplyItem.cs

@@ -14,7 +14,7 @@ namespace UI.EnduringGiftBox
         public UI_ComLeftGiftBox m_comLeftGiftBox;
         public GTextField m_txtTitle;
         public GTextField m_txtWeekPrompt;
-        public GImage m_icoWeekPromptTag;
+        public GComponent m_btnIcoWeekPromptTag;
         public GList m_list;
         public const string URL = "ui://bdi1qe15qqhz11";
         public const string PACKAGE_NAME = "EnduringGiftBox";
@@ -70,7 +70,7 @@ namespace UI.EnduringGiftBox
             m_comLeftGiftBox = (UI_ComLeftGiftBox)UI_ComLeftGiftBox.Create(comp.GetChild("comLeftGiftBox"));
             m_txtTitle = (GTextField)comp.GetChild("txtTitle");
             m_txtWeekPrompt = (GTextField)comp.GetChild("txtWeekPrompt");
-            m_icoWeekPromptTag = (GImage)comp.GetChild("icoWeekPromptTag");
+            m_btnIcoWeekPromptTag = (GComponent)comp.GetChild("btnIcoWeekPromptTag");
             m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = false)
@@ -85,7 +85,7 @@ namespace UI.EnduringGiftBox
             m_comLeftGiftBox = null;
             m_txtTitle = null;
             m_txtWeekPrompt = null;
-            m_icoWeekPromptTag = null;
+            m_btnIcoWeekPromptTag = null;
             m_list = null;
             if(disposeTarget && target != null)
             {

+ 12 - 9
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_RushSaleGiftBoxUI.cs

@@ -7,6 +7,9 @@ namespace UI.EnduringGiftBox
     public partial class UI_RushSaleGiftBoxUI
     {
         public GComponent target;
+        public GComponent m_btnUp;
+        public GComponent m_btnNext;
+        public GComponent m_btnBack;
         public GTextField m_txtBoxItemName;
         public GTextField m_txtBoxResidueTime;
         public GList m_list;
@@ -14,9 +17,7 @@ namespace UI.EnduringGiftBox
         public UI_BtnBuyPink m_btnBuyPink;
         public UI_ComDiscount2 m_comDiscount;
         public GTextField m_txtLrc;
-        public GComponent m_btnUp;
-        public GComponent m_btnNext;
-        public GComponent m_btnBack;
+        public Transition m_t3;
         public const string URL = "ui://bdi1qe15yjmk29";
         public const string PACKAGE_NAME = "EnduringGiftBox";
         public const string RES_NAME = "RushSaleGiftBoxUI";
@@ -64,6 +65,9 @@ namespace UI.EnduringGiftBox
 
         private void Init(GComponent comp)
         {
+            m_btnUp = (GComponent)comp.GetChild("btnUp");
+            m_btnNext = (GComponent)comp.GetChild("btnNext");
+            m_btnBack = (GComponent)comp.GetChild("btnBack");
             m_txtBoxItemName = (GTextField)comp.GetChild("txtBoxItemName");
             m_txtBoxResidueTime = (GTextField)comp.GetChild("txtBoxResidueTime");
             m_list = (GList)comp.GetChild("list");
@@ -71,12 +75,13 @@ namespace UI.EnduringGiftBox
             m_btnBuyPink = (UI_BtnBuyPink)UI_BtnBuyPink.Create(comp.GetChild("btnBuyPink"));
             m_comDiscount = (UI_ComDiscount2)UI_ComDiscount2.Create(comp.GetChild("comDiscount"));
             m_txtLrc = (GTextField)comp.GetChild("txtLrc");
-            m_btnUp = (GComponent)comp.GetChild("btnUp");
-            m_btnNext = (GComponent)comp.GetChild("btnNext");
-            m_btnBack = (GComponent)comp.GetChild("btnBack");
+            m_t3 = comp.GetTransition("t3");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_btnUp = null;
+            m_btnNext = null;
+            m_btnBack = null;
             m_txtBoxItemName = null;
             m_txtBoxResidueTime = null;
             m_list = null;
@@ -86,9 +91,7 @@ namespace UI.EnduringGiftBox
             m_comDiscount.Dispose();
             m_comDiscount = null;
             m_txtLrc = null;
-            m_btnUp = null;
-            m_btnNext = null;
-            m_btnBack = null;
+            m_t3 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 7 - 4
GameClient/Assets/Game/HotUpdate/Utils/TimeUtil.cs

@@ -160,10 +160,13 @@ namespace GFGGame
         public static string FormattingTimeTo_DDHHmm(long timeMsec)
         {
             TimeSpan ts = new TimeSpan(0, 0, ((int)timeMsec / 1000));
-            string strD = ts.Days.ToString().Length == 1 ? "0" + ts.Days : ts.Days.ToString();
-            string strH = ts.Hours.ToString().Length == 1 ? "0" + ts.Hours : ts.Hours.ToString();
-            string strM = ts.Minutes.ToString().Length == 1 ? "0" + ts.Minutes : ts.Minutes.ToString();
-            return string.Format("{0}天{1}小时{2}分", strD, strH, strM);
+            // string strD = ts.Days.ToString().Length == 1 ? "0" + ts.Days : ts.Days.ToString();
+            // string strH = ts.Hours.ToString().Length == 1 ? "0" + ts.Hours : ts.Hours.ToString();
+            // string strM = ts.Minutes.ToString().Length == 1 ? "0" + ts.Minutes : ts.Minutes.ToString();
+            string strD = ts.Days.ToString();
+            string strH = ts.Hours.ToString();
+            string strM = ts.Minutes.ToString();
+            return string.Format("{0}天{1}时{2}分", strD, strH, strM);
         }
 
         /// <summary>

+ 9 - 11
GameClient/Assets/Game/HotUpdate/Views/Bag/BagView.cs

@@ -103,26 +103,24 @@ namespace GFGGame
             GComponent comItem = (context.data as GComponent);
             ItemCfg itemCfg = comItem.data as ItemCfg;
 
-            //区分一下道具跟礼包
-            if (itemCfg.itemType == ConstItemType.ITEM)
+            //可使用物品
+            if (itemCfg.itemType == ConstItemType.USEABLE)
             {
-                if (itemCfg.subType == 0)
+                if (itemCfg.subType == ConstItemSubType.USEABLE_GIFT_BAG_SELECTABLE)
                 {
-                    object[] sourceDatas = new object[]
-                        { itemCfg.id, new object[] { typeof(BagView).FullName, this.viewData } };
-                    GoodsItemTipsController.ShowItemTips(itemCfg.id, sourceDatas);
+                    ViewManager.Show<GiftBoxSelectorView>(itemCfg.id);
                 }
-                else if (itemCfg.subType == 1)
+                else
                 {
+                    //暂时程序走不到这里,这里是以前用来使用物品的一个界面---20230607--hxj注释
                     ViewManager.Show<BagExchangeView>(itemCfg.id);
                 }
             }
             else
             {
-                //ConstItemType.GIFT_BAG 礼包
-                //随机礼包--还未有该需求,但是配置表有了,先不管,之后有随机礼包需求可以在这里加判断处理
-                //自选礼包
-                ViewManager.Show<GiftBoxSelectorView>(itemCfg.id);
+                object[] sourceDatas = new object[]
+                    { itemCfg.id, new object[] { typeof(BagView).FullName, this.viewData } };
+                GoodsItemTipsController.ShowItemTips(itemCfg.id, sourceDatas);
             }
         }
 

+ 20 - 13
GameClient/Assets/Game/HotUpdate/Views/Bag/GiftBoxSelectorView.cs

@@ -134,7 +134,7 @@ namespace GFGGame
                 longPressGesture.once = false;
                 longPressGesture.onAction.Add(OnLongPress);
                 _listLongPress.Add(longPressGesture);
-                
+
                 LongPressGesture longPressGesture2 = new LongPressGesture(uiItemChild.m_btnReduce);
                 longPressGesture2.trigger = 0.3f;
                 longPressGesture2.interval = 0.1f;
@@ -200,7 +200,7 @@ namespace GFGGame
 
             SetSelAllNum();
         }
-        
+
         private void OnChildBtnReduceClick(EventContext context)
         {
             GObject sender = context.sender as GObject;
@@ -221,7 +221,7 @@ namespace GFGGame
             ItemCfg itemCfg = obj.data as ItemCfg;
             UpdateReduceSel(listItem, itemCfg);
         }
-        
+
         private void UpdateReduceSel(UI_ListSelectorItem listItem, ItemCfg itemCfg)
         {
             if (_selCount == 0)
@@ -233,7 +233,7 @@ namespace GFGGame
             {
                 return;
             }
-            
+
             if (_selDic.TryGetValue(itemCfg.id, out int num))
             {
                 if (num == 0)
@@ -259,7 +259,7 @@ namespace GFGGame
         {
             _ui.m_txtSelRewardStr.text = $"已选奖励:{_selCount}/{_count}";
         }
-        
+
         //弹出物品详细描述框
         private void OnListSelectorItemClick(EventContext context)
         {
@@ -279,17 +279,24 @@ namespace GFGGame
         {
             List<GiftBoxSelChildItemProto> reqItemList = new List<GiftBoxSelChildItemProto>();
 
-            foreach (var itemKv in _selDic)
+            if (_selDic.Keys.Count > 0)
             {
-                reqItemList.Add(new GiftBoxSelChildItemProto
+                foreach (var itemKv in _selDic)
                 {
-                    ChildItemId = itemKv.Key,
-                    ChildItemCount = itemKv.Value
-                });
-            }
+                    reqItemList.Add(new GiftBoxSelChildItemProto
+                    {
+                        ChildItemId = itemKv.Key,
+                        ChildItemCount = itemKv.Value
+                    });
+                }
 
-            ItemProxy.ReqUseGiftBoxSelItem(_itemId, reqItemList).Coroutine();
-            this.Hide();
+                ItemProxy.ReqUseGiftBoxSelItem(_itemId, reqItemList).Coroutine();
+                this.Hide();
+            }
+            else
+            {
+                PromptController.Instance.ShowFloatTextPrompt("请先选择");
+            }
         }
     }
 }

+ 13 - 6
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

@@ -177,6 +177,7 @@ namespace GFGGame
             _ui.m_list.visible = true;
         }
 
+        // ReSharper disable Unity.PerformanceAnalysis
         private void ListItemRender(int index, GObject obj)
         {
             ShopCfg shopCfg = _shopCfgList[index];
@@ -187,11 +188,11 @@ namespace GFGGame
             //返利包
             item.m_txtTitle.text = itemCfg.name;
             item.m_txtWeekPrompt.visible = false;
-            item.m_icoWeekPromptTag.visible = false;
+            item.m_btnIcoWeekPromptTag.visible = false;
             if (itemCfg.param2Arr.Length != 0)
             {
                 item.m_txtWeekPrompt.visible = true;
-                item.m_icoWeekPromptTag.visible = true;
+                item.m_btnIcoWeekPromptTag.visible = true;
                 item.m_txtWeekPrompt.text = string.Format("连续{0}天每日获得", itemCfg.param2Arr[0]);
             }
 
@@ -246,7 +247,7 @@ namespace GFGGame
                 item.m_txtUrc.text = string.Format("今日剩余{0}/{1}", remainBuyNum, shopCfg.maxBuyNum);
                 item.m_txtLrc.text = string.Format("可获得{0}会员积分", shopCfg.price * 10);
                 item.m_txtWeekPrompt.visible = false;
-                item.m_icoWeekPromptTag.visible = false;
+                item.m_btnIcoWeekPromptTag.visible = false;
                 numItems = childItemCfg.itemsArr.Length;
 
                 if (remainBuyNum == 0)
@@ -288,7 +289,7 @@ namespace GFGGame
                 item.m_txtWeekPrompt.text =
                     string.Format("连续{0}天每日获得",
                         itemCfg.param2Arr[0] + 1); //NumberUtil.GetChiniseNumberText(itemCfg.param2Arr[0])
-                item.m_icoWeekPromptTag.visible = true;
+                item.m_btnIcoWeekPromptTag.visible = true;
 
                 numItems = childItemCfg.param1Arr.Length;
 
@@ -334,8 +335,8 @@ namespace GFGGame
                 }
             }
 
-            item.m_icoWeekPromptTag.onClick.Add(RuleController.ShowRuleView);
-            item.m_icoWeekPromptTag.data = 300013;
+            item.m_btnIcoWeekPromptTag.onClick.Add(RuleController.ShowRuleView);
+            item.m_btnIcoWeekPromptTag.data = 300013;
             //领取按钮点击事件
             item.m_btnCurReceive.target.onClick.Add(OnBtnCurReceiveClick);
             //购买按钮点击事件
@@ -347,6 +348,7 @@ namespace GFGGame
         }
 
         //领取按钮点击事件
+        // ReSharper disable Unity.PerformanceAnalysis
         private void OnBtnCurReceiveClick(EventContext context)
         {
             GObject sender = context.sender as GObject;
@@ -365,6 +367,7 @@ namespace GFGGame
         }
 
         //购买按钮点击事件
+        // ReSharper disable Unity.PerformanceAnalysis
         private void OnBtnBuyClick(EventContext context)
         {
             GObject sender = context.sender as GObject;
@@ -396,6 +399,7 @@ namespace GFGGame
             }
         }
 
+        // ReSharper disable Unity.PerformanceAnalysis
         private void ChildListItemRender(int index, GObject obj)
         {
             UI_ComRewardIconItem uiItemChild = UI_ComRewardIconItem.Proxy(obj);
@@ -450,6 +454,8 @@ namespace GFGGame
             GoodsItemTipsController.ShowItemTips(itemCfg.id);
         }
 
+        // ReSharper disable Unity.PerformanceAnalysis
+        // ReSharper disable Unity.PerformanceAnalysis
         private async void OnClickBtnSure()
         {
             if (_maxTimes > 0 && (_buyTimes + _count) > _maxTimes)
@@ -504,6 +510,7 @@ namespace GFGGame
         }
 
         //购买连续礼包之后,更新数据+更新界面
+        // ReSharper disable Unity.PerformanceAnalysis
         private void UpDayRebateAndView(EventContext context)
         {
             ShopCfg shopCfg = context.data as ShopCfg;

+ 5 - 4
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/RushSaleGiftBoxView.cs

@@ -185,13 +185,14 @@ namespace GFGGame
                 mTxtNewPrice = shopCfg.price.ToString();
                 _ui.m_btnBuyPink.m_loaIcon.visible = true;
                 _ui.m_btnBuyPink.m_loaIcon.url = ResPathUtil.GetIconPath(costCfg);
+                //_ui.m_btnBuyPink.m_txtNewPrice.x = 166;
             }
             else if (shopCfg.costType == CostType.RMB)
             {
                 //人民币
                 mTxtNewPrice = $"{shopCfg.price}元";
-                _ui.m_btnBuyPink.m_txtNewPrice.align = AlignType.Left;
-                _ui.m_btnBuyPink.m_txtNewPrice.x = 90;
+                //_ui.m_btnBuyPink.m_txtNewPrice.align = AlignType.Left;
+                //_ui.m_btnBuyPink.m_txtNewPrice.x = 166;
                 _ui.m_txtLrc.text = $"可获得{shopCfg.price * 10}充值经验";
             }
             else
@@ -199,8 +200,8 @@ namespace GFGGame
                 //免费
                 mTxtNewPrice = $"免费";
                 _ui.m_btnBuyPink.m_txtOldPrice.text = "";
-                _ui.m_btnBuyPink.m_txtNewPrice.align = AlignType.Left;
-                _ui.m_btnBuyPink.m_txtNewPrice.x = 90;
+                //_ui.m_btnBuyPink.m_txtNewPrice.align = AlignType.Left;
+                // _ui.m_btnBuyPink.m_txtNewPrice.x = 166;
             }
 
             _ui.m_txtBoxItemName.text = shopCfg.itemName;

+ 15 - 6
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/SpecialOfferGiftBoxView.cs

@@ -154,15 +154,19 @@ namespace GFGGame
             string mTxtNewPrice;
             if (shopCfg.refreshType == RefreshType.DAY)
             {
-                mTxtUrc = $"日限购{remainBuyNum}/{shopCfg.maxBuyNum}";
+                mTxtUrc = $"日限购{remainBuyNum}/{shopCfg.maxBuyNum}";
             }
             else if (shopCfg.refreshType == RefreshType.WEEK)
             {
-                mTxtUrc = $"周限购{remainBuyNum}/{shopCfg.maxBuyNum}";
+                mTxtUrc = $"周限购{remainBuyNum}/{shopCfg.maxBuyNum}";
             }
             else if (shopCfg.refreshType == RefreshType.MONTH)
             {
-                mTxtUrc = $"本月限购{remainBuyNum}/{shopCfg.maxBuyNum}";
+                mTxtUrc = $"每月限购{remainBuyNum}/{shopCfg.maxBuyNum}";
+            }
+            else
+            {
+                mTxtUrc = $"永久限购{remainBuyNum}/{shopCfg.maxBuyNum}";
             }
 
             if (remainBuyNum == 0)
@@ -184,6 +188,8 @@ namespace GFGGame
                 ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(shopCfg.costId);
                 mTxtNewPrice = shopCfg.price.ToString();
                 uiItem.m_btnBuy.m_loaIcon.visible = true;
+                uiItem.m_btnBuy.m_txtNewPrice.x = 134;
+                uiItem.m_btnBuy.m_txtOldPrice.x = 21;
                 uiItem.m_btnBuy.m_loaIcon.url = ResPathUtil.GetIconPath(costCfg);
             }
             else if (shopCfg.costType == CostType.RMB)
@@ -191,7 +197,8 @@ namespace GFGGame
                 //人民币 
                 mTxtNewPrice = $"{shopCfg.price}元";
                 uiItem.m_btnBuy.m_txtNewPrice.align = AlignType.Left;
-                uiItem.m_btnBuy.m_txtNewPrice.x = 90;
+                uiItem.m_btnBuy.m_txtNewPrice.x = 125;
+                uiItem.m_btnBuy.m_txtOldPrice.x = 30;
                 uiItem.m_txtGetJf.text = $"可获得{shopCfg.price * 10}充值经验";
             }
             else
@@ -200,14 +207,16 @@ namespace GFGGame
                 mTxtNewPrice = $"免费";
                 uiItem.m_btnBuy.m_txtOldPrice.text = "";
                 uiItem.m_btnBuy.m_txtNewPrice.align = AlignType.Left;
-                uiItem.m_btnBuy.m_txtNewPrice.x = 90;
+                uiItem.m_btnBuy.m_txtNewPrice.x = 125;
+                uiItem.m_btnBuy.m_txtOldPrice.x = 30;
             }
 
             uiItem.target.data = shopCfg;
             uiItem.m_btnBuy.m_txtNewPrice.text = mTxtNewPrice;
             uiItem.m_txtUrc.text = mTxtUrc;
             uiItem.m_btnBuy.target.onClick.Add(OnBtnBuyClick);
-
+            uiItem.m_txtBoxItemName.text = shopCfg.itemName;
+            
             //子列表
             uiItem.m_list.itemRenderer = ChildListItemRender;
             uiItem.m_list.numItems = shopItemCfg.itemsArr.Length;

+ 15 - 4
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -741,11 +741,16 @@ namespace GFGGame
                 (ActivityDataManager.Instance.sevenDayLoginLoginId >= 7 && ActivityDataManager.Instance.sevenDayLoginBonusStatus == ConstBonusStatus.GOT)));
             }
 
-            if (_ui.m_btnActivityDay7.target.visible && !ActivityDay7DataManager.Instance.CheckOpen())
+            _ui.m_btnActivityDay7.target.visible = ActivityDay7DataManager.Instance.CheckOpen();
+
+            if (_ui.m_btnActivityDay7.target.visible)
             {
-                _ui.m_btnActivityDay7.target.visible = false;
+                long time = ActivityDay7DataManager.Instance.GetEndTime() - TimeHelper.ServerNow();
+                _ui.m_btnActivityDay7.m_txtTime.text = time > TimeUtil.SECOND_PER_DAY * 100 ? TimeUtil.FormattingTimeTo_DDHHmm(time) : TimeUtil.FormattingTimeTo_HHmmss(time);
+
             }
 
+
             //特惠礼包/限时礼包窗口内的倒计时
             UpGiftBox1();
             UpGiftBox2();
@@ -775,12 +780,13 @@ namespace GFGGame
 
         private void OnNumericChange(EventContext context)
         {
-            if ((int)context.data == NumericType.Lvl)
+            var numericType = (int)context.data;
+            if (numericType == NumericType.Lvl)
             {
                 UpdateRoleLvl();
                 CheckFunOpen();
             }
-            if ((int)context.data == NumericType.FirstRechargeBonusStatus)
+            if (numericType == NumericType.FirstRechargeBonusStatus || numericType == NumericType.RechargeTotal)
             {
                 UpdateBtnFirstRecharge();
             }
@@ -789,6 +795,11 @@ namespace GFGGame
         private void UpdateBtnFirstRecharge()
         {
             _ui.m_btnFirstRecharge.target.visible = ActivityDataManager.Instance.firstChargeBonusStatus != ConstBonusStatus.GOT;
+            if(_ui.m_btnFirstRecharge.target.visible)
+            {
+                bool canget = ActivityDataManager.Instance.firstChargeBonusStatus == ConstBonusStatus.CAN_GET;
+                RedDotController.Instance.SetComRedDot(_ui.m_btnFirstRecharge.target, canget);
+            }
         }
 
         private void UpdateRoleLvl()

BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_fui.bytes