Ver Fonte

会员红点

zhaoyang há 2 anos atrás
pai
commit
a7eb17d6c7

+ 5 - 5
FGUIProject/assets/Store/components/ComTab.xml

@@ -2,25 +2,25 @@
 <component size="857,129" overflow="scroll" scroll="horizontal">
   <controller name="c1" pages="0,,1,,2,,3,,4,,5," selected="0"/>
   <displayList>
-    <component id="n9_fqor" name="n9" src="fqortb1" fileName="components/Button3.xml" xy="0,0" group="n14_fqor">
+    <component id="n9_fqor" name="btn0" src="fqortb1" fileName="components/Button3.xml" xy="0,0" group="n14_fqor">
       <Button icon="ui://p9mtgheofqortao" selectedIcon="ui://p9mtgheofqortan" controller="c1" page="1"/>
     </component>
-    <component id="n10_fqor" name="n10" src="fqortb1" fileName="components/Button3.xml" xy="193,0" group="n14_fqor">
+    <component id="n10_fqor" name="btn1" src="fqortb1" fileName="components/Button3.xml" xy="193,0" group="n14_fqor">
       <Button icon="ui://p9mtgheofqortak" selectedIcon="ui://p9mtgheofqortaj" controller="c1" page="2"/>
       <property target="txt0" propertyId="0" value="月"/>
       <property target="txt1" propertyId="0" value="卡"/>
     </component>
-    <component id="n11_fqor" name="n11" src="fqortb1" fileName="components/Button3.xml" xy="386,0" group="n14_fqor">
+    <component id="n11_fqor" name="btn2" src="fqortb1" fileName="components/Button3.xml" xy="386,0" group="n14_fqor">
       <Button icon="ui://p9mtgheofqortam" selectedIcon="ui://p9mtgheofqortal" controller="c1" page="3"/>
       <property target="txt0" propertyId="0" value="礼"/>
       <property target="txt1" propertyId="0" value="包"/>
     </component>
-    <component id="n12_fqor" name="n12" src="fqortb1" fileName="components/Button3.xml" xy="579,0" group="n14_fqor">
+    <component id="n12_fqor" name="btn3" src="fqortb1" fileName="components/Button3.xml" xy="579,0" group="n14_fqor">
       <Button icon="ui://p9mtgheofqortam" selectedIcon="ui://p9mtgheofqortal" controller="c1" page="4"/>
       <property target="txt0" propertyId="0" value="兑"/>
       <property target="txt1" propertyId="0" value="换"/>
     </component>
-    <component id="n13_fqor" name="n13" src="fqortb1" fileName="components/Button3.xml" xy="772,0" group="n14_fqor">
+    <component id="n13_fqor" name="btn4" src="fqortb1" fileName="components/Button3.xml" xy="772,0" group="n14_fqor">
       <Button icon="ui://p9mtgheofqortam" selectedIcon="ui://p9mtgheofqortal" controller="c1" page="5"/>
       <property target="txt0" propertyId="0" value="花"/>
       <property target="txt1" propertyId="0" value="令"/>

+ 15 - 0
GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs

@@ -1,4 +1,5 @@
 using System.Collections.Generic;
+using ET;
 
 namespace GFGGame
 {
@@ -301,5 +302,19 @@ namespace GFGGame
             int costNeed = fosterCfg.costNum;
             return itemHas >= itemNeed && costHas >= costNeed;
         }
+
+        //商店-会员中心
+        public bool GetChargeAddUpReward()
+        {
+            VipCfg[] vipCfgs = VipCfgArray.Instance.dataArray;
+
+            for (int i = 1; i < vipCfgs.Length; i++)
+            {
+                bool isGet = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.VipGetStatus), vipCfgs[i].id);
+                bool isWeekGet = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.VipWeekGetStatus), vipCfgs[i].id);
+                if ((!isGet || isWeekGet) && RoleDataManager.vipLv >= vipCfgs[i].id) return true;
+            }
+            return false;
+        }
     }
 }

+ 20 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_ComTab.cs

