示例#1
0
    //수정 후 입력된 값 들 변수에 넣음
    //수정하기 버튼 누르면 동작하는 함수
    public void ModiftyClick()
    {
        Signup.IsSign = "회원정보수정";
        //바꾸든 안바꾸든 비밀번호 입력하는 부분
        if (string.IsNullOrEmpty(input_pwd.text) || string.IsNullOrEmpty(input_pwdcheck.text))
        {
            pwdinput_message.gameObject.SetActive(true);
        }
        else
        {
            //tmp에 넣어도 될거같은데 수정하기 귀찮;
            id       = text_id.text;
            pwd      = input_pwd.text;
            pwdcheck = input_pwdcheck.text;
            username = text_username.text;
            birthday = text_birthday.text;
            height   = input_height.text;
            weight   = input_weight.text;
            phonenum = input_phonenum.text;
            address  = input_address.text;
            email    = input_email.text;

            if (pwd != pwdcheck)
            {
                pwdcheck_message.gameObject.SetActive(true);
            }
            else
            {
                pwdcheck_message.gameObject.SetActive(false);
                JsonTest json = new JsonTest();
                json.id       = id;
                json.pwd      = pwd;
                json.username = username;
                json.birthday = birthday;
                json.height   = height;
                json.weight   = weight;
                json.phonenum = phonenum;
                json.address  = address;
                json.email    = email;
                json.gender   = gender;
                json.date     = string.Format("{0:u}", today);
                json.SaveToString(json); //json형식으로 변환
                jsonData = json.SaveToString(json);
                Debug.Log(jsonData);
                StartCoroutine(SendData(jsonData)); //웹서버로 데이터 전송
                pwdcheck_message.gameObject.SetActive(false);
                StartCoroutine(Waitfortime());
                sceneMg.SceneChangeToMain();
            }
        }
    }
示例#2
0
    public void TrytoLogin()       //로그인 시도하는 부분
    {
        scene.SceneChangeToMain(); //로그인하면 씬전환

        /*id = input_id.text;  //id, pwd값 json으로 보냄
         * pwd = input_pwd.text;
         *
         * JsonTest json = new JsonTest(); //id, pwd, date 값 json으로 변환 후 전송
         * json.id = input_id.text;
         * json.pwd = input_pwd.text;
         * json.date = string.Format("{0:u}", today);
         * Signup.jsondata = json.SaveToString(json); //json형식으로 변환
         * StartCoroutine(sign.SendData(Signup.jsondata)); //웹서버로 데이터 전송
         * //전송 했으니 이제 받아서
         * if (id == "123" && pwd == "123") //id하고 pwd가 서버에서 보내주는놈과 같으면
         * {
         *
         * }
         * else
         * {
         *  //로그인 실패 팝업창 띄우기
         * }*/
    }