Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
[Please help me]
I am trying to do customer login with Vue .
I have tried to do something and received respone 200 and 302 still but not working. I also tried this way : http://web.archive.org/web/20150417052042/http://inside.sauce.ly:80/how-to-build-an-ajax-login-form-...
but same .
let productForm = new Vue({
el:".vue-login-form",
data(){
return{
form: {
email: null,
password: null,
},
customerData: null,
}
},
methods:{
login(){
axios.post('/account/login', this.form )
.then((response) => {
console.log(response);
this.customerData = response.data;
})
.catch(function (error){
});
},
},
})
<form action="">
<div class="form-top">
<h2>Welcome Back!</h2>
<p>Please login to your account.</p>
</div>
<div class="login-fields">
<div class="input">
<input type="email" v-model="form.email" placeholder="Email address">
</div>
<div class="input mb-0">
<input type="password" v-model="form.password" placeholder="Password">
</div>
<div class="forgot-pass"><a href="#" type="button" id="ppassword" @Click="showForgot">Forgot Password?</a></div>
<div class="submit-button">
<button type="button" @Click="login()">Log In</button>
</div>
</div>
</form>
User | RANK |
---|---|
5 | |
4 | |
4 | |
3 | |
3 |