@@ -8,6 +8,11 @@ namespace UI.Store
     {
         public GComponent target;
         public Controller m_c1;
+        public UI_Button3 m_btn0;
+        public UI_Button3 m_btn1;
+        public UI_Button3 m_btn2;
+        public UI_Button3 m_btn3;
+        public UI_Button3 m_btn4;
         public const string URL = "ui://p9mtgheofqortb5";
         public const string PACKAGE_NAME = "Store";
         public const string RES_NAME = "ComTab";
@@ -56,10 +61,25 @@ namespace UI.Store
         private void Init(GComponent comp)
         {
             m_c1 = comp.GetController("c1");
+            m_btn0 = (UI_Button3)UI_Button3.Create(comp.GetChild("btn0"));
+            m_btn1 = (UI_Button3)UI_Button3.Create(comp.GetChild("btn1"));
+            m_btn2 = (UI_Button3)UI_Button3.Create(comp.GetChild("btn2"));
+            m_btn3 = (UI_Button3)UI_Button3.Create(comp.GetChild("btn3"));
+            m_btn4 = (UI_Button3)UI_Button3.Create(comp.GetChild("btn4"));
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
+            m_btn0.Dispose();
+            m_btn0 = null;
+            m_btn1.Dispose();
+            m_btn1 = null;
+            m_btn2.Dispose();
+            m_btn2 = null;
+            m_btn3.Dispose();
+            m_btn3 = null;
+            m_btn4.Dispose();
+            m_btn4 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -650,7 +650,7 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_btnYouJian, RedDotDataManager.Instance.GetMailRed());
             RedDotController.Instance.SetComRedDot(_btnTuJian, RedDotDataManager.Instance.GetFieldGuideRed() || RedDotDataManager.Instance.GetTravelGuideRed());
             RedDotController.Instance.SetComRedDot(_btnHaoYou, RedDotDataManager.Instance.GetFriendRed());
-            RedDotController.Instance.SetComRedDot(_btnStore, RedDotDataManager.Instance.GetRechargeGiftFreeRed());
+            RedDotController.Instance.SetComRedDot(_btnStore, RedDotDataManager.Instance.GetChargeAddUpReward());
             RedDotController.Instance.SetComRedDot(_ui.m_btnField.target, RedDotDataManager.Instance.GetFieldRed(), "", 10);
             RedDotController.Instance.SetComRedDot(_ui.m_btnStudio.target, RedDotDataManager.Instance.GetStudioFilingRed(), "", -38);
             RedDotController.Instance.SetComRedDot(_ui.m_headBar.target, RedDotDataManager.Instance.GetHeadRed() || RedDotDataManager.Instance.GetHeadBorderRed(), "", 5, 7);

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Views/Store/StoreChargeAddUpView.cs

@@ -141,6 +141,7 @@ namespace GFGGame
             item.m_btnGetGiftBag.data = vipCfg.id;
             bool isGet = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.VipGetStatus), vipCfg.id);
             item.m_btnGetGiftBag.enabled = !isGet;
+            RedDotController.Instance.SetComRedDot(item.m_btnGetGiftBag, !isGet && RoleDataManager.vipLv >= vipCfg.id);
             if (item.m_btnGetWeekGiftBag.data == null)
             {
                 item.m_btnGetWeekGiftBag.onClick.Add(OnBtnGetWeekGiftBagClick);
@@ -148,6 +149,7 @@ namespace GFGGame
             item.m_btnGetWeekGiftBag.data = vipCfg.id;
             bool isWeekGet = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.VipWeekGetStatus), vipCfg.id);
             item.m_btnGetWeekGiftBag.enabled = !isWeekGet;
+            RedDotController.Instance.SetComRedDot(item.m_btnGetGiftBag, !isWeekGet && RoleDataManager.vipLv >= vipCfg.id);
             UI_ListVipItem.ProxyEnd();
         }
 

+ 8 - 1
GameClient/Assets/Game/HotUpdate/Views/Store/StoreView.cs

@@ -128,15 +128,22 @@ namespace GFGGame
         {
             GButton item = obj.asButton;
             StoreTabCfg tabCfg = StoreTabCfgArray.Instance.GetCfg(_curTabIndex);
+            int menu2 = 0;
             if (tabCfg.functionId == ConstFunctionId.STORE_ARENA)
             {
                 item.title = _arenaSubTab[index][0];
+                menu2 = int.Parse(_arenaSubTab[index][1]);
             }
             else
             {
                 item.title = tabCfg.subTabArr[index][0];
+                menu2 = int.Parse(tabCfg.subTabArr[index][1]);
             }
             item.data = index;
+            if (menu2 == ConstStoreSubId.STORE_CHARGE_ADDUP)
+            {
+                RedDotController.Instance.SetComRedDot(_ui.m_comTab.m_btn0.target, RedDotDataManager.Instance.GetChargeAddUpReward());
+            }
         }
         private void OnListSubTabClick(EventContext context)
         {
@@ -177,7 +184,7 @@ namespace GFGGame
         }
         private void UpdateRedDot()
         {
-
+            RedDotController.Instance.SetComRedDot(_ui.m_comTab.m_btn0.target, RedDotDataManager.Instance.GetChargeAddUpReward());
         }
     }
 }

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