|
|
@@ -9,12 +9,10 @@ namespace GFGGame
|
|
|
private EffectUI _effectUI1;
|
|
|
private EffectUI _effectUI2;
|
|
|
private static bool _refresh;
|
|
|
+
|
|
|
public static bool refresh
|
|
|
{
|
|
|
- set
|
|
|
- {
|
|
|
- _refresh = value;
|
|
|
- }
|
|
|
+ set { _refresh = value; }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -30,6 +28,7 @@ namespace GFGGame
|
|
|
_ui.Dispose();
|
|
|
_ui = null;
|
|
|
}
|
|
|
+
|
|
|
base.Dispose();
|
|
|
}
|
|
|
|
|
|
@@ -53,14 +52,21 @@ namespace GFGGame
|
|
|
_ui.m_voiceSlider.target.onChanged.Add(OnChangeVoiceVolumn);
|
|
|
_ui.m_musicSlider.target.onChanged.Add(OnChangeMusicVolumn);
|
|
|
_ui.m_soundSlider.target.onChanged.Add(OnChangeSoundVolumn);
|
|
|
- _ui.m_btnBinding.onClick.Add(OnClickPhoneBinding);
|
|
|
+
|
|
|
_ui.m_btnGiftCode.target.onClick.Add(OnClickGiftCode);
|
|
|
_ui.m_settingTypeList.itemRenderer = RenderListType;
|
|
|
_ui.m_settingTypeList.numItems = _ui.m_settingTypeList.numItems;
|
|
|
_ui.m_gameProtectAgree.onClick.Add(OnGameProtectAgreeClick);
|
|
|
_ui.m_privacyAgree.onClick.Add(OnPrivacyAgreeClick);
|
|
|
_ui.m_childrenAgree.onClick.Add(OnChildrenAgreeClick);
|
|
|
- _ui.m_txtDeleteAccount.onClick.Add(OnClickTxtDeleteAccount);
|
|
|
+
|
|
|
+ _ui.m_btnBinding.onClick.Add(OnClickPhoneBinding);
|
|
|
+ _ui.m_btnBinding.text = "点击绑定";
|
|
|
+ _ui.m_btnBinding.visible = false;
|
|
|
+
|
|
|
+ _ui.m_btnUnbind.onClick.Add(OnClickPhoneUnbind);
|
|
|
+ _ui.m_btnUnbind.text = "解绑";
|
|
|
+ _ui.m_btnUnbind.visible = false;
|
|
|
|
|
|
_ui.m_groupAccount.visible = GameConfig.tsStatus > 0;
|
|
|
}
|
|
|
@@ -75,10 +81,25 @@ namespace GFGGame
|
|
|
_ui.m_suit.Play();
|
|
|
_ui.m_c1.SetSelectedIndex(0);
|
|
|
}
|
|
|
+
|
|
|
_ui.m_icon.visible = false;
|
|
|
_ui.m_iconBg.visible = false;
|
|
|
_ui.m_settingTypeList.visible = false;
|
|
|
_ui.m_btnGiftCode.target.visible = GameConfig.hCode == 0;
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(ActivityDataManager.Instance.PhoneNumber))
|
|
|
+ {
|
|
|
+ //已经绑定, 需要解绑
|
|
|
+ _ui.m_txtPhoneDes.text = ActivityDataManager.Instance.PhoneNumber;
|
|
|
+ _ui.m_btnBinding.visible = false;
|
|
|
+ _ui.m_btnUnbind.visible = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _ui.m_txtPhoneDes.text = "手机号绑定";
|
|
|
+ _ui.m_btnBinding.visible = true;
|
|
|
+ _ui.m_btnUnbind.visible = false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
|
@@ -86,25 +107,45 @@ namespace GFGGame
|
|
|
base.OnHide();
|
|
|
}
|
|
|
|
|
|
+ protected override void AddEventListener()
|
|
|
+ {
|
|
|
+ base.AddEventListener();
|
|
|
+ EventAgent.AddEventListener(ConstMessage.PhoneChange, OnPhoneChange);
|
|
|
+ }
|
|
|
+
|
|
|
+ protected override void RemoveEventListener()
|
|
|
+ {
|
|
|
+ base.RemoveEventListener();
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.PhoneChange, OnPhoneChange);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnPhoneChange()
|
|
|
+ {
|
|
|
+ if (!string.IsNullOrEmpty(ActivityDataManager.Instance.PhoneNumber))
|
|
|
+ {
|
|
|
+ //已经绑定, 需要解绑
|
|
|
+ _ui.m_txtPhoneDes.text = ActivityDataManager.Instance.PhoneNumber;
|
|
|
+ _ui.m_btnBinding.visible = false;
|
|
|
+ _ui.m_btnUnbind.visible = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _ui.m_txtPhoneDes.text = "手机号绑定";
|
|
|
+ _ui.m_btnBinding.visible = true;
|
|
|
+ _ui.m_btnUnbind.visible = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void OnClickBtnBack()
|
|
|
{
|
|
|
Hide();
|
|
|
- //AlertSystem.Show("确认返回登录页吗?")
|
|
|
- // .SetLeftButton(true)
|
|
|
- // .SetRightButton(true, "确认", (object data) =>
|
|
|
- // {
|
|
|
- // GameController.QuitToLoginView(false);
|
|
|
- // });
|
|
|
}
|
|
|
|
|
|
private void OnClickBtnLogout()
|
|
|
{
|
|
|
AlertSystem.Show("确认注销当前账号吗?")
|
|
|
.SetLeftButton(true)
|
|
|
- .SetRightButton(true, "确认", (object data) =>
|
|
|
- {
|
|
|
- GameController.QuitToLoginView(true);
|
|
|
- });
|
|
|
+ .SetRightButton(true, "确认", (object data) => { GameController.QuitToLoginView(true); });
|
|
|
}
|
|
|
|
|
|
private void OnClickBtnSound()
|
|
|
@@ -198,7 +239,12 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickPhoneBinding()
|
|
|
{
|
|
|
- ViewManager.Show<PhoneBindingView>();
|
|
|
+ ViewManager.Show<PhoneBindingView>();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnClickPhoneUnbind()
|
|
|
+ {
|
|
|
+ ViewManager.Show<UnbindPhoneView>();
|
|
|
}
|
|
|
|
|
|
private void OnClickGiftCode()
|
|
|
@@ -237,6 +283,5 @@ namespace GFGGame
|
|
|
{
|
|
|
ViewManager.Show<DeleteAccountView>();
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|