Преглед изворни кода

Merge branch 'dev2.10.10' of http://192.168.3.207:10080/qmx/jy into dev2.10.10

wangshan пре 5 година
родитељ
комит
9e19b6d868

+ 10 - 2
src/jfw/modules/app/src/web/templates/structeddata/write_infor.html

@@ -189,6 +189,14 @@ $(function(){
       issubmit[1]="true"
       freesubmit();
   }
+
+  //   每次进页面都要清空之前的信息
+  $('.mf .ipt_name').val('')
+  $('.mf .ipt_phone').val('')
+  $('.mf .ipt_code').val('')
+  $('.kf .ipt_name').val('')
+  $('.kf .ipt_phone').val('')
+  
   $(".write_run_now").on("click",function(){
     window.location.href="/jyapp/front/dataExport/toSieve?from=structed"
   })
@@ -335,7 +343,7 @@ $(function(){
           },
           success:function(res){
               if(res.status == true) {
-                window.location.href = "/jyapp/structed/success"
+                window.location.replace("/jyapp/structed/success")
               }else{
                 //   weui.toast('保存失败', 1500);
               }
@@ -397,7 +405,7 @@ $(function(){
           },
           success:function(res) {
               if(res.error_code == 0){
-                window.location.href = "/jyapp/structed/success"
+                window.location.replace("/jyapp/structed/success")
               }else{
                 // weui.toast(res.data["msg"], {
                 //     duration: 1500

+ 1 - 1
src/web/staticres/structuredata/mobile/css/write_infor.css

@@ -177,7 +177,7 @@ input::-webkit-input-placeholder {
   background-size: .48rem .48rem;
   width: .48rem;
   height: .48rem;
-  margin-left: 0.6rem;
+  /* margin-left: 0.6rem; */
   display: none;
 }
 

Разлика између датотеке није приказан због своје велике величине
+ 0 - 1
src/web/staticres/structuredata/pc/js/jquery.min.js


+ 11 - 11
src/web/staticres/structuredata/pc/js/write_infor.js

@@ -13,6 +13,14 @@ if (s_phone!=""&&s_phone!=null){
    issubmit[1]="true"
    freesubmit();
 }
+
+  //   每次进页面都要清空之前的信息
+  $('.ipt_name').val('')
+  $('.ipt_phone').val('')
+  $('.ipt_code').val('')
+  $('.write_ipt_name').val('')
+  $('.write_ipt_phone').val('')
+
 $(".write_run_now").on("click",function(){
 window.location.href="/front/dataExport/toSieve?from=structed"
 })
@@ -361,7 +369,8 @@ window.location.href="/front/dataExport/toSieve?from=structed"
 
     // 判断提交按钮是否可以点击
     function submit() {
-        if(issubmit.includes('false')) {
+        console.log(issubmit.indexOf('false'))
+        if(issubmit.indexOf('false') != -1) {
             $('.write_run').attr('disabled',true)
         } else {
             $('.write_run').attr('disabled',false)
@@ -370,20 +379,11 @@ window.location.href="/front/dataExport/toSieve?from=structed"
 
     // 判断免费样例的按钮是否可以点击
     function freesubmit() {
-        if(isfreesubmit.includes('false')) {
+        if(isfreesubmit.indexOf('false') != -1) {
             $('.login-dig-submit-button').attr('disabled',true)
         } else {
             $('.login-dig-submit-button').attr('disabled',false)
         }
     }
     freesubmit()
-
-    // 判断提交按钮是否可以点击
-    function submit() {
-        if(issubmit.includes('false')) {
-            $('.write_run').attr('disabled',true)
-        } else {
-            $('.write_run').attr('disabled',false)
-        }
-    }
 })

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

@@ -159,8 +159,7 @@ var issubmit = ["false","false"]
 var isfreesubmit = ["false","false","false","false"]
 
 $(function(){
-  var bindEmail = sessionStorage.getItem('bindEmail')
-  console.log(!bindEmail)
+//   var bindEmail = sessionStorage.getItem('bindEmail')
   if ({{.T.s_myemail}}!=""&&{{.T.s_myemail}}!=null){
       $('.email_code').slideUp();
       isfreesubmit[2] = 'true';
@@ -173,43 +172,12 @@ $(function(){
       freesubmit();
   }
 
-//   判断session有没有值,如果为空且后台返回不为空则赋值
-if(!bindEmail){
-    if({{.T.s_myemail}}!=""&&{{.T.s_myemail}}!=null){
-        sessionStorage.setItem('bindEmail',{{.T.s_myemail}})
-        $('.ipt_email').val({{.T.s_myemail}})
-    }else{
-        sessionStorage.setItem('bindEmail','')
-    }
-}else{
-    if({{.T.s_myemail}} == bindEmail){
-        $('.ipt_email').val(bindEmail)
-    }else{
-        $.ajax({
-            url:'/front/structed/verifyEmail',
-            type:'POST',
-            data:{
-                email:bindEmail,
-            },
-            success:function(res) {
-                if(res.status == true) {
-                    isfreesubmit[3] = 'true'
-                    $('.email_code').slideUp();
-                    $('.correct-icon').show()
-                }else{
-                    $('.email_code').slideDown()
-                    isfreesubmit[3] = 'false'
-                    $('.correct-icon').hide()
-                }
-                freesubmit()
-            },
-            error:function(err) {
-                console.log(err)
-
-            } 
-        })
-    }
-}
+//   每次进页面都要清空之前的信息
+  $('.mf .ipt_name').val('')
+  $('.mf .ipt_phone').val('')
+  $('.mf .ipt_code').val('')
+  $('.kf .ipt_name').val('')
+  $('.kf .ipt_phone').val('')
   
   $(".write_run_now").on("click",function(){
     window.location.href="/front/wx_dataExport/toSieve?from=structed"
@@ -275,6 +243,7 @@ if(!bindEmail){
                   email:this.value,
               },
               success:function(res) {
+                  console.log(res)
                   if(res.status == true) {
                       isfreesubmit[3] = 'true'
                       $('.email_code').slideUp();
@@ -357,7 +326,7 @@ if(!bindEmail){
           },
           success:function(res){
               if(res.status == true) {
-                window.location.href = "/front/structed/success"
+                window.location.replace("/front/structed/success")
               }else{
                 //   weui.toast('保存失败', 1500);
               }
@@ -419,7 +388,7 @@ if(!bindEmail){
           },
           success:function(res) {
               if(res.error_code == 0){
-                window.location.href = "/front/structed/success"
+                window.location.replace("/front/structed/success")
               }else{
                 // weui.toast(res.data["msg"], {
                 //     duration: 1500
@@ -434,7 +403,7 @@ if(!bindEmail){
       var iptemail = $('.ipt_email').val()
       var emailrule = isAvailableEmail(iptemail)
     //   将输入的邮箱地址保存到session
-    sessionStorage.setItem('bindEmail',iptemail)
+    // sessionStorage.setItem('bindEmail',iptemail)
       if(emailrule){
           $('.email_tips').hide()
         //   $('.timedown').show()
@@ -451,6 +420,22 @@ if(!bindEmail){
                   }else if(res.errCode == 2) {
                     $('.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);
                     $('.correct-icon').hide()
                   }else if(res.errCode == 4) {
                     $('.email_code').slideUp();

+ 1 - 1
src/web/templates/structuredata/mobile/write_result.html

@@ -35,7 +35,7 @@
 <script>
     function back_to_index(){
         // window.location.href = "/jylab/mainSearch"
-        history.go(-2)
+        history.go(-1)
     }
 </script>
 </html>

+ 2 - 1
src/web/templates/structuredata/pc/info.html

@@ -1,3 +1,4 @@
+<!DOCTYPE html>
 <html>
 <head>
     <meta charset="UTF-8">
@@ -134,7 +135,7 @@
 </div>
 
 <script src="{{Msg "seo" "cdn"}}/structuredata/pc/js/common.js?v={{Msg "seo" "version"}}"></script>
-<script src="{{Msg "seo" "cdn"}}/structuredata/pc/js/write_infor.js?v={{Msg "seo" "version"}}11"></script>
+<script src="{{Msg "seo" "cdn"}}/structuredata/pc/js/write_infor.js?v={{Msg "seo" "version"}}112"></script>
 {{include "/common/pcbottom.html"}}
 {{include "/common/baiducc.html"}}
 </body>

Неке датотеке нису приказане због велике количине промена