何晓捷 преди 2 години
родител
ревизия
d1f3fbe875

+ 11 - 9
FGUIProject/assets/EnduringGiftBox/EnduringGiftBoxUI.xml

@@ -2,10 +2,10 @@
 <component size="1080,1076">
   <displayList>
     <image id="n0_qqhz" name="n0" src="qqhze" fileName="images/diban.png" xy="23,260" group="n7_qqhz"/>
-    <graph id="n30_qqhz" name="holderPaoMax" xy="402,382" size="69,35" group="n7_qqhz"/>
     <image id="n1_qqhz" name="n1" src="qqhza" fileName="images/kaikou.png" xy="37,61" group="n7_qqhz"/>
     <image id="n3_qqhz" name="n3" src="qqhz4" fileName="images/tape.png" xy="-1,576" group="n7_qqhz"/>
     <image id="n6_qqhz" name="n6" src="qqhzb" fileName="images/heart.png" xy="208,56" group="n7_qqhz" rotation="-0.5"/>
+    <graph id="n30_qqhz" name="holderPaoMax" xy="402,382" size="69,35" group="n7_qqhz"/>
     <graph id="n31_qqhz" name="holderPaoMin" xy="559,520" size="121,68" group="n7_qqhz"/>
     <image id="n5_qqhz" name="n5" src="qqhz5" fileName="images/small_paper.png" xy="261,404" group="n7_qqhz"/>
     <image id="n2_qqhz" name="n2" src="qqhz6" fileName="images/paper.png" xy="30,365" group="n7_qqhz"/>
@@ -13,8 +13,8 @@
     <graph id="n33_qqhz" name="holderFg" xy="550,428" size="97,49" group="n7_qqhz"/>
     <group id="n7_qqhz" name="n7" xy="-1,56" size="1080,1021"/>
     <image id="n27_qqhz" name="n27" src="qqhzq" fileName="images/zsx_flower1.png" xy="224,300" group="n17_qqhz"/>
-    <text id="n9_qqhz" name="txtNeed" xy="481,163" size="444,47" group="n17_qqhz" fontSize="32" color="#915e15" align="center" autoSize="none" text="是否花费20粉钻购买60体力?"/>
-    <text id="n34_qqhz" name="txtNum" xy="481,208" size="444,115" group="n17_qqhz" fontSize="32" color="#915e15" align="center" autoSize="none" text="体力每5分钟恢复1点&#xA;(今日剩余购买次数:8/8)"/>
+    <text id="n9_qqhz" name="txtNeed" xy="423,163" size="531,47" group="n17_qqhz" fontSize="32" color="#915e15" align="center" autoSize="none" text="是否花费12马蹄金 购买10000金币"/>
+    <text id="n34_qqhz" name="txtNum" xy="462,208" size="477,115" group="n17_qqhz" fontSize="32" color="#915e15" align="center" autoSize="none" text="体力每5分钟恢复1点&#xA;(今日剩余购买次数:8/8)"/>
     <component id="n12_qqhz" name="btnCancel" src="qqhzs" fileName="components/BtnCancel.xml" xy="362,326" group="n17_qqhz"/>
     <component id="n14_qqhz" name="btnSure" src="qqhzu" fileName="components/BtnSub.xml" xy="648,326" group="n17_qqhz"/>
     <group id="n17_qqhz" name="n17" xy="224,163" size="799,238" group="n26_qqhz"/>
@@ -43,12 +43,13 @@
     <item time="0" type="Alpha" target="n9_qqhz" value="0"/>
     <item time="0" type="Rotation" target="n0_qqhz" tween="true" startValue="-2" endValue="0" duration="15"/>
     <item time="0" type="Visible" target="n29_qqhz" value="false"/>
