zhaoyang 2 years ago
parent
commit
e7156511d0

+ 3 - 2
FGUIProject/assets/DailyWelfare/DailyWelfareUI.xml

@@ -11,7 +11,7 @@
     <component id="n1_fqor" name="btnback" src="uyuxtj5" fileName="components/ButtonBack.xml" pkg="eg2y0ldp" xy="35,196" group="n3_fqor">
       <Button icon="ui://t8nwuj7ifqor1"/>
     </component>
-    <image id="n2_fqor" name="n2" src="fqor2" fileName="images/wpbb_xtxt.png" xy="54,312" group="n3_fqor"/>
+    <image id="n2_fqor" name="n2" src="fqor2" fileName="imagesTest/wpbb_xtxt.png" xy="54,312" group="n3_fqor"/>
     <group id="n3_fqor" name="grpTop" xy="0,95" size="1080,229"/>
     <component id="n4_fqor" name="n4" src="ojlzr" fileName="components/BtnTab.xml" pkg="eg2y0ldp" xy="43,347" group="n7_fqor">
       <Button checked="true" title="每日签到" controller="c1" page="0"/>
@@ -26,8 +26,9 @@
     <component id="n8_fqor" name="proSign" src="fqor7" fileName="components/ProgressBar1.xml" xy="115,524" pivot="0,0.5" anchor="true" group="n21_fqor">
       <ProgressBar value="50" max="100"/>
     </component>
-    <text id="n9_fqor" name="txtSignCount" xy="53,448" pivot="0.5,0" size="20,42" group="n21_fqor" fontSize="30" text="1"/>
+    <text id="n9_fqor" name="txtSignCount" xy="53,448" pivot="0.5,0" size="20,41" group="n21_fqor" fontSize="30" text="1"/>
     <list id="n20_fqor" name="list" xy="53,616" size="974,1130" group="n21_fqor" layout="flow_hz" lineGap="20" colGap="20" defaultItem="ui://t8nwuj7ifqor9" autoClearItems="true">
+      <relation target="" sidePair="bottomext-bottom"/>
       <item/>
       <item/>
       <item/>

+ 4 - 0
FGUIProject/assets/Main/MainUI.xml

@@ -9,6 +9,10 @@
     <component id="n46_lh8v" name="btnDailyLogin" src="ox5bf5" fileName="components/Button2.xml" xy="24,305" group="n52_qqat" visible="false">
       <relation target="" sidePair="left-left,top-top"/>
     </component>
+    <component id="n74_fqor" name="btnDailyWelfare" src="ox5bf5" fileName="components/Button2.xml" xy="18,457" group="n52_qqat" visible="false">
+      <relation target="" sidePair="left-left,top-top"/>
+      <Button title="福利大厅"/>
+    </component>
     <component id="n4_q08x" name="btnMain" src="q08xu" fileName="components/ButtonModle1.xml" xy="720,1617" size="310,275" group="n52_qqat">
       <relation target="" sidePair="bottom-bottom"/>
       <Button icon="ui://mfvz4q8kv482fm"/>

+ 1 - 0
FGUIProject/assets/Main/components/Button2.xml

@@ -6,6 +6,7 @@
       <relation target="" sidePair="width-width,height-height"/>
     </image>
     <graph id="n1_ox5b" name="holder" xy="235,50" size="1,1" touchable="false"/>
+    <text id="n2_fqor" name="title" xy="213,39" pivot="0.5,0.5" size="40,42" fontSize="30" align="center" text=""/>
   </displayList>
   <Button/>
 </component>

+ 4 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_MainUI.cs

@@ -10,6 +10,7 @@ namespace UI.Main
         public GComponent m_valueBar;
         public UI_ComponentHeadBar m_headBar;
         public UI_Button2 m_btnDailyLogin;
+        public UI_Button2 m_btnDailyWelfare;
         public UI_ButtonModle1 m_btnMain;
         public UI_ButtonModle1 m_btnHuanZhuang;
         public UI_ButtonModle1 m_btnXiuFang;
@@ -84,6 +85,7 @@ namespace UI.Main
             m_valueBar = (GComponent)comp.GetChild("valueBar");
             m_headBar = (UI_ComponentHeadBar)UI_ComponentHeadBar.Create(comp.GetChild("headBar"));
             m_btnDailyLogin = (UI_Button2)UI_Button2.Create(comp.GetChild("btnDailyLogin"));
