|
@@ -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)
|
|
|
{
|