I'm pretty new to Vue / Axios.
What I'm trying to do is send the query string through to an email using Axios. The Query string is set from Google Adwords.
My current vue code
const app = new Vue({
el: '#app',
data() {
return {
step: 1,
counter: 0,
tagName: null,
debt: {
name: null,
email: null,
tel: null
}
}
},
methods: {
prev() {
this.step--;
},
next() {
this.step++;
},
submit() {
axios.post('post.php', {
'name': this.debt.name,
'email': this.debt.email,
'tel': this.debt.tel
}).then(response => {
console.log('success', response.data.message)
}).catch(error => {
console.log(error.response)
});
}
}
});
Hopefully, someone can help push me in the right direction. Please let me know if you need any other information.
Thanks, J.