+            m_btnDailyWelfare = (UI_Button2)UI_Button2.Create(comp.GetChild("btnDailyWelfare"));
             m_btnMain = (UI_ButtonModle1)UI_ButtonModle1.Create(comp.GetChild("btnMain"));
             m_btnHuanZhuang = (UI_ButtonModle1)UI_ButtonModle1.Create(comp.GetChild("btnHuanZhuang"));
             m_btnXiuFang = (UI_ButtonModle1)UI_ButtonModle1.Create(comp.GetChild("btnXiuFang"));
@@ -116,6 +118,8 @@ namespace UI.Main
             m_headBar = null;
             m_btnDailyLogin.Dispose();
             m_btnDailyLogin = null;
+            m_btnDailyWelfare.Dispose();
+            m_btnDailyWelfare = null;
             m_btnMain.Dispose();
             m_btnMain = null;
             m_btnHuanZhuang.Dispose();

+ 14 - 14
GameClient/Assets/Game/HotUpdate/ServerProxy/ChatSProxy.cs

@@ -38,22 +38,22 @@ namespace GFGGame
             response = (S2C_SendChatMsg)await MessageHelper.SendToServer(new C2S_SendChatMsg() { Type = type, Content = content, TargetId = targetId });
             if (response != null)
             {
-                ChatData chatData = new ChatData();
-                chatData.Type = type;
-                chatData.RoleInfo = RoleDataManager.GetMineRoleInfoData();
-                chatData.TargetId = targetId;
-                chatData.Content = content;
-                chatData.Time = TimeHelper.ServerNow();
+                // ChatData chatData = new ChatData();
+                // chatData.Type = type;
+                // chatData.RoleInfo = RoleDataManager.GetMineRoleInfoData();
+                // chatData.TargetId = targetId;
+                // chatData.Content = content;
+                // chatData.Time = TimeHelper.ServerNow();
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    if (type == ChatType.Private)
-                    {
-                        ChatDataManager.Instance.GetChatDatas(targetId).Add(chatData);
-                    }
-                    else
-                    {
-                        ChatDataManager.Instance.GetChatDatas(type).Add(chatData);
-                    }
+                    // if (type == ChatType.Private)
+                    // {
+                    //     ChatDataManager.Instance.GetChatDatas(targetId).Add(chatData);
+                    // }
+                    // else
+                    // {
+                    //     ChatDataManager.Instance.GetChatDatas(type).Add(chatData);
+                    // }
                     return true;
                 }
             }

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

@@ -55,8 +55,8 @@ namespace GFGGame
             _valueBarController.OnShown();
             _month = DateTime.Now.Month;
             _day = DateTime.Now.Day;
-            _ui.m_list.ScrollToView(0);
-
+            // _ui.m_list.ScrollToView(0);
+            UpdateSgignView();
         }
 
         protected override void OnHide()
@@ -106,10 +106,40 @@ namespace GFGGame
             item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
             item.m_txtCount.text = bonusCfg.bonusArr[0][1].ToString();
             item.m_imgGot.visible = DailyWelfareManager.Instance.DailySignDatas.IndexOf(bonusCfg.day) >= 0;
-            // item.m_imgNotGet.visible = DailyWelfareManager.Instance.DailySignDatas.IndexOf(bonusCfg.day) >= 0;
-
+            item.m_imgNotGet.visible = bonusCfg.day < _day && DailyWelfareManager.Instance.DailySignDatas.IndexOf(bonusCfg.day) >= 0;
+            RedDotController.Instance.SetComRedDot(item.target, bonusCfg.day == _day && DailyWelfareManager.Instance.DailySignDatas.IndexOf(bonusCfg.day) < 0);
+            if (item.target.data == null)
+            {
+                item.target.onClick.Add(OnGetSignBonus);
+            }
+            item.target.data = bonusCfg.day;
             UI_ListSignItem.ProxyEnd();
         }
