示例#1
0
        public void onClickOK()
        {
            if (InputField_name.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入姓名");
                return;
            }

            if (InputField_idNumber.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入身份证号");
                return;
            }

            if (!VerifyRuleUtil.CheckRealName(InputField_name.text))
            {
                ToastScript.createToast("请输入正确的姓名");
                return;
            }

            if (!VerifyRuleUtil.CheckIDCard(InputField_idNumber.text))
            {
                ToastScript.createToast("请输入正确的身份证号码");
                return;
            }

            RequestRealName();
        }
示例#2
0
        public async void onClickGetPhoneCode()
        {
            if (inputField_Phone.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入手机号");
                return;
            }

            if (!VerifyRuleUtil.CheckPhone(inputField_Phone.text))
            {
                ToastScript.createToast("请输入正确的手机号");
                return;
            }

            btn_yanzhengma.transform.localScale          = Vector3.zero;
            text_yanzhengmadaojishi.transform.localScale = new Vector3(1, 1, 1);

            UINetLoadingComponent.showNetLoading();

            Session sessionWrap = null;

            try
            {
                //IPEndPoint connetEndPoint = NetworkHelper.ToIPEndPoint(GlobalConfigComponent.Instance.GlobalProto.Address);
                IPEndPoint      connetEndPoint = ToIPEndPointWithYuMing(NetConfig.getInstance().getServerPort());
                ETModel.Session session        = ETModel.Game.Scene.GetComponent <NetOuterComponent>().Create(connetEndPoint);

                sessionWrap = ComponentFactory.Create <Session, ETModel.Session>(session);

                R2C_SendSms r2CData = (R2C_SendSms)await sessionWrap.Call(new C2R_SendSms()
                {
                    Phone = inputField_Phone.text
                });

                UINetLoadingComponent.closeNetLoading();

                if (r2CData.Error != ErrorCode.ERR_Success)
                {
                    ToastScript.createToast(r2CData.Message);
                }

                sessionWrap.Dispose();

                startPhoneCodeTimer();
            }
            catch (Exception e)
            {
                sessionWrap?.Dispose();
                Log.Error(e);
            }
        }
示例#3
0
        public async void onClickPhoneCodeLogin()
        {
            if (inputField_Phone.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入手机号");
                return;
            }

            if (inputField_YanZhengMa.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入验证码");
                return;
            }

            if (!VerifyRuleUtil.CheckPhone(inputField_Phone.text))
            {
                ToastScript.createToast("请输入正确的手机号");
                return;
            }

            await OnLoginPhone(inputField_Phone.text, inputField_YanZhengMa.text, "");
        }
示例#4
0
        public void onClickBindPhone()
        {
            if (inputField_Phone.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入手机号");
                return;
            }

            if (inputField_YanZhengMa.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入验证码");
                return;
            }

            if (!VerifyRuleUtil.CheckPhone(inputField_Phone.text))
            {
                ToastScript.createToast("请输入正确的手机号");
                return;
            }

            OnBindPhone(inputField_Phone.text, inputField_YanZhengMa.text);
        }
示例#5
0
        public async void onClickGetPhoneCode()
        {
            if (inputField_Phone.text.CompareTo("") == 0)
            {
                ToastScript.createToast("请输入手机号");
                return;
            }

            if (!VerifyRuleUtil.CheckPhone(inputField_Phone.text))
            {
                ToastScript.createToast("请输入正确的手机号");
                return;
            }

            Button_YanZhengMa.transform.localScale       = Vector3.zero;
            text_yanzhengmadaojishi.transform.localScale = new Vector3(1, 1, 1);

            startPhoneCodeTimer();

            try
            {
                UINetLoadingComponent.showNetLoading();
                G2C_SendSms g2cSendSms = (G2C_SendSms)await SessionComponent.Instance.Session.Call(new C2G_SendSms { Uid = PlayerInfoComponent.Instance.uid, Phone = inputField_Phone.text });

                UINetLoadingComponent.closeNetLoading();

                if (g2cSendSms.Error != ErrorCode.ERR_Success)
                {
                    ToastScript.createToast(g2cSendSms.Message);
                    return;
                }
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }