Browse Source

弹窗关闭倒计时不清空bug修改

tanxue 3 năm trước cách đây
mục cha
commit
a464502c88
1 tập tin đã thay đổi với 11 bổ sung3 xóa
  1. 11 3
      pages/index.vue

+ 11 - 3
pages/index.vue

@@ -688,7 +688,8 @@
 
 
       delDlClose(){
-        this.telDl  =false
+        this.telDl  =false;
+        this.countdown = -1;
         this.$refs.ruleTelForm.resetFields();
         __nc.reset();
 
@@ -809,9 +810,13 @@
       setTime() {
         if (this.countdown === 0) {
           this.btnTextDisabled = false;
-          this.btnText = '免费获取验证码';
+          this.btnText = '获取验证码';
           this.countdown = 60;
-        } else {
+        }else if(this.countdown === -1){
+          this.btnTextDisabled = false;
+          this.btnText = '获取验证码';
+          this.countdown = 60;
+        }else {
           this.btnTextDisabled = true;
           this.btnText = '重新发送(' + this.countdown + 's)';
           this.countdown--;
@@ -823,6 +828,7 @@
       // 验证码
       checkVerification() {
         if (this.sliderData.appkey === undefined) {
+          this.$message.error('请先通过滑块校验');
           return;
         }
         this.$axios.$post(`/develop/exists`,{  phone: this.telChangeDate.tel}).then(res=>{
@@ -841,6 +847,8 @@
             this.$axios.$post('/sendCode',req).then(res=>{
               if (res.code === 0 && res.data) {
                 this.setTime();
+              }else {
+                this.$message.error(res.msg);
               }
             })
           } else {