Browse Source

系统公告

zhaoyang 3 years ago
parent
commit
ef042d6d46

+ 1 - 1
FGUIProject/assets/Login/components/ComContent.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="735,629" overflow="scroll">
   <displayList>
-    <richtext id="n8_hmrw" name="comContent" xy="0,0" size="735,19" fontSize="12" ubb="true" autoSize="height" text=""/>
+    <richtext id="n8_hmrw" name="txtContent" xy="0,0" size="735,422" fontSize="32" color="#cba482" ubb="true" autoSize="height" text="《GFG》是一款换装游戏,多变的策略,轻松爽快的战斗,可以与体验奇妙穿越剧情。 在成长过程中,不断收集服装!招募老不死、小奶狗、霸总等强力卡牌,助自己畅游其中。&#xA;游戏客服专区Game Service Area&#xA;微信客服公众号:xxxxx&#xA;QQ客服公众号:&lt;font color=&apos;#09a608&apos;&gt;1111111111&lt;/font&gt;&#xA;客服电话:&lt;font color=&apos;09a608&apos;&gt;020-12345678、020-12345678&lt;/font&gt;&#xA;(为避免广大玩家利益受损,请勿相信聊天频道内的虚假充值、买卖礼包等违法钓鱼信息。"/>
   </displayList>
 </component>

+ 2 - 2
FGUIProject/assets/Notice/NoticeSystemShowUI.xml

@@ -5,8 +5,8 @@
     <image id="n16_kjq3" name="n16" src="kjq3d" fileName="images/gg_gg_btbt_1.png" xy="280,350" group="n28_kjq3"/>
     <text id="n17_kjq3" name="txtTitle" xy="425,350" pivot="0.5,0" size="228,74" group="n28_kjq3" fontSize="56" color="#8f6e30" text="活动标题"/>
     <group id="n28_kjq3" name="n28" xy="280,350" size="519,85" group="n23_kjq3"/>
-    <component id="n27_kjq3" name="ComContent" src="kjq3u" fileName="components/ComContent.xml" xy="87,455" size="905,862" group="n23_kjq3"/>
-    <group id="n23_kjq3" name="n23" xy="87,350" size="905,967" advanced="true">
+    <component id="n27_kjq3" name="ComContent" src="kjq3u" fileName="components/ComContent.xml" xy="95,455" group="n23_kjq3"/>
+    <group id="n23_kjq3" name="n23" xy="95,350" size="890,1075" advanced="true">
       <relation target="" sidePair="top-middle"/>
     </group>
   </displayList>

+ 4 - 2
FGUIProject/assets/Notice/components/ComContent.xml

@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="905,970" overflow="scroll">
+<component size="890,970" overflow="scroll">
   <displayList>
-    <richtext id="n28_hmrw" name="txtContent" xy="0,0" size="905,52" fontSize="38" color="#a09172" ubb="true" autoSize="height" text=""/>
+    <richtext id="n28_hmrw" name="txtContent" xy="0,0" size="890,494" fontSize="38" color="#a09172" ubb="true" autoSize="height" text="《GFG》是一款换装游戏,多变的策略,轻松爽快的战斗,可以与体验奇妙穿越剧情。 在成长过程中,不断收集服装!招募老不死、小奶狗、霸总等强力卡牌,助自己畅游其中。&#xA;游戏客服专区Game Service Area&#xA;微信客服公众号:xxxxx&#xA;QQ客服公众号:&lt;font color=&apos;09a608&apos;&gt;1111111111&lt;/font&gt;&#xA;客服电话:&lt;font color=&apos;09a608&apos;&gt;020-12345678、020-12345678&lt;/font&gt;&#xA;(为避免广大玩家利益受损,请勿相信聊天频道内的虚假充值、买卖礼包等违法钓鱼信息。">
+      <relation target="" sidePair="width-width"/>
+    </richtext>
   </displayList>
 </component>

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs

@@ -109,9 +109,10 @@ namespace GFGGame
             if (result)
             {
                 NoticeInfo noticeInfo = NoticeDataManager.Instance.LastNoticeInfo;
+                Debug.Log("noticeTime:" + noticeInfo.time + "  currentTime:" + (TimeInfo.Instance.ServerNow() / 1000));
 
-                int noticeTime = TimeUtil.GetDayTimeBySec(noticeInfo.time, GlobalCfgArray.globalCfg.refreshTime);
-                int currentTime = TimeUtil.GetDayTimeBySec(TimeInfo.Instance.ServerNow() / 1000, GlobalCfgArray.globalCfg.refreshTime);
+                int noticeTime = TimeUtil.GetDayTimeBySec(noticeInfo.time * 1000, GlobalCfgArray.globalCfg.refreshTime);
+                int currentTime = TimeUtil.GetDayTimeBySec(TimeInfo.Instance.ServerNow(), GlobalCfgArray.globalCfg.refreshTime);
                 Debug.Log("noticeTime:" + noticeTime + "  currentTime:" + currentTime);
                 if ((currentTime - noticeTime) / TimeUtil.SECOND_PER_DAY < 3)
                 {

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Login/UI_ComContent.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Login
+{
+    public partial class UI_ComContent
+    {
+        public GComponent target;
+        public GRichTextField m_txtContent;
+        public const string URL = "ui://myoktu7phmrw5g";
+        public const string PACKAGE_NAME = "Login";
+        public const string RES_NAME = "ComContent";
+        private static UI_ComContent _proxy;
+
+        public static UI_ComContent Create(GObject gObject = null)
+        {
+            var ui = new UI_ComContent();
+            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_ComContent Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ComContent();
+            }
+            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_txtContent = (GRichTextField)comp.GetChild("txtContent");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_txtContent = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Login/UI_ComContent.cs.meta

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

+ 4 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Login/UI_NoticeUI.cs

@@ -8,7 +8,7 @@ namespace UI.Login
     {
         public GComponent target;
         public GTextField m_txtTitle;
-        public GTextField m_txtContent;
+        public UI_ComContent m_comContent;
         public const string URL = "ui://myoktu7pq08x9";
         public const string PACKAGE_NAME = "Login";
         public const string RES_NAME = "NoticeUI";
@@ -57,12 +57,13 @@ namespace UI.Login
         private void Init(GComponent comp)
         {
             m_txtTitle = (GTextField)comp.GetChild("txtTitle");
-            m_txtContent = (GTextField)comp.GetChild("txtContent");
+            m_comContent = (UI_ComContent)UI_ComContent.Create(comp.GetChild("comContent"));
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_txtTitle = null;
-            m_txtContent = null;
+            m_comContent.Dispose();
+            m_comContent = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/NoticeSProxy.cs

@@ -50,6 +50,7 @@ namespace GFGGame
                         noticeInfo.noticeId = response.NoticeList[i].NoticeId;
                         noticeInfo.title = response.NoticeList[i].Title;
                         noticeInfo.time = response.NoticeList[i].TimeSec;
+                        noticeInfo.readStatus = response.NoticeList[i].ReadStatus;
 
                         NoticeDataManager.Instance.UpdateNoticeIdList(noticeInfo);
                     }

+ 4 - 3
GameClient/Assets/Game/HotUpdate/Utils/TimeUtil.cs

@@ -59,10 +59,11 @@ namespace GFGGame
         /// 将时间戳转换成yyyy/m/d格式
         /// </summary>
         /// <param name="timeSec"></param>
-        public static string FormattingTime(int timeSec)
+        public static string FormattingTime(long timeSec)
         {
-            DateTime date = TimeInfo.Instance.ToDateTime(timeSec);
-            string str = date.ToString("yyyy/M/d ");
+            DateTime date = TimeInfo.Instance.ToDateTime(timeSec * 1000);
+            string str = date.ToString("yyyy/MM/dd ");
+
             return str;
         }
     }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Login/SystemNoticeView.cs

@@ -21,7 +21,7 @@ namespace GFGGame
             this.modal = true;
 
             _ui.m_txtTitle.text = NoticeDataManager.Instance.LastNoticeInfo.title;
-            _ui.m_txtContent.text = NoticeDataManager.Instance.LastNoticeInfo.content;
+            _ui.m_comContent.m_txtContent.text = NoticeDataManager.Instance.LastNoticeInfo.content;
         }
 
         protected override void OnShown()

+ 4 - 3
GameClient/Assets/Game/HotUpdate/Views/Notice/NoticeView.cs

@@ -44,6 +44,7 @@ namespace GFGGame
             _ui.m_c1.selectedIndex = 1;
             _ui.m_listActivity.visible = true;
             _ui.m_listNotice.visible = true;
+            OnCtrlChange();
         }
 
         protected override void OnHide()
@@ -54,7 +55,8 @@ namespace GFGGame
         {
             if (_ui.m_c1.selectedIndex == 0)
             {
-
+                _ui.m_listActivity.numItems = 0;
+                _ui.m_txtTips.visible = _ui.m_listActivity.numItems == 0;
             }
             else if (_ui.m_c1.selectedIndex == 1)
             {
@@ -84,7 +86,7 @@ namespace GFGGame
             NoticeInfo noticeInfo = NoticeDataManager.Instance.NoticeInfos[index];
             UI_ListNoticeItem item = UI_ListNoticeItem.Proxy(obj);
             item.m_txtTitle.text = noticeInfo.title;
-            item.m_txtTime.text = TimeUtil.FormattingTime((int)noticeInfo.time);
+            item.m_txtTime.text = TimeUtil.FormattingTime(noticeInfo.time);
             item.m_imgTips.visible = !noticeInfo.readStatus;
             if (item.m_btnGo.data == null)
             {
@@ -103,7 +105,6 @@ namespace GFGGame
                 if (result)
                 {
                     ViewManager.Show<NoticeSystemShowView>(NoticeDataManager.Instance.GetNoticeInfoById(noticeInfo.noticeId), new object[] { typeof(NoticeView).Name, this.viewData });
-
                 }
             }
             else

BIN
GameClient/Assets/ResIn/UI/Login/Login_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Notice/Notice_fui.bytes