identifySystemCtrl.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /**
  2. * Created by pushkeji on 2018/8/10.
  3. */
  4. angular.module('push')
  5. .controller('identifySystemCtrl', ['$scope', 'AccountService', '$stateParams', 'UserService', function ($scope, AccountService, $stateParams, UserService) {
  6. $scope.defaultLan = UserService.defaultLan;
  7. $scope.image4801 = ["./img/2020/jiangli.png","./img/2020/duijie.png","./img/2020/tuisong.png"];
  8. $scope.image4803 = ["./img/2020/jiangli.png","./img/2020/xinxiguanli.png","./img/2020/tuisong.png"];
  9. $scope.image4804 = ["./img/2020/hezuo.png"];
  10. $scope.image4805 = ["./img/2020/tequan.png","./img/2020/fenxi.png"];
  11. $scope.image4806 = ["./img/2020/xinxiguanli.png","./img/2020/tuijian.png"];
  12. $scope.goBackToWhere = function () {
  13. if ($stateParams.comfrom) {
  14. $scope.go($stateParams.comfrom)
  15. } else {
  16. $scope.go('tab.account');
  17. }
  18. }
  19. $scope.advantageList = [
  20. {
  21. title: '认证专属标识',
  22. remark: '彰显身份',
  23. img: ''
  24. }, {
  25. title: '权限升级',
  26. remark: '更多资源获取与回报机会'
  27. }, {
  28. title: '产学研合作优先',
  29. remark: '优先进行产学研合作'
  30. }, {
  31. title: '更多福利',
  32. remark: '后续更多福利'
  33. }
  34. ]
  35. $scope.personalInfomation = {
  36. userid: '',//用户的基本信息
  37. pcCondition: [
  38. {
  39. title: '个人认证',
  40. authenstatus: 5100,//认证成功
  41. remark: '社会身份及职业',
  42. code: 4800
  43. }, {
  44. title: '技术经纪人',
  45. authenstatus: 5100,//未
  46. remark: '技术经纪人权限',
  47. code: 4801
  48. // },{
  49. // title:'节点管理员',
  50. // authenstatus:5100,//认证失败
  51. // remark:'平台管理权限',
  52. // code:4802
  53. },
  54. ],
  55. AccreditedInstitution3: [
  56. {
  57. title: '企业认证',
  58. code: 4803,//跳转页面关键字
  59. remark: '企业权限',
  60. },
  61. ],
  62. AccreditedInstitution4: [
  63. {
  64. title: '高校认证',
  65. code: 4804,
  66. remark: '高校权限'
  67. },
  68. ],
  69. AccreditedInstitution5: [
  70. {
  71. title: '政府认证',
  72. code: 4805,
  73. remark: '政府权限'
  74. },
  75. ],
  76. AccreditedInstitution6: [
  77. {
  78. title: '服务机构认证',
  79. code: 4806,
  80. remark: '服务机构权限'
  81. }
  82. ]
  83. };
  84. var allData = [];
  85. //获取个人认证信息
  86. AccountService.getAuthMessageInfo(0).then(function (res) {
  87. console.log(res);
  88. allData = res.data;
  89. if (res.code == 3350 && res.data.length > 0) {
  90. for (var i = 0; i < $scope.personalInfomation.pcCondition.length; i++) {
  91. angular.forEach(res.data, function (val, index) {
  92. if (val.applytype == $scope.personalInfomation.pcCondition[i].code) {
  93. $scope.personalInfomation.pcCondition[i].authenstatus = val.authenstatus;
  94. $scope.personalInfomation.pcCondition[i].id = val.id;
  95. // console.log($scope.personalInfomation.pcCondition[i]);
  96. }
  97. })
  98. }
  99. }
  100. })
  101. $scope.jumpTo = function (index, type, id) {
  102. var title = $scope.personalInfomation.pcCondition[index].title;
  103. var code = $scope.personalInfomation.pcCondition[index].code;
  104. sessionStorage.indentifyDetailTitle = title;
  105. sessionStorage.indentifyDetailCode = code;
  106. if ($scope.personalInfomation.pcCondition[index].authenstatus == 5100) {
  107. var node = UserService.node;
  108. if ((node == '330122000')&& index == 1) {
  109. AccountService.getUserCheckInfo(UserService.id).then(function (res) {
  110. if (res.code == 3350) {
  111. var data = res.data;
  112. if (data.id == null) {
  113. $scope.go('identifyFormForTongLu', {
  114. pageTitle: '技术经纪人认证',
  115. code: 4801,
  116. action: 'check'
  117. });
  118. } else {
  119. $scope.go('identifyFormForTongLu', {
  120. pageTitle: '技术经纪人认证',
  121. code: 4801,
  122. type: data.authenstatus,
  123. id: data.id,
  124. action: 'check',
  125. comfrom: 'tab.activityIndex'
  126. })
  127. }
  128. ;
  129. }
  130. })
  131. } else {
  132. $scope.go('identifyForm', {pageTitle: title, code: code, type: type, id: id, action: 'submit'});
  133. }
  134. } else {
  135. $scope.go('identifyStatus', {pageTitle: title, code: code, type: type, id: id});
  136. }
  137. }
  138. $scope.jump = function (title, code, type, id) {
  139. sessionStorage.indentifyDetailTitle = title;
  140. sessionStorage.indentifyDetailCode = code;
  141. // console.log(title);
  142. // console.log(code);
  143. var bool = false;
  144. angular.forEach(allData, function (val, index) {
  145. if (val.applytype == code) {
  146. bool = true;
  147. }
  148. })
  149. if (bool) {
  150. $scope.go('identifyDetail', {pageTitle: title, code: code, action: 'submit'});
  151. } else {
  152. $scope.go('identifyForm', {pageTitle: title, code: code, type: type, id: id, action: 'submit'});
  153. }
  154. }
  155. window.addEventListener("resize", function () {
  156. var domWidth = window.document.documentElement.getBoundingClientRect().width;
  157. if (domWidth > 540) {
  158. $scope.viewscreen = 'browser';
  159. } else {
  160. $scope.viewscreen = 'app';
  161. }
  162. })
  163. }])
  164. ;