-    <item time="0" type="Visible" target="n33_qqhz" value="false"/>
+    <item time="0" type="Visible" target="n35_qqhz" value="false"/>
     <item time="0" type="XY" target="n1_qqhz" tween="true" startValue="6,96" endValue="37,61" duration="12"/>
     <item time="0" type="XY" target="n2_qqhz" tween="true" startValue="-25,400" endValue="30,365" duration="15"/>
     <item time="5" type="Alpha" target="n29_qqhz" value="0"/>
-    <item time="9" type="Alpha" target="n33_qqhz" tween="true" startValue="0.7" endValue="1" duration="6"/>
-    <item time="9" type="Visible" target="n33_qqhz" value="true"/>
+    <item time="5" type="Alpha" target="n3_qqhz" tween="true" startValue="0.2" endValue="1" duration="10"/>
+    <item time="8" type="Alpha" target="n35_qqhz" tween="true" startValue="0.4" endValue="1" duration="11"/>
+    <item time="9" type="Alpha" target="n33_qqhz" tween="true" startValue="0.7" endValue="1" duration="9"/>
     <item time="12" type="Alpha" target="n1_qqhz" tween="true" startValue="0.2" endValue="1" duration="11"/>
     <item time="12" type="Alpha" target="n29_qqhz" tween="true" startValue="0.4" endValue="1" duration="13"/>
     <item time="12" type="Alpha" target="n6_qqhz" tween="true" startValue="0.6" endValue="1" duration="9"/>
@@ -57,14 +58,15 @@
     <item time="13" type="Alpha" target="n5_qqhz" tween="true" startValue="0.5" endValue="1" duration="8"/>
     <item time="14" type="Alpha" target="n34_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
     <item time="14" type="Alpha" target="n9_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
+    <item time="14" type="Visible" target="n35_qqhz" value="true"/>
     <item time="15" type="Alpha" target="n12_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
     <item time="15" type="Alpha" target="n14_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
-    <item time="15" type="Alpha" target="n33_qqhz" tween="true" startValue="1" endValue="0.2" duration="4"/>
     <item time="18" type="Alpha" target="n15_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
     <item time="18" type="Alpha" target="n27_qqhz" tween="true" startValue="0.7" endValue="1" duration="8"/>
-    <item time="19" type="Alpha" target="n3_qqhz" tween="true" startValue="0.7" endValue="1" duration="6"/>
-    <item time="19" type="Visible" target="n33_qqhz" value="false"/>
+    <item time="18" type="Alpha" target="n33_qqhz" tween="true" startValue="1" endValue="0.028" duration="15"/>
+    <item time="24" type="Visible" target="n30_qqhz" value="true"/>
     <item time="25" type="Alpha" target="n30_qqhz" tween="true" startValue="0.5" endValue="1" duration="18"/>
+    <item time="33" type="Alpha" target="n33_qqhz" tween="true" startValue="0.028" endValue="0" duration="3"/>
     <item time="43" type="Alpha" target="n30_qqhz" tween="true" startValue="1" endValue="0" duration="24"/>
     <item time="68" type="Visible" target="n30_qqhz" value="false"/>
   </transition>

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

@@ -6,8 +6,9 @@
     <image id="n0_qqhz" name="bagYellow" src="qqhzk" fileName="images/cz_an_yellow.png" xy="0,0">
       <relation target="" sidePair="width-width,height-height"/>
     </image>
-    <text id="n1_qqhz" name="txtNewPrice" xy="116,0" size="123,69" font="SourceHanSerifCN-SemiBold" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="12元"/>
+    <text id="n1_qqhz" name="txtNewPrice" xy="146,2" size="104,69" font="SourceHanSerifCN-SemiBold" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="12元"/>
     <text id="n2_qqhz" name="txtOldPrice" xy="21,2" size="84,69" font="SourceHanSerifCN-SemiBold" 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>
   <Button/>
 </component>

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

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="78,77">
   <displayList>
-    <image id="n0_qqhz" name="n0" src="qqhz3" fileName="images/tb_zk.png" xy="-3,-2"/>
+    <image id="n3_yjmk" name="n3" src="yjmk27" fileName="images/tb_zk_red.png" xy="-3,-2"/>
     <text id="n1_qqhz" name="txtDiscountNum" xy="8,6" size="57,44" font="SourceHanSerifCN-SemiBold" fontSize="32" color="#fffceb" align="center" autoSize="none" text="1.5"/>
     <text id="n2_qqhz" name="n2" xy="18,36" size="38,34" font="SourceHanSerifCN-SemiBold" fontSize="24" color="#fffceb" align="center" autoSize="none" text="折"/>
   </displayList>

BIN
FGUIProject/assets/EnduringGiftBox/images/tb_zk_red.png


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

@@ -47,6 +47,7 @@
     <component id="qqhz1r" name="ComGouMaiGetText.xml" path="/components/" exported="true"/>
     <image id="qqhz25" name="tili.png" path="/images/"/>
     <component id="qqhz26" name="BnBack.xml" path="/components/" exported="true"/>
+    <image id="yjmk27" name="tb_zk_red.png" path="/images/"/>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/EnduringGiftBox" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 25 - 9
GameClient/Assets/Game/HotUpdate/Data/EnduringGiftBoxDataManager.cs

