bs-idcert.js 947 B

1234567891011121314151617181920212223242526272829303132333435
  1. $(function () {
  2. checkIDCard();
  3. });
  4. function cancel() {
  5. location.href = rootPath + "/Home/screensaver";
  6. }
  7. function checkIDCard() {
  8. $.post(rootPath + "/Home/Check", null, function (res) {
  9. if (res.IsSuccess) {
  10. $("#loading").show();
  11. getUserID(res.Data);
  12. } else {
  13. showError("验证失败:" + res.Message + "请联系管理员。");
  14. //checkIDCard();
  15. }
  16. resetTime();
  17. });
  18. }
  19. function getUserID(idNum) {
  20. $.post(emisWeb + "/StudentServices/GetStudentViewByIDNum", { idNum: idNum }, function (res) {
  21. if (res) {
  22. if (res.UserID != null) {
  23. location.href = rootPath + "/Home/Preview?userID=" + res.UserID + "&idNum=" + idNum;
  24. return;
  25. }
  26. }
  27. $("#loading").hide();
  28. showError("您的身份证信息无效,请联系相关老师。");
  29. resetTime();
  30. }, 'json');
  31. }