Authored by weiqingting

学生认证 返回

@@ -391,9 +391,19 @@ $(document).on('click', '.s-footer .checkbox', function() { @@ -391,9 +391,19 @@ $(document).on('click', '.s-footer .checkbox', function() {
391 /* 391 /*
392 * 数据提交 392 * 数据提交
393 */ 393 */
  394 +$('.s-submit').data("isClick",true);
394 $(document).on('click', '.s-submit', function() { 395 $(document).on('click', '.s-submit', function() {
395 var obj = changeSuccess(), 396 var obj = changeSuccess(),
396 FAILURE_CAUSE; 397 FAILURE_CAUSE;
  398 + var $that = $(this);
  399 +
  400 + //存cookie 记录状态
  401 + localStorage.setItem(STUDENTCOOKIES, JSON.stringify(obj.data));
  402 +
  403 + if($that.data("isClick")===false){
  404 + return;
  405 + }
  406 + $that.data("isClick",false);
397 407
398 if (!obj.msg) { 408 if (!obj.msg) {
399 $.ajax({ 409 $.ajax({
@@ -412,15 +422,15 @@ $(document).on('click', '.s-submit', function() { @@ -412,15 +422,15 @@ $(document).on('click', '.s-submit', function() {
412 } 422 }
413 }, true); 423 }, true);
414 } 424 }
415 -  
416 location.href = data.data; 425 location.href = data.data;
417 } else { 426 } else {
  427 + $that.data("isClick",true);
418 tip.show(data.message); 428 tip.show(data.message);
419 } 429 }
420 -  
421 }); 430 });
422 } else { 431 } else {
423 tip.show(obj.msg); 432 tip.show(obj.msg);
  433 + $that.data("isClick",true);
424 if (obj.msg.indexOf('字段为空') > -1) { 434 if (obj.msg.indexOf('字段为空') > -1) {
425 FAILURE_CAUSE = 1; 435 FAILURE_CAUSE = 1;
426 } else if (obj.msg.indexOf('认证协议') > -1) { 436 } else if (obj.msg.indexOf('认证协议') > -1) {