@@ -8,19 +8,18 @@ namespace GFGGame
 {
     public class EnduringGiftBoxDataManager : SingletonBase<EnduringGiftBoxDataManager>
     {
-        //当天可以领取的列表物品Id
-        private static HashSet<int> _dayAllRebateItemIds = new HashSet<int>();
-
         //当天已经领取的返利物品Id
         private static HashSet<int> _dayRebateItemIds = new HashSet<int>();
-
-        public HashSet<int> DayAllRebateItemIds => _dayAllRebateItemIds;
         public HashSet<int> DayRebateItemIds => _dayRebateItemIds;
 
+        //当天可以领取的列表物品Id,剩余可以领取的天数
+        private static Dictionary<int, int> _dayAllRebateItemDic = new Dictionary<int, int>();
+        public Dictionary<int, int> DayAllRebateItemDic => _dayAllRebateItemDic;
+
         public void InitData()
         {
             _dayRebateItemIds.Clear();
-            _dayAllRebateItemIds.Clear();
+            _dayAllRebateItemDic.Clear();
         }
 
         public void AddDayRebateItemIds(int itemId)
@@ -28,15 +27,32 @@ namespace GFGGame
             _dayRebateItemIds.Add(itemId);
         }
 
-        public void AddDayAllRebateItemIds(int itemId)
+        //领取返利,更新数据
+        public void UpDayRebateInfo(int itemId)
+        {
+            _dayRebateItemIds.Add(itemId);
+            if (!_dayAllRebateItemDic.TryGetValue(itemId, out var num)) return;
+            if (num <= 0)
+            {
+                return;
+            }
+            _dayAllRebateItemDic[itemId] = num - 1;
+        }
+
+        public void UpDayAllRebateItemDic(int itemId, int day)
+        {
+            _dayAllRebateItemDic[itemId] = day;
+        }
+
+        public int GetItemRebateDay(int itemId)
         {
-            _dayAllRebateItemIds.Add(itemId);
+            return _dayAllRebateItemDic.TryGetValue(itemId, out var day) ? day : 0;
         }
 
         //当天是否需要领取该返利物品
         public bool DayIsRebateGiftBox(int itemId)
         {
-            if (!_dayAllRebateItemIds.Contains(itemId))
+            if (!_dayAllRebateItemDic.ContainsKey(itemId))
             {
                 return false;
             }

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

@@ -11,6 +11,7 @@ namespace UI.EnduringGiftBox
         public GImage m_bagYellow;
         public GTextField m_txtNewPrice;
         public GTextField m_txtOldPrice;
+        public GLoader m_loaIcon;
         public const string URL = "ui://bdi1qe15qqhzy";
         public const string PACKAGE_NAME = "EnduringGiftBox";
         public const string RES_NAME = "BtnBuy";
@@ -62,6 +63,7 @@ namespace UI.EnduringGiftBox
             m_bagYellow = (GImage)comp.GetChild("bagYellow");
             m_txtNewPrice = (GTextField)comp.GetChild("txtNewPrice");
             m_txtOldPrice = (GTextField)comp.GetChild("txtOldPrice");
+            m_loaIcon = (GLoader)comp.GetChild("loaIcon");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -69,6 +71,7 @@ namespace UI.EnduringGiftBox
             m_bagYellow = null;
             m_txtNewPrice = null;
             m_txtOldPrice = null;
+            m_loaIcon = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 2 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/CommonSProxy.cs

@@ -39,6 +39,7 @@ namespace GFGGame
 
     public static class CommonSProxy
     {
+        //客户端请求每日重置
         public static async ETTask ResetDailyData()
         {
             M2C_ResetDailyData response = null;
@@ -54,6 +55,7 @@ namespace GFGGame
                     SuitFosterProxy.SendGetSuitInfos().Coroutine();
                     FieldSProxy.ReqFieldInstanceInfos().Coroutine();
                     ArenaSproxy.ReqArenaInfos().Coroutine();
+                    EnduringGiftBoxSProxy.ReqGetAllGiftBagRebateStatus().Coroutine();
                     PromptController.Instance.ShowFloatTextPrompt("每日次数已重置", MessageType.SUCCESS);
                 }
             }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/ServerProxy/EnduringGiftBoxSProxy.cs

@@ -16,9 +16,9 @@ namespace GFGGame
                 if (response.Error == ErrorCode.ERR_Success)
                 {
                     EnduringGiftBoxDataManager.Instance.InitData();
-                    foreach (var item in response.DayAllItemIds)
+                    foreach (var item in response.DayAllItemResidues)
                     {
-                        EnduringGiftBoxDataManager.Instance.AddDayAllRebateItemIds(item);
+                        EnduringGiftBoxDataManager.Instance.UpDayAllRebateItemDic(item.ItemId, item.ResidueNum);
                     }
 
                     foreach (var item in response.ItemIds)
@@ -45,7 +45,7 @@ namespace GFGGame
                 {
                     var itemDataList = ItemUtil.CreateItemDataList(response.ItemList);
                     BonusController.TryShowBonusList(itemDataList);
-                    EnduringGiftBoxDataManager.Instance.AddDayRebateItemIds(ShopCfgArray.Instance.GetCfg(shopId)
+                    EnduringGiftBoxDataManager.Instance.UpDayRebateInfo(ShopCfgArray.Instance.GetCfg(shopId)
                         .itemId);
                     EventAgent.DispatchEvent(ConstMessage.CONTINUOUS_REBATE_GIFT);
                     return true;

+ 3 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs

@@ -39,7 +39,9 @@ namespace GFGGame
                     }
 
                     List<ItemData> itemDatas;
-                    if (itemCfg.itemType == ConstItemType.GIFT_BAG && itemCfg.subType == ConstItemSubType.GIFT_BAG_AUTO)
+                    if (itemCfg.itemType == ConstItemType.GIFT_BAG &&
+                        (itemCfg.subType == ConstItemSubType.GIFT_BAG_AUTO ||
+                         itemCfg.subType == ConstItemSubType.CONTINUOUS_REWARD_GIFT))
                     {
                         itemDatas = ItemUtil.CreateItemDataList(itemCfg.itemsArr, response.Times * shopCfg.itemNum);
                     }

+ 1 - 4
GameClient/Assets/Game/HotUpdate/Utils/ItemUtil.cs

@@ -35,16 +35,13 @@ namespace GFGGame
 
         public static void AddPower(string prefix = "", Action onSuccess = null)
         {
-            int maxLimit = ItemExchangeCfgArray.Instance.GetCfg(ConstItemID.POWER).maxLimit;
-            int lastBuyCount = maxLimit - ItemDataManager.GetItemExchangeTimes(ConstItemID.POWER);
-            string showTxt = string.Format("每5分钟回复1点体力\n今日剩余购买{0}/{1}次", lastBuyCount, maxLimit);
             EnduringGiftBoxController.Show(ConstItemID.POWER, 1, () =>
             {
                 if (onSuccess != null)
                 {
                     onSuccess();
                 }
-            }, showTxt);
+            });
         }
 
         public static void AddGold(long value = 0, Action onSuccess = null)

+ 15 - 0
GameClient/Assets/Game/HotUpdate/Utils/NumberUtil.cs

@@ -1,3 +1,4 @@
+using System;
 using UnityEngine;
 
 namespace GFGGame
@@ -97,5 +98,19 @@ namespace GFGGame
             }
             return num.ToString();
         }
