|
@@ -108,9 +108,10 @@ export default {
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
- this.$message.success("发送成功");
|
|
|
+ this.$message.success("提交成功");
|
|
|
+ this.$emit('close')
|
|
|
} else {
|
|
|
- this.$message.error("发送失败");
|
|
|
+ this.$message.error(res.data.msg);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -122,19 +123,19 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.$refs["form"].validateField("mobileNo", (valid) => {
|
|
|
- console.log("验证通过发起请求", valid);
|
|
|
if (!valid) {
|
|
|
axios({
|
|
|
url: this.url + "api-auth/code/sendSms",
|
|
|
method: "post",
|
|
|
- data: { mobile: this.form.mobileNo },
|
|
|
+ data: qs.stringify({ mobile: this.form.mobileNo }),
|
|
|
headers: {
|
|
|
"Content-type": "application/x-www-form-urlencoded",
|
|
|
"Access-Control-Allow-Origin": "*",
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
+ console.log(res)
|
|
|
if (res.data.code == 200) {
|
|
|
- this.$message.success("发送成功");
|
|
|
+ this.time = 60
|
|
|
const timer = setInterval(() => {
|
|
|
if (this.time > 0) {
|
|
|
this.time--;
|