【发布时间】:2018-12-12 18:35:26
【问题描述】:
我对 Vue / Axios 还是很陌生。
我正在尝试使用 Axios 将查询字符串发送到电子邮件。查询字符串是从 Google Adwords 设置的。
我目前的vue代码
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)
});
}
}
});
希望有人能帮助我朝着正确的方向前进。如果您需要任何其他信息,请告诉我。
谢谢,J。
【问题讨论】:
-
你遇到了什么错误?
-
为什么不只发送姓名、电子邮件、电话、查询字符串