コード例 #1
0
ファイル: ChangePwPanel.cs プロジェクト: atom-chen/ar_qionglu
    public override void Awake()
    {
        base.Awake();
        mainui = GameObject.Find("UIMainpage").GetComponent <mainUISet>();
        getSmssBtn.onClick.AddListener((() =>
        {
            FreezeButton(getSmssBtn);
            HttpManager.Instance.GetSMSS(PublicAttribute.UserInfo.PhoneNo, (b =>
            {
                Debug.Log("获取短信验证码 " + b);
            }));
        }));
        backBtn.onClick.AddListener(() =>
        {
            LoginUIController.Instance.SetNextUIState(LoginUIState.LoginPanel);
        });
        sureBtn.onClick.AddListener(() =>
        {
            if (newpwRepeatInput.text != newpwInput.text)
            {
                PP.ShowPopup("", GlobalParameter.InputRepeatWrong);
                return;
            }
            if (string.IsNullOrEmpty(newpwInput.text) || newpwInput.text.Length < 6)
            {
                PP.ShowPopup("", GlobalParameter.InputPassword);
                return;
            }
            if (string.IsNullOrEmpty(newpwRepeatInput.text) || newpwRepeatInput.text.Length < 6)
            {
                PP.ShowPopup("", GlobalParameter.InputRepeatPassword);
                return;
            }
            if (string.IsNullOrEmpty(smssInput.text) || smssInput.text.Length != 6)
            {
                PP.ShowPopup("", GlobalParameter.InputSMSS);
                return;
            }

            Debug.Log("b");


            if (VerifyPwd(newpwInput.text) && VerifyPwd(newpwRepeatInput.text) && newpwInput.text == newpwRepeatInput.text && VerifySMSCode(smssInput.text))
            {
                if (!isHit)
                {
                    isHit = true;
                    HttpManager.Instance.ResetPwd(PublicAttribute.UserInfo.PhoneNo, newpwRepeatInput.text, smssInput.text, (PopupInfo));
                }
            }
        });



        this.gameObject.SetActive(false);
    }