+
+        /// <summary>
+        /// 计算折扣-- 一位小数向上取整
+        /// </summary>
+        /// <param name="originalPrice">原始的价格</param>
+        /// <param name="discountedPrice">现在的价格</param>
+        /// <returns></returns>
+        public static string CalculateDiscount(double originalPrice, double discountedPrice)
+        {
+            double discountRate = discountedPrice / originalPrice;
+            double doubleNum = Math.Ceiling(discountRate * 100) / 10;
+            var roundedNumStr = doubleNum.ToString("0.0");
+            return roundedNumStr;
+        }
     }
 }

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Views/Bag/GiftBoxSelectorView.cs

@@ -259,8 +259,7 @@ namespace GFGGame
         {
             _ui.m_txtSelRewardStr.text = $"已选奖励:{_selCount}/{_count}";
         }
-
-
+        
         //弹出物品详细描述框
         private void OnListSelectorItemClick(EventContext context)
         {

+ 64 - 21
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/EnduringGiftBoxView.cs

@@ -76,7 +76,6 @@ namespace GFGGame
             base.AddEventListener();
             EventAgent.AddEventListener(ConstMessage.CONTINUOUS_REBATE_GIFT_SHOP_BUY, UpDayRebateAndView);
             EventAgent.AddEventListener(ConstMessage.CONTINUOUS_REBATE_GIFT, UpdateView);
-            //EventAgent.AddEventListener(ConstMessage.SHOP_BUY, UpdateView);
         }
 
         protected override void RemoveEventListener()
@@ -137,18 +136,9 @@ namespace GFGGame
             ItemCfg costCfg = ItemCfgArray.Instance.GetCfg(costId);
             _ui.m_txtNeed.text = string.Format("是否花费{0}{1} 购买{2}{3}", coustNum, costCfg.name, buyNum, itemCfg.name);
 
-            _ui.m_txtNum.text = "";
             _maxTimes = ItemExchangeCfgArray.Instance.GetCfg(_itemId).maxLimit;
-            if (_maxTimes != 0)
-            {
-                _ui.m_txtNum.text = string.Format("今日剩余购买次数{0}/{1}", _maxTimes - _buyTimes, _maxTimes);
-            }
-
-            if (_message != "")
-            {
-                _ui.m_txtNum.text = _message;
-            }
 
+            string showTxt = string.Empty;
             _shopCfgList.Clear();
             //常驻礼包
             if (_itemId == ConstItemID.POWER)
@@ -157,6 +147,11 @@ namespace GFGGame
                 _shopCfgList = ShopCfgArray.Instance
                     .GetCfgsBymenu1Andmenu2(ConstStoreTabId.ENDURING_GIFT_BOX, ConstStoreSubId.ENDURING_GIFT_BOX_POWER)
                     .OrderBy(a => a.refreshType).ToList();