+        private async void OnGetSignBonus(EventContext context)
+        {
+            GObject obj = context.sender as GObject;
+            int day = (int)obj.data;
+            bool result = false;
+            if (day > _day) return;
+            if (day < _day)
+            {
+                int[] cost = GlobalCfgArray.globalCfg.dailySignConsumeArr[0];
+                AlertUI.Show(string.Format("是否确定花费{0}{1}补签?", cost[1], ItemCfgArray.Instance.GetCfg(cost[0]).name)).
+               SetLeftButton(true, "否").
+                SetRightButton(true, "是", async (object param) =>
+                {
+                    result = await DailyWelfareSProxy.ReqReSign(day);
+                });
+            }
+            else
+            {
+                result = await DailyWelfareSProxy.ReqSign(day);
+            }
+            if (result)
+            {
+                _ui.m_list.numItems = DailySignCfgArray.Instance.GetCfgsBymonth(_month).Count;
+            }
+        }
         private void ListBonusItemRender(int index, GObject obj)
         {
 

+ 9 - 7
GameClient/Assets/Game/HotUpdate/Views/League/LeagueAnsweringView.cs

@@ -113,7 +113,8 @@ namespace GFGGame
             long curTime = TimeHelper.ServerNow();
             long endTime = 0;
             string str = "";
-            if (LeagueDataManager.Instance.GetNumeriValue(LeagueNumericType.LeagueQuestionStatus) == LeagueQuestionStatus.End)
+            if (LeagueDataManager.Instance.GetNumeriValue(LeagueNumericType.LeagueQuestionStatus) == LeagueQuestionStatus.End
+            || LeagueDataManager.Instance.GetNumeriValue(LeagueNumericType.LeagueQuestionStatus) == LeagueQuestionStatus.AnswerEnd)
             {
                 endTime = TimeUtil.GetCurDayTime(GlobalCfgArray.globalCfg.leagueQuestionCloseTime);
                 str = "房间剩余时间 ";
@@ -123,12 +124,12 @@ namespace GFGGame
                 endTime = TimeUtil.GetCurDayTime(GlobalCfgArray.globalCfg.leagueQuestionEndTime);
                 str = "活动剩余时间 ";
             }
-            if (endTime - curTime < 0)
-            {
-                Timers.inst.Remove(UpdateResultTime);
-                OnBtnBackClick();
-                return;
-            }
+            // if (endTime - curTime < 0)
+            // {
+            //     Timers.inst.Remove(UpdateResultTime);
+            //     ViewManager.GoBackFrom(typeof(LeagueAnsweringView).FullName);
+            //     return;
+            // }
             _ui.m_txtTime.text = string.Format("{0}{1}", str, TimeUtil.FormattingTime7(endTime - curTime));
         }
         private void UpdateQuestionState()
@@ -177,6 +178,7 @@ namespace GFGGame
             || LeagueDataManager.Instance.GetNumeriValue(LeagueNumericType.LeagueQuestionStatus) == LeagueQuestionStatus.AnswerEnd
             || endTime - curTime < 0)
             {
+                Debug.Log("endTime:" + endTime + "   curTime:" + curTime);
                 Timers.inst.Remove(UpdateAnswerTime);
                 return;
             }

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

@@ -134,7 +134,7 @@ namespace GFGGame
             _ui.m_btnPoem.target.onClick.Add(OnClickBtnPoem);
             _ui.m_btnArena.target.onClick.Add(OnClickBtnArena);
             _ui.m_btnTravel.target.onClick.Add(OnClickBtnTravel);
-
+            _ui.m_btnDailyWelfare.target.onClick.Add(OnClickBtnDailyWelfare);
             _btnLeague.onClick.Add(OnClickBtnLeague);
             _btnStore.onClick.Add(OnClickBtnStore);
             _btnTuJian.onClick.Add(OnClickBtnTuJian);
@@ -447,6 +447,25 @@ namespace GFGGame
             // });
 
         }
+        private void OnClickBtnDailyWelfare()
+        {
+            // if (isOpen) return;
+            // isOpen = true;
+            // _ui.m_btnDailyLogin.m_holder.visible = true;
+            // Timers.inst.Add(effectTime, 1, (param) =>
+            // {
+            //     _ui.m_btnDailyLogin.m_holder.visible = false;
+            // List<string> list = new List<string>();
+            // list.Add("StudioView");
+            // list.Add("XiuFangView");
+            // ViewManager.Show<FunctionOpenView>(list);
+            // LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.MEI_RI_DNEG_LU, 1);
+
+            ViewManager.Show<DailyWelfareView>(null, new object[] { ViewName.MAINUI_VIEW, this.viewData });
+            //     isOpen = false;
+            // });
+
+        }
         private void OnClickBtnCiPai()
         {
             LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.CI_PAI, 1);
@@ -613,6 +632,7 @@ namespace GFGGame
 
             _ui.m_btnDailyLogin.target.visible = !(!FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(SevenDayLoginView).Name, false)
             || (ActivityDataManager.Instance.sevenDayLoginLoginId >= 7 && ActivityDataManager.Instance.sevenDayLoginBonusStatus == ConstBonusStatus.GOT));
+            _ui.m_btnDailyWelfare.target.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(DailyWelfareView).Name, false);
 
             _btnGongGao.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(NoticeView).Name, false);
             _btnHaoYou.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(FriendView).Name, false);

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


BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes