Browse Source

商城增加返利商城

huangxiaoyue 1 year ago
parent
commit
a028f7145b
36 changed files with 477 additions and 31 deletions
  1. 1 1
      GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs
  2. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_BtnBuy.cs
  3. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_BtnBuy.cs.meta
  4. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_BtnReceive.cs
  5. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_BtnReceive.cs.meta
  6. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComCurSupplyItem.cs
  7. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComCurSupplyItem.cs.meta
  8. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComDiscount.cs
  9. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComDiscount.cs.meta
  10. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComGouMaiGetText.cs
  11. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComGouMaiGetText.cs.meta
  12. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComLeftGiftBox.cs
  13. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComLeftGiftBox.cs.meta
  14. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComSpecialOfferGiftBoxItem.cs
  15. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComSpecialOfferGiftBoxItem.cs.meta
  16. 74 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreGiftBagAddRebateUI.cs
  17. 11 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreGiftBagAddRebateUI.cs.meta
  18. 1 0
      GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs
  19. 0 2
      GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/SpecialOfferGiftBoxView.cs
  20. 351 0
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreGiftBagAddRebateView.cs
  21. 11 0
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreGiftBagAddRebateView.cs.meta
  22. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png
  23. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png
  24. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png
  25. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png
  26. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3!a.png
  27. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3.png
  28. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8!a.png
  29. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8.png
  30. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes
  31. BIN
      GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0!a.png
  32. BIN
      GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0.png
  33. BIN
      GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_fui.bytes
  34. BIN
      GameClient/Assets/ResIn/UI/Store/Store_atlas0!a.png
  35. BIN
      GameClient/Assets/ResIn/UI/Store/Store_atlas0.png
  36. BIN
      GameClient/Assets/ResIn/UI/Store/Store_fui.bytes

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/ShopViewManager.cs

@@ -140,7 +140,7 @@ namespace GFGGame
             UI_ListShopItem.ProxyEnd();
         }
 
-        private void OnBtnBugItem(EventContext context)
+        public void OnBtnBugItem(EventContext context)
         {
             ShopCfg cfg = (context.sender as GObject).data as ShopCfg;
             bool isSellOut = cfg.maxBuyNum > 0 && cfg.maxBuyNum - ShopDataManager.Instance.GetGoodsBuyNumById(cfg.id) <= 0;

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_BtnBuy.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_BtnBuy.cs

@@ -2,7 +2,7 @@
 
 using FairyGUI;
 
-namespace UI.EnduringGiftBox
+namespace UI.CommonGame
 {
     public partial class UI_BtnBuy
     {
@@ -13,8 +13,8 @@ namespace UI.EnduringGiftBox
         public GLoader m_loaIcon;
         public GTextField m_txtNewPrice;
         public GTextField m_txtSoldOut;
-        public const string URL = "ui://bdi1qe15qqhzy";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
+        public const string URL = "ui://eg2y0ldpqqhzy";
+        public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "BtnBuy";
         private static UI_BtnBuy _proxy;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_BtnBuy.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_BtnBuy.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 420206d4073deee4e8e39b5f3eb7a13c
+guid: 8c4896a5936680f42801012c062d6fd6
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_BtnReceive.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_BtnReceive.cs

@@ -2,7 +2,7 @@
 
 using FairyGUI;
 
-namespace UI.EnduringGiftBox
+namespace UI.CommonGame
 {
     public partial class UI_BtnReceive
     {
@@ -10,8 +10,8 @@ namespace UI.EnduringGiftBox
         public GImage m_received;
         public GImage m_receive;
         public GTextField m_txtRec;
-        public const string URL = "ui://bdi1qe15qqhzv";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
+        public const string URL = "ui://eg2y0ldpqqhzv";
+        public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "BtnReceive";
         private static UI_BtnReceive _proxy;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_BtnReceive.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_BtnReceive.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 2684fe10b61ad624ab7f479ccfbded90
+guid: 9c070671ba8217946867bca4d3a8947e
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

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

@@ -2,7 +2,7 @@
 
 using FairyGUI;
 
-namespace UI.EnduringGiftBox
+namespace UI.CommonGame
 {
     public partial class UI_ComCurSupplyItem
     {
@@ -16,8 +16,8 @@ namespace UI.EnduringGiftBox
         public GTextField m_txtWeekPrompt;
         public GList m_list;
         public GComponent m_btnIcoWeekPromptTag;
-        public const string URL = "ui://bdi1qe15qqhz11";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
+        public const string URL = "ui://eg2y0ldpqqhz11";
+        public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComCurSupplyItem";
         private static UI_ComCurSupplyItem _proxy;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComCurSupplyItem.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComCurSupplyItem.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 092a2512d4c0ea84ca20a4a5ebd2a3e8
+guid: 2feaedff8bcbb794f88dfe32315423a9
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComDiscount.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComDiscount.cs

@@ -2,14 +2,14 @@
 
 using FairyGUI;
 
-namespace UI.EnduringGiftBox
+namespace UI.CommonGame
 {
     public partial class UI_ComDiscount
     {
         public GComponent target;
         public GTextField m_txtDiscountNum;
-        public const string URL = "ui://bdi1qe15qqhz1o";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
+        public const string URL = "ui://eg2y0ldpqqhz1o";
+        public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComDiscount";
         private static UI_ComDiscount _proxy;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComDiscount.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComDiscount.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 6d3f7f6dcf5d5654a9714dfcb7c8e88f
+guid: 56119e544377da840a612ab0e85758d2
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComGouMaiGetText.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComGouMaiGetText.cs

@@ -2,15 +2,15 @@
 
 using FairyGUI;
 
-namespace UI.EnduringGiftBox
+namespace UI.CommonGame
 {
     public partial class UI_ComGouMaiGetText
     {
         public GComponent target;
         public GLoader m_loaIcon;
         public GTextField m_txtGetGold;
-        public const string URL = "ui://bdi1qe15qqhz1r";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
+        public const string URL = "ui://eg2y0ldpqqhz1r";
+        public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComGouMaiGetText";
         private static UI_ComGouMaiGetText _proxy;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComGouMaiGetText.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComGouMaiGetText.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: b8656719029ba1546bc435ca78e27a5c
+guid: 7dbb0505aa259c8418f8db917ff0351f
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComLeftGiftBox.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComLeftGiftBox.cs

@@ -2,7 +2,7 @@
 
 using FairyGUI;
 
-namespace UI.EnduringGiftBox
+namespace UI.CommonGame
 {
     public partial class UI_ComLeftGiftBox
     {
@@ -10,8 +10,8 @@ namespace UI.EnduringGiftBox
         public GLoader m_loaIcon;
         public UI_ComDiscount m_comDiscount;
         public UI_ComGouMaiGetText m_comGouMaiGetText;
-        public const string URL = "ui://bdi1qe15qqhz1q";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
+        public const string URL = "ui://eg2y0ldpqqhz1q";
+        public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComLeftGiftBox";
         private static UI_ComLeftGiftBox _proxy;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComLeftGiftBox.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComLeftGiftBox.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 755ea422436d8d243bcf99b8333717a1
+guid: 42f42acaedcc68b4caa8367d0edd03b0
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComSpecialOfferGiftBoxItem.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComSpecialOfferGiftBoxItem.cs

@@ -2,7 +2,7 @@
 
 using FairyGUI;
 
-namespace UI.EnduringGiftBox
+namespace UI.CommonGame
 {
     public partial class UI_ComSpecialOfferGiftBoxItem
     {
@@ -17,8 +17,8 @@ namespace UI.EnduringGiftBox
         public GList m_list;
         public GGraph m_holderZheKou;
         public Transition m_t0;
-        public const string URL = "ui://bdi1qe15yjmk37";
-        public const string PACKAGE_NAME = "EnduringGiftBox";
+        public const string URL = "ui://eg2y0ldpyjmk37";
+        public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComSpecialOfferGiftBoxItem";
         private static UI_ComSpecialOfferGiftBoxItem _proxy;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComSpecialOfferGiftBoxItem.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComSpecialOfferGiftBoxItem.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: e41dcac9e35c48f41a8d78b5af67e5a4
+guid: 7a77502cc30492640ac787561bbb215b
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 74 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreGiftBagAddRebateUI.cs

@@ -0,0 +1,74 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Store
+{
+    public partial class UI_StoreGiftBagAddRebateUI
+    {
+        public GComponent target;
+        public GList m_rebateList;
+        public GComponent m_valueBar;
+        public const string URL = "ui://p9mtgheomxaite2";
+        public const string PACKAGE_NAME = "Store";
+        public const string RES_NAME = "StoreGiftBagAddRebateUI";
+        private static UI_StoreGiftBagAddRebateUI _proxy;
+
+        public static UI_StoreGiftBagAddRebateUI Create(GObject gObject = null)
+        {
+            var ui = new UI_StoreGiftBagAddRebateUI();
+            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_StoreGiftBagAddRebateUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_StoreGiftBagAddRebateUI();
+            }
+            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_rebateList = (GList)comp.GetChild("rebateList");
+            m_valueBar = (GComponent)comp.GetChild("valueBar");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_rebateList = null;
+            m_valueBar = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_StoreGiftBagAddRebateUI.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e7aea9feb62a21b47aed6c3aac39dcb6
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

@@ -332,6 +332,7 @@ namespace GFGGame
             item.m_list.itemRenderer = ChildListItemRender;
             //item.m_list.onClickItem.Add(OnListSelectorItemClick);
             item.m_list.numItems = numItems;
+            UI_ComCurSupplyItem.ProxyEnd();
         }
 
         //领取按钮点击事件

+ 0 - 2
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/SpecialOfferGiftBoxView.cs

@@ -5,8 +5,6 @@ using ET;
 using FairyGUI;
 using UI.CommonGame;
 using UI.EnduringGiftBox;
-using UnityEngine;
-
 
 namespace GFGGame
 {

+ 351 - 0
GameClient/Assets/Game/HotUpdate/Views/Store/StoreGiftBagAddRebateView.cs

@@ -0,0 +1,351 @@
+using UI.Store;
+using UI.CommonGame;
+using FairyGUI;
+using System.Collections.Generic;
+using ET;
+
+namespace GFGGame
+{
+    public class StoreGiftBagAddRebateView : BaseWindow
+    {
+        private UI_StoreGiftBagAddRebateUI _ui;
+        private ValueBarController _valueBarController;
+        private List<ShopCfg> _shopCfgs;
+        private int menu2;
+        private int _itemId; //道具id,该页面目前只给:体力,金币使用
+
+        public override void Dispose()
+        {
+            if (_valueBarController != null)
+            {
+                _valueBarController.Dispose();
+                _valueBarController = null;
+            }
+            if (_ui != null)
+            {
+                _ui.Dispose();
+            }
+            _ui = null;
+            base.Dispose();
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_StoreGiftBagUI.PACKAGE_NAME;
+            _ui = UI_StoreGiftBagAddRebateUI.Create();
+            this.viewCom = _ui.target;
+            isfullScreen = true;
+            this.clickBlankToClose = false;
+            this.bringToFontOnClick = false;
+
+            _ui.m_rebateList.itemRenderer = ListItemRenderer;
+            _valueBarController = new ValueBarController(_ui.m_valueBar);
+        }
+        protected override void AddEventListener()
+        {
+            base.AddEventListener();
+            EventAgent.AddEventListener(ConstMessage.SHOP_BUY, UpdateView);
+        }
+        protected override void OnShown()
+        {
+            base.OnShown();
+            menu2 = (int)this.viewData;
+            _shopCfgs = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.STORE_GIFT_BAG, menu2);
+            _shopCfgs = ShopDataManager.Instance.RemoveNotOpenCfg(_shopCfgs);
+            _valueBarController.OnShown();
+            _valueBarController.UpdateList(ShopDataManager.Instance.GetShopCostIds(_shopCfgs));
+            _ui.m_rebateList.scrollPane.ScrollTop();
+            UpdateView();
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+            ShopViewManager.Instance.ClearItemEff();
+            _valueBarController.OnHide();
+        }
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+            EventAgent.RemoveEventListener(ConstMessage.SHOP_BUY, UpdateView);
+        }
+
+        private void UpdateView()
+        {
+            _shopCfgs = ShopDataManager.Instance.SortShopGoodsCfgs(_shopCfgs);
+            _ui.m_rebateList.numItems = _shopCfgs.Count;
+        }
+
+        private void ListItemRenderer(int index, GObject obj)
+        {
+            ShopCfg shopCfg = _shopCfgs[index];
+            UI_ComCurSupplyItem item = UI_ComCurSupplyItem.Proxy(obj);
+
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
+
+            item.target.data = shopCfg;
+
+            //返利包
+            item.m_txtTitle.text = itemCfg.name;
+            item.m_txtWeekPrompt.visible = false;
+            item.m_btnIcoWeekPromptTag.visible = false;
+            if (itemCfg.param2Arr.Length != 0)
+            {
+                item.m_txtWeekPrompt.visible = true;
+                item.m_btnIcoWeekPromptTag.visible = true;
+                item.m_txtWeekPrompt.text = string.Format("连续{0}天每日获得", itemCfg.param2Arr[0]);
+            }
+
+            int numItems;
+            var childItemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
+            var remainBuyNum = shopCfg.maxBuyNum - ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id);
+            item.m_comLeftGiftBox.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
+
+            item.m_btnBuy.m_txtOldPrice.text = $"{shopCfg.originalPrice}";
+            item.m_btnBuy.m_loaIcon.visible = false;
+            string mTxtOldPrice = string.Empty;
+            if (shopCfg.costType == CostType.ITEM)
+            {
+                //货币  
+                ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(shopCfg.costId);
+                item.m_btnBuy.m_loaIcon.visible = true;
+                item.m_btnBuy.m_loaIcon.url = ResPathUtil.GetIconPath(costCfg);
+            }
+            else if (shopCfg.costType == CostType.RMB)
+            {
+                //人民币
+                mTxtOldPrice = "元";
+            }
+            else
+            {
+                //免费
+                mTxtOldPrice = $"免费";
+                item.m_btnBuy.m_txtOldPrice.text = "";
+                item.m_btnBuy.m_txtNewPrice.align = AlignType.Left;
+                item.m_btnBuy.m_txtNewPrice.x = 90;
+            }
+
+            item.m_btnBuy.m_txtNewPrice.text = $"{shopCfg.price + mTxtOldPrice}";
+            item.m_comLeftGiftBox.target.data = itemCfg;
+            item.m_comLeftGiftBox.target.onClick.Add(OnListSelectorItemClick);
+
+            if (shopCfg.originalPrice != shopCfg.price)
+            {
+                var roundedNumStr = NumberUtil.CalculateDiscount(shopCfg.originalPrice, shopCfg.price);
+                item.m_comLeftGiftBox.m_comDiscount.target.visible = true;
+                item.m_comLeftGiftBox.m_comDiscount.m_txtDiscountNum.text = $"{roundedNumStr}折"; //之后再计算赋值
+            }
+            else
+            {
+                item.m_comLeftGiftBox.m_comDiscount.target.visible = false;
+            }
+
+            if (shopCfg.refreshType == RefreshType.DAY) //也可以换成人民币来做条件
+            {
+                //日刷
+                item.m_comLeftGiftBox.m_comGouMaiGetText.target.visible = false;
+                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_btnIcoWeekPromptTag.visible = false;
+                numItems = childItemCfg.itemsArr.Length;
+
+                if (remainBuyNum == 0)
+                {
+                    //已售完
+                    item.m_btnBuy.target.visible = true;
+                    item.m_btnCurReceive.target.visible = false;
+                    item.m_btnBuy.m_bagYellow.visible = false;
+                    item.m_btnBuy.m_bagGrey.visible = true;
+                }
+                else
+                {
+                    //未售完
+                    item.m_btnBuy.target.visible = true;
+                    item.m_btnCurReceive.target.visible = false;
+                    item.m_btnBuy.m_bagYellow.visible = true;
+                    item.m_btnBuy.m_bagGrey.visible = false;
+                }
+            }
+            else
+            {
+                //周刷
+                var weekGiftBoxState = EnduringGiftBoxDataManager.Instance.DayIsRebateGiftBox(shopCfg.itemId);
+                item.m_comLeftGiftBox.m_comGouMaiGetText.target.visible = true;
+                var itemArr = itemCfg.itemsArr[0];
+                ItemCfg getItemCfg = ItemCfgArray.Instance.GetCfg(itemArr[0]); //及时获得的物品,读取第一个显示ICON
+                item.m_comLeftGiftBox.m_comGouMaiGetText.m_loaIcon.url = ResPathUtil.GetIconPath(getItemCfg);
+                item.m_comLeftGiftBox.m_comGouMaiGetText.m_txtGetGold.text = itemArr[1].ToString();
+                item.m_txtUrc.text = string.Format("每周限购{0}/{1}", remainBuyNum, shopCfg.maxBuyNum);
+                int rebateDay = EnduringGiftBoxDataManager.Instance.GetItemRebateDay(itemCfg.id);
+                string mTxtLrc = string.Empty;
+                if (rebateDay != 0)
+                {
+                    mTxtLrc = string.Format("剩余{0}天", rebateDay);
+                }
+
+                item.m_txtLrc.text = mTxtLrc;
+                item.m_txtWeekPrompt.visible = true;
+                item.m_txtWeekPrompt.text =
+                    string.Format("连续{0}天每日获得",
+                        itemCfg.param2Arr[0] + 1); //NumberUtil.GetChiniseNumberText(itemCfg.param2Arr[0])
+                item.m_btnIcoWeekPromptTag.visible = true;
+
+                numItems = childItemCfg.param1Arr.Length;
+
+                //领取加红点
+                RedDotController.Instance.SetComRedDot(item.m_btnCurReceive.target, weekGiftBoxState);
+                //是否需要领取
+                if (weekGiftBoxState)
+                {
+                    item.m_btnBuy.target.visible = false;
+                    item.m_btnCurReceive.target.visible = true;
+                    item.m_btnCurReceive.m_receive.visible = true;
+                    item.m_btnCurReceive.m_received.visible = false;
+                    item.m_btnCurReceive.m_txtRec.text = "领取";
+                }
+                else
+                {
+                    //是否能购买
+                    if (remainBuyNum == 0)
+                    {
+                        //已经领取
+                        if (EnduringGiftBoxDataManager.Instance.DayRebateItemIds.Contains(shopCfg.itemId))
+                        {
+                            item.m_btnBuy.target.visible = false;
+                            item.m_btnCurReceive.target.visible = true;
+                            item.m_btnCurReceive.m_receive.visible = false;
+                            item.m_btnCurReceive.m_received.visible = true;
+                            item.m_btnCurReceive.m_txtRec.text = "已领取";
+                        }
+                        else
+                        {
+                            item.m_btnCurReceive.target.visible = false;
+                            item.m_btnBuy.target.visible = true;
+                            item.m_btnBuy.m_bagGrey.visible = true;
+                            item.m_btnBuy.m_bagYellow.visible = false;
+                        }
+                    }
+                    else
+                    {
+                        //未售完
+                        item.m_btnBuy.target.visible = true;
+                        item.m_btnBuy.m_bagGrey.visible = false;
+                        item.m_btnBuy.m_bagYellow.visible = true;
+                        item.m_btnCurReceive.target.visible = false;
+                    }
+                }
+            }
+
+            item.m_btnIcoWeekPromptTag.onClick.Add(RuleController.ShowRuleView);
+            item.m_btnIcoWeekPromptTag.data = 300013;
+            //领取按钮点击事件
+            item.m_btnCurReceive.target.onClick.Add(OnBtnCurReceiveClick);
+            //购买按钮点击事件
+            item.m_btnBuy.target.onClick.Add(OnBtnBuyClick);
+
+            item.m_list.data = shopCfg;
+            item.m_list.itemRenderer = ChildListItemRender;
+            //item.m_list.onClickItem.Add(OnListSelectorItemClick);
+            item.m_list.numItems = numItems;
+            UI_ComCurSupplyItem.ProxyEnd();
+
+            RedDotController.Instance.SetComRedDot(obj.asCom, menu2 == ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY && shopCfg.price == 0 && ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id) < shopCfg.maxBuyNum, "", 5, 76);
+        }
+
+        // ReSharper disable Unity.PerformanceAnalysis
+        private void ChildListItemRender(int index, GObject obj)
+        {
+            UI_ComItem uiItemChild = UI_ComItem.Proxy(obj);
+            var shopCfg = uiItemChild.target.parent.data as ShopCfg;
+            var itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
+            int[][] result;
+            if (shopCfg.refreshType == RefreshType.DAY)
+            {
+                result = itemCfg.itemsArr;
+            }
+            else
+            {
+                //周刷
+                result = itemCfg.param1Arr;
+            }
+           
+            var itemArr = result[index];
+            var itemCfgChild = ItemCfgArray.Instance.GetCfg(itemArr[0]);
+            uiItemChild.target.data = itemCfgChild;
+            uiItemChild.target.onClick.Add(OnListSelectorItemClick);
+            uiItemChild.m_txtCount.text = itemArr[1].ToString();
+            uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
+            uiItemChild.m_QualityType.selectedIndex = itemCfgChild.rarity - 1;
+
+            UI_ComItem.ProxyEnd();
+        }
+
+        //弹出物品详细描述框
+        private void OnListSelectorItemClick(EventContext context)
+        {
+            GObject item = context.sender as GObject;
+            ItemCfg itemCfg = item.data as ItemCfg;
+            GoodsItemTipsController.ShowItemTips(itemCfg.id);
+        }
+
+        //领取按钮点击事件
+        // ReSharper disable Unity.PerformanceAnalysis
+        private void OnBtnCurReceiveClick(EventContext context)
+        {
+            GObject sender = context.sender as GObject;
+            GObject obj = sender.parent;
+            ShopCfg cfg = obj.data as ShopCfg;
+            bool isSellOut = EnduringGiftBoxDataManager.Instance.DayIsRebateGiftBox(cfg.itemId);
+
+            if (isSellOut)
+            {
+                EnduringGiftBoxSProxy.ReqGetGiftBagRebate(cfg.id).Coroutine();
+            }
+            else
+            {
+                PromptController.Instance.ShowFloatTextPrompt("无法领取");
+            }
+        }
+
+        //购买按钮点击事件
+        // ReSharper disable Unity.PerformanceAnalysis
+        private void OnBtnBuyClick(EventContext context)
+        {
+            //if (_itemId == ConstItemID.POWER && GuideDataManager.IsGuideFinish(ConstGuideId.BUY_POWER) <= 0)
+            //{
+            //    GuideController.TryCompleteGuideIndex(ConstGuideId.BUY_POWER, 1);
+            //    GuideController.TryCompleteGuide(ConstGuideId.BUY_POWER, 1);
+            //}
+
+            GObject sender = context.sender as GObject;
+            GObject obj = sender.parent;
+            ShopCfg cfg = obj.data as ShopCfg;
+            bool isSellOut = cfg.maxBuyNum > 0 &&
+                             cfg.maxBuyNum - ShopDataManager.Instance.GetGoodsBuyNumById(cfg.id) <= 0;
+
+            if (isSellOut)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("已售罄");
+                return;
+            }
+
+            if (!ShopDataManager.Instance.GetShopGoodsStateById(cfg.id))
+            {
+                PromptController.Instance.ShowFloatTextPrompt(ShopDataManager.Instance.GetShopGoodsStateTips(cfg.id));
+                return;
+            }
+
+            if (cfg.costType == CostType.FREE)
+            {
+                ShopSProxy.ReqShopBuy(cfg.id, 1).Coroutine();
+                LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
+            }
+            else
+            {
+                ViewManager.Show<ItemExchangeView>(cfg.id);
+            }
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/Store/StoreGiftBagAddRebateView.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2a1ad2187cfb7db4abb339aa13b1d15c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8!a.png


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_8.png


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


BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_atlas0.png


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


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


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


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