Authored by 周少峰

Merge branch 'feature/students' into release/4.9.1.0

@@ -510,6 +510,68 @@ $('#identity-Btn').on('click', function() { @@ -510,6 +510,68 @@ $('#identity-Btn').on('click', function() {
510 enrollmentYear: $('#stu-entrance-year').val() 510 enrollmentYear: $('#stu-entrance-year').val()
511 }; 511 };
512 512
  513 + var $prompt = $('#prompt'),
  514 + $agreen = $('#agreen-show'),
  515 + failText = '';
  516 +
  517 + if (identData.name === '') {
  518 + failText = '真实姓名不能为空';
  519 + $prompt.html(failText);
  520 +
  521 + // xls-3埋点
  522 + givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 2, FAILURE_CAUSE: failText});
  523 + return;
  524 + }
  525 + if (identData.certNo === '') {
  526 + failText = '身份证号不能为空';
  527 + $prompt.html(failText);
  528 +
  529 + // xls-3埋点
  530 + givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 2, FAILURE_CAUSE: failText});
  531 + return;
  532 + }
  533 + if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identData.certNo)) {
  534 + failText = '身份证号格式错误';
  535 + $prompt.html(failText);
  536 +
  537 + // xls-3埋点
  538 + givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 2, FAILURE_CAUSE: failText});
  539 + return;
  540 + }
  541 + if (identData.collegeName === '') {
  542 + failText = '学校名称不能为空';
  543 + $prompt.html(failText);
  544 +
  545 + // xls-3埋点
  546 + givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 2, FAILURE_CAUSE: failText});
  547 + return;
  548 + }
  549 + if (identData.educationDegree === '') {
  550 + failText = '学历程度不能为空';
  551 + $prompt.html(failText);
  552 +
  553 + // xls-3埋点
  554 + givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 2, FAILURE_CAUSE: failText});
  555 + return;
  556 + }
  557 + if (identData.enrollmentYear === '') {
  558 + failText = '入学年份不能为空';
  559 + $prompt.html(failText);
  560 +
  561 + // xls-3埋点
  562 + givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 2, FAILURE_CAUSE: failText});
  563 + return;
  564 + }
  565 + if (!$agreen.hasClass('active')) {
  566 + failText = '未同意Yoho!有货学生认证协议';
  567 + $prompt.html(failText);
  568 +
  569 + // xls-3埋点
  570 + givePoint('YB_STUDENT_ATTCT_SUBMIT', {SRC_ID: 2, SUBMIT_RES: 2, FAILURE_CAUSE: failText});
  571 + return;
  572 + }
  573 + $prompt.html('');
  574 +
513 submitIdentity(identData); 575 submitIdentity(identData);
514 }); 576 });
515 577