nextStep() {
let URL = this.__WEBSERVERURL__ + "/oauth/userreport/submit";
let params = {
name: this.customer.name,
certNo: this.customer.idCard,
mobile: this.customer.mobile
};
if (!params.name || !params.certNo || !params.mobile) {
this.$Message.error("用户名,身份证,手机号必填!");
return;
}
this.$http.post(URL, params).then(res => {
if (res.body.code == 0) {
console.log(res.body);
this.$router.push({
name: "CreditReportDetail",
query: {
id: res.body.reportId
}
});
} else {
this.$Message.error(res.body.msg);
}
});
}
=================
怎么让点了button按钮提交后 ,禁用点击防止再次提交 ,防止多次点击
设置一个变量标识,初始为false,点击提交按钮后变为true,如果为true则发出请求,请求完毕再重置为false