std_admis.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. app.controller('StdBindingCtrl', [ '$rootScope', '$scope', function($rootScope, $scope) {
  2. $scope.curStep = 'info';
  3. $scope.StdReg = {};
  4. $scope.goStep = function(step) {
  5. $scope.curStep = step;
  6. }
  7. $scope.stdBinding = function() {
  8. $scope.StdReg.exam_id = $.trim($scope.StdReg.exam_id);
  9. $scope.StdReg.cert_id = $.trim($scope.StdReg.cert_id);
  10. $scope.StdReg.std_name = $.trim($scope.StdReg.std_name);
  11. if ($scope.StdReg.exam_id == undefined || $scope.StdReg.exam_id.length == 0) {
  12. $.alert('请输入考生号!');
  13. return false;
  14. }
  15. if ($scope.StdReg.cert_id == undefined || $scope.StdReg.cert_id.length == 0) {
  16. $.alert('请输入证件号码!');
  17. return false;
  18. }
  19. if ($scope.StdReg.std_name == undefined || $scope.StdReg.std_name.length == 0) {
  20. $.alert('请输入考生姓名!');
  21. return false;
  22. }
  23. $rootScope.ajaxRequest({
  24. url : '../enrol/std/notice/ym.htm',
  25. data : $scope.StdReg
  26. }, function(response) {
  27. if (response.map) {
  28. $scope.std = response.map;
  29. $scope.curStep = 'success';
  30. }else {
  31. $scope.curStep = 'faile';
  32. $.alert('未达到我校录取标准或信息输入有误\r温馨提示:香港中学文凭的录取工作尚在进行中,目前无法查询,录检结束,系统将自动更新,请耐心等待。');
  33. }
  34. });
  35. }
  36. $scope.exit = function() {
  37. WeixinJSBridge.call('closeWindow');
  38. }
  39. } ])