|
@@ -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();
|