提交 bb9eb485 编写于 作者: tao.wu's avatar tao.wu

您的登录操作过于频繁,请稍后再试

上级 fb005bcb
...@@ -66,7 +66,8 @@ ...@@ -66,7 +66,8 @@
captchaToken: '', // captchaToken captchaToken: '', // captchaToken
captchaAnswer: '', // 输入的图形验证码 captchaAnswer: '', // 输入的图形验证码
time: TIMEALL, time: TIMEALL,
btnMsg: '点击获取' btnMsg: '点击获取',
isReq: false
} }
}, },
async asyncData({ query }){ async asyncData({ query }){
...@@ -122,6 +123,10 @@ ...@@ -122,6 +123,10 @@
}, },
// 领取课程事件 // 领取课程事件
getCourse(){ getCourse(){
if(this.isReq){
this.$toast('您的登录操作过于频繁,请稍后再试');
return;
}
if(this.mobilePhone=='' || this.mobilePhone.length!=11){ if(this.mobilePhone=='' || this.mobilePhone.length!=11){
this.$toast('请输入正确的手机号'); this.$toast('请输入正确的手机号');
return; return;
...@@ -136,6 +141,7 @@ ...@@ -136,6 +141,7 @@
return; return;
} }
const { mobilePhone, authCode, id, taskId, activityId } = this; const { mobilePhone, authCode, id, taskId, activityId } = this;
this.isReq = true;
// 调用领取课程接口 // 调用领取课程接口
getCourseById({ getCourseById({
mobile: mobilePhone, mobile: mobilePhone,
...@@ -144,6 +150,7 @@ ...@@ -144,6 +150,7 @@
taskId, taskId,
activityId activityId
}).then(res=>{ }).then(res=>{
this.isReq = false;
// res.data true 登记成功 、 false 登记失败 // res.data true 登记成功 、 false 登记失败
if(res.code=='000000'){ if(res.code=='000000'){
// 将手机号和状态存入浏览器缓存,用户再次进来就能直接进入领取结果页面 // 将手机号和状态存入浏览器缓存,用户再次进来就能直接进入领取结果页面
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册