Page 449 - MDP2022-3
P. 449

},
                methods:  {
                    doLogin()  {
                        if  (this.memberEmail  ==  "")  {
                            alert("이메일을  입력하세요.");
                            this.$refs.memberIdInput.focus();
                            return;
                        }  else  if  (this.memberPassword  ==  "")  {
                            alert("패스워드를  입력하세요.");
                            this.$refs.memberPasswordInput.focus();
                            return;
                        }
                        let  memberInfo  =  {  id:  this.memberId,  password:  this.memberPassword  };
                        this.$store
                            .dispatch("loginStore/doLogin",  memberInfo)
                            .then(()  =>  {
                                const  returnUrl  =  window.location.search.replace(/^\?returnUrl=/,  "");
                                this.$router.push(returnUrl);
                            })
                            .catch((err)  =>  {
                                this.errorMessage  =  err.response.data.errormessage;
                            });
                    },
                    doCancel()  {
                        this.$router.push("/login");
                    },
                },
                mounted()  {
                    this.$refs.memberIdInput.focus();
                },
            };
            </script>
            <style  scoped>
            .login  {
                width:  800px;
                margin:  20px  auto;
            }
            .loginform  {
                width:  400px;
                margin:  auto;
            }
            .loginform  p  >  label  {
                display:  inline-block;
                width:  100px;
                font-size:  14px;
   444   445   446   447   448   449   450   451   452   453   454