+                _ui.m_txtNeed.align = AlignType.Center;
+
+                int maxLimit = ItemExchangeCfgArray.Instance.GetCfg(ConstItemID.POWER).maxLimit;
+                int lastBuyCount = maxLimit - ItemDataManager.GetItemExchangeTimes(ConstItemID.POWER);
+                showTxt = string.Format("每5分钟回复1点体力\n今日剩余购买次数{0}/{1}次", lastBuyCount, maxLimit);
             }
             else
             {
@@ -164,8 +159,15 @@ namespace GFGGame
                 _shopCfgList = ShopCfgArray.Instance
                     .GetCfgsBymenu1Andmenu2(ConstStoreTabId.ENDURING_GIFT_BOX, ConstStoreSubId.ENDURING_GIFT_BOX_GOLD)
                     .OrderBy(a => a.refreshType).ToList();
+                _ui.m_txtNeed.align = AlignType.Right;
+
+                if (_maxTimes != 0)
+                {
+                    showTxt = string.Format("今日剩余购买次数{0}/{1}", _maxTimes - _buyTimes, _maxTimes);
+                }
             }
 
+            _ui.m_txtNum.text = showTxt;
             _ui.m_txtPromptExt.text = string.Format("除了上述购买{0}的途径,我们还提供了更多的优惠礼包选择", itemCfg.name);
             _ui.m_list.itemRenderer = ListItemRender;
             _ui.m_list.numItems = _shopCfgList.Count;
@@ -194,16 +196,49 @@ namespace GFGGame
             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_txtNewPrice.text = $"{shopCfg.price}元";
+            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.m_loaIcon.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_comDiscount.target.visible = true;
-                item.m_comLeftGiftBox.m_comDiscount.m_txtDiscountNum.text = "1.5折"; //之后再计算赋值
                 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);
@@ -232,17 +267,18 @@ namespace GFGGame
             {
                 //周刷
                 var weekGiftBoxState = EnduringGiftBoxDataManager.Instance.DayIsRebateGiftBox(shopCfg.itemId);
-                item.m_comLeftGiftBox.m_comDiscount.target.visible = false;
                 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);
-                item.m_txtLrc.text = string.Format("剩余{0}天", "");
+                item.m_txtLrc.text = string.Format("剩余{0}天",
+                    EnduringGiftBoxDataManager.Instance.GetItemRebateDay(itemCfg.id));
                 item.m_txtWeekPrompt.visible = true;
                 item.m_txtWeekPrompt.text =
-                    string.Format("连续{0}天每日获得", NumberUtil.GetChiniseNumberText(itemCfg.param2Arr[0]));
+                    string.Format("连续{0}天每日获得",
+                        itemCfg.param2Arr[0] + 1); //NumberUtil.GetChiniseNumberText(itemCfg.param2Arr[0])
                 item.m_icoWeekPromptTag.visible = true;
 
                 numItems = childItemCfg.param1Arr.Length;
@@ -448,21 +484,28 @@ namespace GFGGame
                 }
             }
 
-            this.Hide();
+            UpdateView();
+            //this.Hide();
         }
 
         private void UpDayRebateAndView(EventContext context)
         {
             ShopCfg shopCfg = context.data as ShopCfg;
             var itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
-            
+
             if (itemCfg.itemType == ConstItemType.GIFT_BAG &&
                 itemCfg.subType == ConstItemSubType.CONTINUOUS_REWARD_GIFT)
             {
-                EnduringGiftBoxDataManager.Instance.AddDayAllRebateItemIds(itemCfg.id);
+                int dayNum = EnduringGiftBoxDataManager.Instance.GetItemRebateDay(itemCfg.id);
+                if (dayNum > 0)
+                {
+                    dayNum -= 1;
+                }
+
+                EnduringGiftBoxDataManager.Instance.UpDayAllRebateItemDic(itemCfg.id, dayNum);
                 EnduringGiftBoxDataManager.Instance.AddDayRebateItemIds(itemCfg.id);
             }
-            
+
             UpdateView();
         }
 

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