successIdentifyCtrl.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. angular.module('push')
  2. .controller('successIdentifyCtrl', function ($scope, AccountService) {
  3. if($scope.app){
  4. $scope.setStatusBar(0);
  5. }
  6. $scope.defaultLan = UserService.defaultLan;
  7. $scope.doctype3 = false;
  8. $scope.doctype4 = false;
  9. $scope.doctype5 = false;
  10. $scope.authenstatus = -1;// 认证状态:0未认证 1认证中 2已认证 3认证失败
  11. var getAuthInfo = function () {
  12. $scope.showLoadingToast();
  13. AccountService.getAuthInfo(0).then(function (response) {
  14. console.log(response);
  15. if (angular.isDefined(response.info)) {
  16. $scope.person = response.info;
  17. // 遍历找出身份证正反面
  18. if (angular.isDefined(response.info.imagelist) && response.info.imagelist.length > 0) {
  19. // doctype: 3在职证明 4组织机构代码 5营业执照
  20. angular.forEach(response.info.imagelist, function (val, ind) {
  21. if (val.doctype == 3) {
  22. $scope.doctype3 = true;
  23. }
  24. if (val.doctype == 4) {
  25. $scope.doctype4 = true;
  26. }
  27. if (val.doctype == 5) {
  28. $scope.doctype5 = true;
  29. }
  30. })
  31. }
  32. }
  33. $scope.hideLoadingToast();
  34. }, function () {
  35. $scope.hideLoadingToast();
  36. })
  37. };
  38. getAuthInfo();
  39. });