accountQualifyContentCtrl.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. angular.module('push')
  2. .controller('accountQualifyContentCtrl', function ($scope, $stateParams, AccountService, UtilService) {
  3. if($scope.app){
  4. $scope.setStatusBar(0);
  5. }
  6. //获取认证信息
  7. var getQualifyInfo = function () {
  8. $scope.showLoadingToast();
  9. AccountService.getSysUsersAuthen($stateParams.messageid).then(function (response) {
  10. // console.log(response);
  11. angular.forEach(response, function (value) {
  12. if (value.info.type == 1) {
  13. $scope.identify = value.info;
  14. }
  15. if (value.info.type == 2) {
  16. $scope.job = value.info;
  17. }
  18. if (value.info.type == 3) {
  19. $scope.company = value.info;
  20. }
  21. });
  22. $scope.hideLoadingToast();
  23. }, function () {
  24. $scope.hideLoadingToast();
  25. })
  26. };
  27. getQualifyInfo();
  28. $scope.goUnitIdentify = function () {
  29. if (angular.isUndefined($scope.identify) || $scope.identify.authenstatus == 0) {
  30. UtilService.showMess("身份证认证通过后,方可进行单位证明认证");
  31. return;
  32. }
  33. if (angular.isDefined($scope.company) && $scope.company.authenstatus == 1) {
  34. UtilService.showMess("单位信息已在审核中...");
  35. return;
  36. }
  37. $scope.go("unitIdentify", {company: angular.toJson($scope.company)});
  38. };
  39. $scope.goPersonIdentify = function () {
  40. if (angular.isDefined($scope.identify) && $scope.identify.authenstatus == 1) {
  41. UtilService.showMess("身份证信息已在审核中...");
  42. return;
  43. }
  44. $scope.go("personIdentify", {identify: angular.toJson($scope.identify)});
  45. };
  46. $scope.goJobIdentify = function () {
  47. if (angular.isUndefined($scope.identify) || $scope.identify.authenstatus == 0) {
  48. UtilService.showMess("身份证认证通过后,方可进行在职证明认证");
  49. return;
  50. }
  51. if (angular.isDefined($scope.job) && $scope.job.authenstatus == 1) {
  52. UtilService.showMess("在职信息已在审核中...");
  53. return;
  54. }
  55. $scope.go("jobIdentify", {job: angular.toJson($scope.job)});
  56. };
  57. });