Browse Source

1.关闭后清空倒计时
2.修改页面按钮样式

tanxue 3 years ago
parent
commit
da6d1dc937
2 changed files with 12 additions and 4 deletions
  1. 1 0
      assets/scss/cus-client/cus-client-common.scss
  2. 11 4
      pages/index.vue

+ 1 - 0
assets/scss/cus-client/cus-client-common.scss

@@ -627,6 +627,7 @@ h1,h2,h3,h4,h5,h6,p{font-weight:normal;margin: 0;}
       box-sizing: border-box;
       margin: 0 20px;
       @include setFontStyle(-6);
+      .client-btn-box{text-align: left;}
       h5{
         @include setFontStyle(4);color: rgba(0,0,0,0.85);margin-bottom: 32px;font-weight: bold;
         // 考试培训 数字

+ 11 - 4
pages/index.vue

@@ -403,7 +403,9 @@
 
 
       sqfaDlClose(){
-        this.sqfaDl  =false
+        this.sqfaCountdown = -1;
+        this.sqfaSliderData.sqfaAppKey=undefined;
+        this.sqfaDl = false;
         this.$refs.ruleTelForm.resetFields();
         __nc.reset();
       },
@@ -522,9 +524,13 @@
       setTime() {
         if (this.sqfaCountdown === 0) {
           this.sqfaBtnDisabled = false;
-          this.sqfaBtnText = '免费获取验证码';
+          this.sqfaBtnText = '获取验证码';
           this.sqfaCountdown = 60;
-        } else {
+        } else if(this.sqfaCountdown === -1){
+          this.sqfaBtnDisabled = false;
+          this.sqfaBtnText = '获取验证码';
+          this.sqfaCountdown = 60;
+        }else {
           this.sqfaBtnDisabled = true;
           this.sqfaBtnText = '重新发送(' + this.sqfaCountdown + 's)';
           this.sqfaCountdown--;
@@ -559,10 +565,11 @@
             this.$axios.$post('/sendCode',req).then(res=>{
               if (res.code === 0 && res.data) {
                 this.setTime();
+              }else {
+                this.$message.error(res.msg||'手机号已存在');
               }
             })
           } else {
-            console.log('手机号已存在')
             this.$message.error('手机号已存在');
             return false;
           }