123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- /**
- * Created by pushkeji on 2018/8/10.
- */
- angular.module('push')
- .controller('identifySystemCtrl', ['$scope', 'AccountService', '$stateParams', 'UserService', function ($scope, AccountService, $stateParams, UserService) {
- $scope.defaultLan = UserService.defaultLan;
- $scope.image4801 = ["./img/2020/jiangli.png","./img/2020/duijie.png","./img/2020/tuisong.png"];
- $scope.image4803 = ["./img/2020/jiangli.png","./img/2020/xinxiguanli.png","./img/2020/tuisong.png"];
- $scope.image4804 = ["./img/2020/hezuo.png"];
- $scope.image4805 = ["./img/2020/tequan.png","./img/2020/fenxi.png"];
- $scope.image4806 = ["./img/2020/xinxiguanli.png","./img/2020/tuijian.png"];
- $scope.goBackToWhere = function () {
- if ($stateParams.comfrom) {
- $scope.go($stateParams.comfrom)
- } else {
- $scope.go('tab.account');
- }
- }
- $scope.advantageList = [
- {
- title: '认证专属标识',
- remark: '彰显身份',
- img: ''
- }, {
- title: '权限升级',
- remark: '更多资源获取与回报机会'
- }, {
- title: '产学研合作优先',
- remark: '优先进行产学研合作'
- }, {
- title: '更多福利',
- remark: '后续更多福利'
- }
- ]
- $scope.personalInfomation = {
- userid: '',//用户的基本信息
- pcCondition: [
- {
- title: '个人认证',
- authenstatus: 5100,//认证成功
- remark: '社会身份及职业',
- code: 4800
- }, {
- title: '技术经纪人',
- authenstatus: 5100,//未
- remark: '技术经纪人权限',
- code: 4801
- // },{
- // title:'节点管理员',
- // authenstatus:5100,//认证失败
- // remark:'平台管理权限',
- // code:4802
- },
- ],
- AccreditedInstitution3: [
- {
- title: '企业认证',
- code: 4803,//跳转页面关键字
- remark: '企业权限',
- },
- ],
- AccreditedInstitution4: [
- {
- title: '高校认证',
- code: 4804,
- remark: '高校权限'
- },
- ],
- AccreditedInstitution5: [
- {
- title: '政府认证',
- code: 4805,
- remark: '政府权限'
- },
- ],
- AccreditedInstitution6: [
- {
- title: '服务机构认证',
- code: 4806,
- remark: '服务机构权限'
- }
- ]
- };
- var allData = [];
- //获取个人认证信息
- AccountService.getAuthMessageInfo(0).then(function (res) {
- console.log(res);
- allData = res.data;
- if (res.code == 3350 && res.data.length > 0) {
- for (var i = 0; i < $scope.personalInfomation.pcCondition.length; i++) {
- angular.forEach(res.data, function (val, index) {
- if (val.applytype == $scope.personalInfomation.pcCondition[i].code) {
- $scope.personalInfomation.pcCondition[i].authenstatus = val.authenstatus;
- $scope.personalInfomation.pcCondition[i].id = val.id;
- // console.log($scope.personalInfomation.pcCondition[i]);
- }
- })
- }
- }
- })
- $scope.jumpTo = function (index, type, id) {
- var title = $scope.personalInfomation.pcCondition[index].title;
- var code = $scope.personalInfomation.pcCondition[index].code;
- sessionStorage.indentifyDetailTitle = title;
- sessionStorage.indentifyDetailCode = code;
- if ($scope.personalInfomation.pcCondition[index].authenstatus == 5100) {
- var node = UserService.node;
- if ((node == '330122000')&& index == 1) {
- AccountService.getUserCheckInfo(UserService.id).then(function (res) {
- if (res.code == 3350) {
- var data = res.data;
- if (data.id == null) {
- $scope.go('identifyFormForTongLu', {
- pageTitle: '技术经纪人认证',
- code: 4801,
- action: 'check'
- });
- } else {
- $scope.go('identifyFormForTongLu', {
- pageTitle: '技术经纪人认证',
- code: 4801,
- type: data.authenstatus,
- id: data.id,
- action: 'check',
- comfrom: 'tab.activityIndex'
- })
- }
- ;
- }
- })
- } else {
- $scope.go('identifyForm', {pageTitle: title, code: code, type: type, id: id, action: 'submit'});
- }
- } else {
- $scope.go('identifyStatus', {pageTitle: title, code: code, type: type, id: id});
- }
- }
- $scope.jump = function (title, code, type, id) {
- sessionStorage.indentifyDetailTitle = title;
- sessionStorage.indentifyDetailCode = code;
- // console.log(title);
- // console.log(code);
- var bool = false;
- angular.forEach(allData, function (val, index) {
- if (val.applytype == code) {
- bool = true;
- }
- })
- if (bool) {
- $scope.go('identifyDetail', {pageTitle: title, code: code, action: 'submit'});
- } else {
- $scope.go('identifyForm', {pageTitle: title, code: code, type: type, id: id, action: 'submit'});
- }
- }
- window.addEventListener("resize", function () {
- var domWidth = window.document.documentElement.getBoundingClientRect().width;
- if (domWidth > 540) {
- $scope.viewscreen = 'browser';
- } else {
- $scope.viewscreen = 'app';
- }
- })
- }])
- ;
|