From 966febfb534c66812e28636e0ea22f833b51d5fe Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期一, 15 十月 2018 16:59:30 +0800
Subject: [PATCH] 4121  【前端】【1.2.0】登录界面新增客服中心入口和功能界面

---
 System/Login/LoginWin.cs       |   23 +++++++++++------------
 System/Launch/LaunchWin.cs     |    9 +++++++--
 System/UserHelp/UserHelpWin.cs |   27 ++++++++++++++++++---------
 3 files changed, 36 insertions(+), 23 deletions(-)

diff --git a/System/Launch/LaunchWin.cs b/System/Launch/LaunchWin.cs
index 1769424..7750ecc 100644
--- a/System/Launch/LaunchWin.cs
+++ b/System/Launch/LaunchWin.cs
@@ -24,7 +24,7 @@
         [SerializeField] Text m_IosProgressTip;
         [SerializeField] Text m_BuildTime;
         [SerializeField] Text m_Version;
-        [SerializeField] Button m_Service;
+        [SerializeField] Button m_UserHelp;
 
         bool assetBuildTimeShowed = false;
 
@@ -46,6 +46,7 @@
 
         protected override void AddListeners()
         {
+            m_UserHelp.SetListener(OpenUserHelp);
         }
 
         protected override void OnPreOpen()
@@ -69,7 +70,7 @@
                 }
             }
 
-            m_Service.gameObject.SetActive(hasContact);
+            m_UserHelp.gameObject.SetActive(hasContact);
 
             if (Application.platform == RuntimePlatform.IPhonePlayer)
             {
@@ -163,6 +164,10 @@
 
         }
 
+        private void OpenUserHelp()
+        {
+            WindowCenter.Instance.OpenFromLocal<UserHelpWin>();
+        }
 
     }
 }
diff --git a/System/Login/LoginWin.cs b/System/Login/LoginWin.cs
index 5007d06..96eb69e 100644
--- a/System/Login/LoginWin.cs
+++ b/System/Login/LoginWin.cs
@@ -33,6 +33,7 @@
         [SerializeField] Button m_ServerSelect;
         [SerializeField] Button m_SwitchAccount;
         [SerializeField] Button m_Notice;
+        [SerializeField] Button m_UserHelp;
         [SerializeField] RichText m_BanHao;
 
         LoginModel model { get { return ModelCenter.Instance.GetModel<LoginModel>(); } }
@@ -45,14 +46,11 @@
 
         protected override void AddListeners()
         {
-            m_EnterGame.AddListener(EnterGame);
-            m_ServerSelect.AddListener(OpenServerListWin);
-            if (m_SwitchAccount != null)
-            {
-                m_SwitchAccount.AddListener(SwitchAccount);
-            }
-
-            m_Notice.AddListener(VeiwNotice);
+            m_EnterGame.SetListener(EnterGame);
+            m_ServerSelect.SetListener(OpenServerListWin);
+            m_SwitchAccount.SetListener(SwitchAccount);
+            m_Notice.SetListener(VeiwNotice);
+            m_UserHelp.SetListener(OpenUserHelp);
         }
 
         protected override void OnPreOpen()
@@ -66,10 +64,7 @@
             m_Notice.gameObject.SetActive(GameNotice.HasNotice());
 
             m_AlphaTween.SetStartState();
-            if (m_SwitchAccount != null)
-            {
-                m_SwitchAccount.gameObject.SetActive(VersionConfig.Get().versionAuthority == VersionAuthority.Release && !VersionConfig.Get().isBanShu);
-            }
+            m_SwitchAccount.gameObject.SetActive(VersionConfig.Get().versionAuthority == VersionAuthority.Release && !VersionConfig.Get().isBanShu);
 
             m_WaitServerList.gameObject.SetActive(!ServerListCenter.Instance.serverListGot);
             m_ContainerEnterGame.gameObject.SetActive(ServerListCenter.Instance.serverListGot);
@@ -238,6 +233,10 @@
             GameNotice.OpenGameNoticeForce();
         }
 
+        private void OpenUserHelp()
+        {
+            WindowCenter.Instance.OpenFromLocal<UserHelpWin>();
+        }
 
     }
 
diff --git a/System/UserHelp/UserHelpWin.cs b/System/UserHelp/UserHelpWin.cs
index fcb29d5..8e8fd34 100644
--- a/System/UserHelp/UserHelpWin.cs
+++ b/System/UserHelp/UserHelpWin.cs
@@ -16,8 +16,8 @@
     public class UserHelpWin : Window
     {
         [SerializeField] Button m_Close;
-        [SerializeField] Button m_Issues;
-        [SerializeField] Button m_Contact;
+        [SerializeField] FunctionButton m_Issues;
+        [SerializeField] FunctionButton m_Contact;
 
         [SerializeField] RectTransform m_IssueContainer;
         [SerializeField] UserIssueBehaviour m_IssueBehaviourPattern;
@@ -34,6 +34,7 @@
 
         protected override void AddListeners()
         {
+            m_Close.SetListener(CloseClick);
             m_Issues.SetListener(DisplayIssues);
             m_Contact.SetListener(DisplayContact);
             m_CopyQQ.SetListener(CopyQQ);
@@ -42,7 +43,8 @@
 
         protected override void OnPreOpen()
         {
-
+            InitIssues();
+            InitContact();
         }
 
         protected override void OnAfterOpen()
@@ -61,25 +63,32 @@
 
         private void InitIssues()
         {
-
             var configs = Config.Instance.GetAllValues<HelpInfoConfig>();
             var needCount = configs.Count;
 
             var behaviours = new List<UserIssueBehaviour>();
             behaviours.Add(m_IssueBehaviourPattern);
 
-            for (var i = 0; i < needCount; i++)
+            for (var i = 1; i < needCount; i++)
             {
-                var instance = GameObject.Instantiate(m_IssueBehaviourPattern.gameObject) as GameObject;
+                var instance = Instantiate(m_IssueBehaviourPattern.gameObject) as GameObject;
                 var behaviour = instance.GetComponent<UserIssueBehaviour>();
                 behaviours.Add(behaviour);
+
+                behaviour.transform.SetParentEx(m_IssueContainer, Vector3.zero, Vector3.zero, Vector3.one);
             }
 
+            for (var i = 0; i < behaviours.Count; i++)
+            {
+                behaviours[i].Display(configs[i].title, configs[i].help);
+            }
         }
 
         private void InitContact()
         {
-
+            var config = Config.Instance.Get<ContactConfig>(VersionConfig.Get().appId);
+            m_QQ.text = config.qq;
+            m_Phone.text = config.phone;
         }
 
         private void DisplayIssues()
@@ -97,12 +106,12 @@
 
         private void CopyQQ()
         {
-
+            SDKUtility.Instance.CopyContent(m_QQ.text);
         }
 
         private void CopyPhone()
         {
-
+            SDKUtility.Instance.CopyContent(m_Phone.text);
         }
 
     }

--
Gitblit v1.8.0