zhangyuqian 11 сар өмнө
parent
commit
e69615d214

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Data/ActivityDataManager.cs

@@ -440,5 +440,6 @@ namespace GFGGame
             return false;
         }
         /*****************************************************************/
+        public string PhoneNum = "";
     }
 }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/RoleInfo/UI_PhoneBindingUI.cs

@@ -15,6 +15,7 @@ namespace UI.RoleInfo
         public UI_Button19 m_btnSure;
         public GTextField m_inputConfirmCode;
         public GButton m_btnGetCode;
+        public GLoader m_countTime;
         public GButton m_btnClose;
         public GLoader m_icon;
         public const string URL = "ui://374k3dwvr8a09fze";
@@ -72,6 +73,7 @@ namespace UI.RoleInfo
             m_btnSure = (UI_Button19)UI_Button19.Create(comp.GetChild("btnSure"));
             m_inputConfirmCode = (GTextField)comp.GetChild("inputConfirmCode");
             m_btnGetCode = (GButton)comp.GetChild("btnGetCode");
+            m_countTime = (GLoader)comp.GetChild("countTime");
             m_btnClose = (GButton)comp.GetChild("btnClose");
             m_icon = (GLoader)comp.GetChild("icon");
         }
@@ -86,6 +88,7 @@ namespace UI.RoleInfo
             m_btnSure = null;
             m_inputConfirmCode = null;
             m_btnGetCode = null;
+            m_countTime = null;
             m_btnClose = null;
             m_icon = null;
             if(disposeTarget && target != null)

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

@@ -137,7 +137,7 @@ namespace GFGGame
                 item.m_loaTitle.url = "ui://DailyWelfare/hdbn_wz_xslc_xslgt";
                 item.m_loaTitle.visible = false;
             }
-            else if(openCfg.id == 505 || openCfg.type == 10)
+            else if(openCfg.id == 505)
             {
                 item.m_loaIcon.url = ResPathUtil.GetActivityPath("gg_banner_lc_bjh", "png");;
                 item.m_loaTitle.visible = false;

+ 31 - 2
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/PhoneBindingView.cs

@@ -9,6 +9,8 @@ namespace GFGGame
     {
 
         private UI_PhoneBindingUI _ui;
+        private float countTimeSpeed = 0.000035f;
+        private bool isCountTime = false;
         private EffectUI _effectUI1;
         private EffectUI _effectUI2;
 
@@ -50,15 +52,33 @@ namespace GFGGame
             base.OnShown();
             _ui.m_inputPhoneNumber.text = "";
             _ui.m_inputName.text = "";
+            isCountTime = false;
+            _ui.m_countTime.visible = false;
         }
 
         protected override void OnHide()
         {
             base.OnHide();
+            //Timers.inst.Remove(UpdateCountTime);
+        }
+        private void UpdateCountTime(object param = null)
+        {
+            if (_ui.m_countTime.fillAmount <= 0)
+            {
+                _ui.m_countTime.fillAmount = 0;
+                _ui.m_countTime.visible = false;
+                isCountTime = false;
+                Timers.inst.Remove(UpdateCountTime);
+            }
+            _ui.m_countTime.fillAmount -= countTimeSpeed;
         }
-
         private async void OnBtnSureClick()
         {
+            if(ActivityDataManager.Instance.PhoneNum != null && ActivityDataManager.Instance.PhoneNum != "")
+            {
+                PromptController.Instance.ShowFloatTextPrompt(string.Format("号码{0}已绑定!", ActivityDataManager.Instance.PhoneNum));
+                Hide();
+            }
             bool result = await RoleInfoSProxy.BindMobilePhoneNumber(_ui.m_inputPhoneNumber.text ,_ui.m_inputName.text);
             if(result)
             {
@@ -73,11 +93,20 @@ namespace GFGGame
 
         private  async void OnBtnGetCode()
         {
-            if(_ui.m_inputPhoneNumber.text == null || _ui.m_inputPhoneNumber.text== "")
+            if (_ui.m_inputPhoneNumber.text == null || _ui.m_inputPhoneNumber.text == "")
             {
                 PromptController.Instance.ShowFloatTextPrompt("麻烦输入手机号码!");
                 return;
             }
+            //if (isCountTime)
+            //{
+            //    PromptController.Instance.ShowFloatTextPrompt("刷新冷却中,请耐心等待!");
+            //    return;
+            //}
+            //isCountTime = true;
+            //_ui.m_countTime.visible = true;
+            //_ui.m_countTime.fillAmount = 1.0f;
+            //Timers.inst.AddUpdate(UpdateCountTime);
             bool result = await RoleInfoSProxy.GetMobileVerification(_ui.m_inputPhoneNumber.text);
             if (result)
             {

BIN
GameClient/Assets/ResIn/UI/RoleInfo/RoleInfo_fui.bytes