/** * 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'; } }) }]) ;