فهرست منبع

限时累充时间报错

zhaoyang 2 سال پیش
والد
کامیت
406e2cdb9e

+ 2 - 2
FGUIProject/assets/DailyWelfare/LimitChargeUI.xml

@@ -6,8 +6,8 @@
     </loader>
     <component id="n10_idkd" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80"/>
     <image id="n7_idkd" name="n7" src="nyhm5" fileName="imagesNew/sj_db.png" pkg="eg2y0ldp" xy="736,59" group="n6_idkd"/>
-    <text id="n5_idkd" name="txtTime" xy="820,58" pivot="0.5,0" size="193,44" group="n6_idkd" fontSize="32" color="#fffbf9" align="center" text="00天00时00分"/>
-    <group id="n6_idkd" name="n6" xy="736,58" size="366,45" advanced="true">
+    <text id="n5_idkd" name="txtTime" xy="820,58" pivot="0.5,0" size="193,44" group="n6_idkd" fontSize="32" color="#fffbf9" align="center" autoClearText="true" text="00天00时00分"/>
+    <group id="n6_idkd" name="grpTime" xy="736,58" size="366,45" advanced="true">
       <relation target="" sidePair="top-top"/>
     </group>
     <image id="n8_idkd" name="n8" src="nyhm8" fileName="imagesNew/qrhd_db.png" pkg="eg2y0ldp" xy="0,791" group="n12_idkd">

+ 1 - 1
FGUIProject/assets/DailyWelfare/components/Button1.xml

@@ -19,7 +19,7 @@
     </loader>
     <image id="n4_vols" name="n4" src="vols1r" fileName="images/hdbn_zsx.png" xy="0,27"/>
     <image id="n7_vols" name="n7" src="vols1v" fileName="images/hd_sj_dkuang.png" xy="425,263" group="n8_vols"/>
-    <text id="n6_vols" name="txtTime" xy="596,268" pivot="0.5,0" size="260,42" group="n8_vols" font="ui://eg2y0ldpa0cftkx" fontSize="30" color="#fffcf7" text="剩余时间:5天30分"/>
+    <text id="n6_vols" name="txtTime" xy="604,268" pivot="0.5,0" size="244,42" group="n8_vols" font="ui://eg2y0ldpa0cftkx" fontSize="30" color="#fffcf7" autoClearText="true" text="剩余时间:0天0分"/>
     <group id="n8_vols" name="grpTime" xy="425,263" size="493,54" advanced="true">
       <gearDisplay controller="c1" pages="1"/>
     </group>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DailyWelfare/UI_LimitChargeUI.cs

@@ -10,6 +10,7 @@ namespace UI.DailyWelfare
         public GLoader m_loaBg;
         public GButton m_btnBack;
         public GTextField m_txtTime;
+        public GGroup m_grpTime;
         public GList m_list;
         public GButton m_btnCharge;
         public const string URL = "ui://t8nwuj7iidkd14";
@@ -62,6 +63,7 @@ namespace UI.DailyWelfare
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
+            m_grpTime = (GGroup)comp.GetChild("grpTime");
             m_list = (GList)comp.GetChild("list");
             m_btnCharge = (GButton)comp.GetChild("btnCharge");
         }
@@ -70,6 +72,7 @@ namespace UI.DailyWelfare
             m_loaBg = null;
             m_btnBack = null;
             m_txtTime = null;
+            m_grpTime = null;
             m_list = null;
             m_btnCharge = null;
             if(disposeTarget && target != null)

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailyWelfareView.cs

@@ -68,9 +68,9 @@ namespace GFGGame
             || (ActivityDataManager.Instance.sevenDayLoginLoginId >= 7 && ActivityDataManager.Instance.sevenDayLoginBonusStatus == ConstBonusStatus.GOT));
 
             _ui.m_comList.m_btnLimitChargeAddUp.target.visible = ActivityDataManager.Instance.actLimitChargeId > 0;
+            ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
             if (ActivityDataManager.Instance.actLimitChargeId > 0)
             {
-                ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
                 _ui.m_comList.m_btnLimitChargeAddUp.m_loaIcon.url = "ui://DailyWelfare/hdbn_xslc_" + openCfg.res;
                 _ui.m_comList.m_btnLimitChargeAddUp.m_loaTitle.url = "ui://DailyWelfare/hdbn_wz_xslc_" + openCfg.res;
             }
@@ -95,9 +95,9 @@ namespace GFGGame
         {
             if (ActivityDataManager.Instance.actLimitChargeId > 0)
             {
-                ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
+                ActivityInfo activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(ActivityDataManager.Instance.actLimitChargeId);
                 long curTime = TimeHelper.ServerNow();
-                long endTime = TimeUtil.DateTimeToTimestamp(openCfg.endTime);
+                long endTime = activityInfo.endTime;
                 if (curTime < endTime)
                 {
                     _ui.m_comList.m_btnLimitChargeAddUp.m_txtTime.text = string.Format("剩余时间:{0}", TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime));

+ 6 - 2
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/LimitChargeView.cs

@@ -53,7 +53,11 @@ namespace GFGGame
             base.OnShown();
             _rechargeCfgs = ActivityRechargeCfgArray.Instance.GetCfgsByactivityId(ActivityDataManager.Instance.actLimitChargeId);
             UpdateView();
+
+            ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
+
             Timers.inst.Add(1, 0, UpdateTime);
+
         }
         protected override void OnHide()
         {
@@ -73,9 +77,9 @@ namespace GFGGame
         }
         private void UpdateTime(object param)
         {
-            ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
+            ActivityInfo activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(ActivityDataManager.Instance.actLimitChargeId);
             long curTime = TimeHelper.ServerNow();
-            long endTime = TimeUtil.DateTimeToTimestamp(openCfg.endTime);
+            long endTime = activityInfo.endTime;
             _ui.m_txtTime.text = TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
         }
 

BIN
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_fui.bytes