Эх сурвалжийг харах

摘星天市垣按钮跳转商城修改

huangxiaoyue 1 жил өмнө
parent
commit
0b1502376f

+ 11 - 1
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -348,6 +348,16 @@ namespace GFGGame
         // }
         // }
 
 
 
 
-
+        /// <summary>
+        /// 返回活动商城是否显示
+        /// /// </summary>
+        public bool GetShopActivityIsShow()
+        {
+            List<ShopCfg> shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_GIFT_BAG, ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY);
+            if (ShopDataManager.Instance.RemoveNotOpenCfg(shopCfgs).Count == 0)
+                return false;
+            else
+                return true;
+        }
     }
     }
 }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -329,7 +329,7 @@ namespace GFGGame
 
 
         private void OnClikcBtnShop()
         private void OnClikcBtnShop()
         {
         {
-            ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_GIFT_BAG, ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY }, new object[] { typeof(LuckyBoxView).FullName });
+            ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_GIFT_BAG, ConstStoreSubId.STORE_GIFT_BAG_TSY }, new object[] { typeof(LuckyBoxView).FullName });
         }
         }
 
 
         //刷新摘星活动期间的数据
         //刷新摘星活动期间的数据

+ 4 - 2
GameClient/Assets/Game/HotUpdate/Views/Store/StoreView.cs

@@ -75,6 +75,9 @@ namespace GFGGame
             _ui.m_comTab.target.scrollPane.SetPercX((float)(_curTabIndex - 1) / (float)StoreTabCfgArray.Instance.dataArray.Length, false);
             _ui.m_comTab.target.scrollPane.SetPercX((float)(_curTabIndex - 1) / (float)StoreTabCfgArray.Instance.dataArray.Length, false);
 
 
             _curSubTabIndex = this.viewData == null ? 0 : (int)(this.viewData as object[])[1];
             _curSubTabIndex = this.viewData == null ? 0 : (int)(this.viewData as object[])[1];
+            if (_curTabIndex == ConstStoreTabId.STORE_GIFT_BAG && _curSubTabIndex > 0 && !ShopDataManager.Instance.GetShopActivityIsShow()) {
+                _curSubTabIndex -= 1;
+            }
             if (_ui.m_listSubTab.numItems > _curSubTabIndex)
             if (_ui.m_listSubTab.numItems > _curSubTabIndex)
             {
             {
                 _ui.m_listSubTab.selectedIndex = _curSubTabIndex;
                 _ui.m_listSubTab.selectedIndex = _curSubTabIndex;
@@ -131,8 +134,7 @@ namespace GFGGame
                         int menu2 = int.Parse(tabCfg.subTabArr[i][1]);
                         int menu2 = int.Parse(tabCfg.subTabArr[i][1]);
                         if (menu2 == ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY)
                         if (menu2 == ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY)
                         {
                         {
-                            List<ShopCfg> shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_GIFT_BAG, menu2);
-                            if (ShopDataManager.Instance.RemoveNotOpenCfg(shopCfgs).Count == 0) continue;
+                            if (!ShopDataManager.Instance.GetShopActivityIsShow()) continue;
                         }
                         }
                         _storeTabCfgs.Add(tabCfg.subTabArr[i]);
                         _storeTabCfgs.Add(tabCfg.subTabArr[i]);
                     }
                     }