TANGSHIZHE 5 år sedan
förälder
incheckning
a6d7d600ab

+ 1 - 2
src/jfw/modules/app/src/web/staticres/jyapp/structuredata/css/marketing.css

@@ -505,10 +505,9 @@ body {
   align-items: center;
   justify-content: space-between;
   width: 100%;
-  height: 1.32rem;
+  height: 1.34rem;
   padding: 0.16rem 0.32rem 0.16rem;
   background-color: #fff;
-  border-top-color: #fff;
 }
 
 #app .j-button-group .j-button-cancel {

+ 27 - 17
src/jfw/modules/app/src/web/templates/structeddata/write_infor.html

@@ -185,6 +185,8 @@ $(function(){
       $('.mf .ipt_email').val({{.T.s_myemail}})
       $('.correct-icon').show()
       freesubmit();
+  }else{
+    $('.mf .ipt_email').val('')
   }
   if ({{.T.phone_num}}!=""&&{{.T.phone_num}}!=null){
       isfreesubmit[1] = 'true';
@@ -444,12 +446,14 @@ $(function(){
                     //       duration: 1500,
                     //       className: 'toast-lang'
                     //   });
+                    countdown()
                     $('.correct-icon').hide()
                   }else if(res.errCode == 3) {
                     //   weui.toast('验证码发送次数已达今日上限', {
                     //       duration: 1500,
                     //       className: 'toast-lang',
                     //   });
+                    countdown()
                     $('.correct-icon').hide()
                   }else if(res.errCode == 4) {
                     $('.email_code').slideUp();
@@ -457,23 +461,7 @@ $(function(){
                     freesubmit();
                     $('.correct-icon').show()
                   }else if(res.errCode == 5) {
-                    $('.sendEmail').hide()
-                    setTimeout(() => {
-                        $('.timedown').show()
-                    }, 100);
-                    var time=300;
-                    setTime=setInterval(function(){
-                    if(time<=0){
-                        $('.timedown').hide()
-                        $('.sendEmail').show()
-                        $(".timedown").text(299+'s');
-                        clearInterval(setTime);
-                        return;
-                    }
-                    time--;
-                    $(".timedown").text(time+'s');
-                    },1000);
-                      
+                    countdown()
                   }else{
                       $('.sendEmail').hide()
                   }
@@ -486,6 +474,28 @@ $(function(){
       
   })
 })
+
+// 倒计时
+function countdown() {
+    $('.sendEmail').hide()
+    setTimeout(() => {
+        $('.timedown').show()
+    }, 100);
+    var time=300;
+    setTime=setInterval(function(){
+        if(time<=0){
+            $('.timedown').hide()
+            $('.sendEmail').show()
+            time=299
+            clearInterval(setTime);
+            return;
+        }
+        time--;
+        $(".timedown").text(time+'s');
+    },1000);
+}
+
+
 // 验证手机号格式
 function isPoneAvailable($poneInput) {
     var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;

+ 22 - 15
src/web/staticres/structuredata/pc/js/write_infor.js

@@ -9,6 +9,8 @@ if (s_myemail!=""&&s_myemail!=null){
    $('.ipt_email').val(s_myemail)
    $('.correct-icon').show()
    freesubmit();
+}else{
+    $('.ipt_email').val('')
 }
 if (s_phone!=""&&s_phone!=null){
    isfreesubmit[1] = 'true';
@@ -201,9 +203,11 @@ window.location.href="/front/dataExport/toSieve?from=structed"
                         $('.correct-icon').hide()
                         return
                     }else if(res.errCode == 2) {
+                        countdown()
                         $('.correct-icon').hide()
                         return
                     }else if(res.errCode == 3) {
+                        countdown()
                         $('.correct-icon').hide()
                         return
                     }else if(res.errCode == 4) {
@@ -212,21 +216,7 @@ window.location.href="/front/dataExport/toSieve?from=structed"
                         $('.correct-icon').show()
                         freesubmit()
                     }else if(res.errCode == 5) {
-                        $('.l-get-sms').hide()
-                        $('.timedown').show()
-                        var time=300;
-                        setTime=setInterval(function(){
-                          if(time<=0){
-                            $('.timedown').hide()
-                            $('.l-get-sms').show()
-                            $(".timedown").text('重新获取'+ '(' + 299+'s' + ')');
-                            clearInterval(setTime);
-                            return;
-                          }
-                          time--;
-                          $(".timedown").text('重新获取'+ '(' + time+'s' + ')');
-                        },1000);
-                        
+                        countdown()
                     }else{
                         // vTools.jLoading({
                         //     content: '发送失败',
@@ -242,6 +232,23 @@ window.location.href="/front/dataExport/toSieve?from=structed"
         
     })
 
+    function countdown() {
+        $('.l-get-sms').hide()
+        $('.timedown').show()
+        var time=300;
+        setTime=setInterval(function(){
+            if(time<=0){
+                $('.timedown').hide()
+                $('.l-get-sms').show()
+                $(".timedown").text('重新获取'+ '(' + 299+'s' + ')');
+                clearInterval(setTime);
+                return;
+            }
+            time--;
+            $(".timedown").text('重新获取'+ '(' + time+'s' + ')');
+        },1000);
+    }
+
     // 邮箱验证码输入事件
     $('.ipt_code').on('input',function() {
         // console.log($(this).val().length)

+ 27 - 32
src/web/templates/structuredata/mobile/write_infor_wx.html

@@ -167,6 +167,8 @@ $(function(){
       $('.mf .ipt_email').val({{.T.s_myemail}})
       $('.correct-icon').show()
       freesubmit();
+  }else{
+    $('.mf .ipt_email').val('')
   }
   if ({{.T.phone_num}}!=""&&{{.T.phone_num}}!=null){
       isfreesubmit[1] = 'true';
@@ -419,24 +421,10 @@ $(function(){
                   if(res.errCode == 1){
                     $('.correct-icon').hide()
                   }else if(res.errCode == 2) {
+                    countdown()
                     $('.correct-icon').hide()
                   }else if(res.errCode == 3) {
-                    $('.sendEmail').hide()
-                    setTimeout(() => {
-                        $('.timedown').show()
-                    }, 100);
-                    var time=300;
-                    setTime=setInterval(function(){
-                    if(time<=0){
-                        $('.timedown').hide()
-                        $('.sendEmail').show()
-                        time=299
-                        clearInterval(setTime);
-                        return;
-                    }
-                    time--;
-                    $(".timedown").text(time+'s');
-                    },1000);
+                    countdown()
                     $('.correct-icon').hide()
                   }else if(res.errCode == 4) {
                     $('.email_code').slideUp();
@@ -444,22 +432,7 @@ $(function(){
                     freesubmit();
                     $('.correct-icon').hide()
                   }else if(res.errCode == 5) {
-                    $('.sendEmail').hide()
-                    setTimeout(() => {
-                        $('.timedown').show()
-                    }, 100);
-                    var time=300;
-                    setTime=setInterval(function(){
-                    if(time<=0){
-                        $('.timedown').hide()
-                        $('.sendEmail').show()
-                        time=299
-                        clearInterval(setTime);
-                        return;
-                    }
-                    time--;
-                    $(".timedown").text(time+'s');
-                    },1000);
+                    countdown()
                   }else{
                     //   weui.toast('发送失败', 1500);
                   }
@@ -472,6 +445,28 @@ $(function(){
       
   })
 })
+
+
+// 倒计时
+function countdown() {
+    $('.sendEmail').hide()
+    setTimeout(() => {
+        $('.timedown').show()
+    }, 100);
+    var time=300;
+    setTime=setInterval(function(){
+        if(time<=0){
+            $('.timedown').hide()
+            $('.sendEmail').show()
+            time=299
+            clearInterval(setTime);
+            return;
+        }
+        time--;
+        $(".timedown").text(time+'s');
+    },1000);
+}
+
 // 验证手机号格式
 function isPoneAvailable($poneInput) {
     var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;