Authored by whb

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -422,10 +422,20 @@ exports.init = function(page) { @@ -422,10 +422,20 @@ exports.init = function(page) {
422 $('#agree-terms').click(function() { 422 $('#agree-terms').click(function() {
423 if ($(this).attr('notchecked')) { 423 if ($(this).attr('notchecked')) {
424 $(this).removeAttr('notchecked'); 424 $(this).removeAttr('notchecked');
  425 + $registerBtn.addClass('disable').attr('disabled', 'true');
425 } else { 426 } else {
426 $(this).attr('notchecked', 'true'); 427 $(this).attr('notchecked', 'true');
  428 + $registerBtn.removeClass('disable').removeAttr('disabled');
427 } 429 }
  430 + });
  431 +
  432 + // 按回车键提交
  433 + $registerPage.on('keydown', function(e) {
  434 + var key = e.which;
428 435
  436 + if (key === 13) {
  437 + $registerBtn.click();
  438 + }
429 }); 439 });
430 440
431 $registerPage.find('.va').keyup(function() { 441 $registerPage.find('.va').keyup(function() {
@@ -532,7 +542,6 @@ exports.init = function(page) { @@ -532,7 +542,6 @@ exports.init = function(page) {
532 542
533 //ajax表单提交 543 //ajax表单提交
534 $registerBtn.click(function() { 544 $registerBtn.click(function() {
535 -  
536 var url; 545 var url;
537 546
538 if (page === 'reg') { 547 if (page === 'reg') {
@@ -602,4 +611,4 @@ exports.init = function(page) { @@ -602,4 +611,4 @@ exports.init = function(page) {
602 611
603 $captchaImg.attr('src', captchaImgSrc + '?t=' + time.getTime()); 612 $captchaImg.attr('src', captchaImgSrc + '?t=' + time.getTime());
604 }); 613 });
605 -};  
  614 +};