|
@@ -2,32 +2,11 @@
|
|
|
'use strict';
|
|
|
$ang.module('gtPartyApp').controller("portalLoginCtrl", ['$scope', '$state', '$http', '$loading', '$alert', '$desData', '$modal', 'AuthUser', function ($scope, $state, $http, $loading, $alert, $desData, $modal, AuthUser) {
|
|
|
$scope.sysName = window.sysCompanyName;
|
|
|
- $scope.errorMsg = '';
|
|
|
- //站点ID
|
|
|
- $scope.menudatas = {
|
|
|
- appkey: "appId",
|
|
|
- defrolekey: "DefaultRoleId",
|
|
|
- getMenuUrl: '../../api/user/getmenubyuid',
|
|
|
- toggle: true
|
|
|
- };
|
|
|
- $scope.loadCurUser = function () {
|
|
|
- $http.get("../../api/user/curloginuser", {params: {appkey: $scope.menudatas.appkey}}).then(function (res) {
|
|
|
- if (res.data.success) {
|
|
|
- if (res.data.item) {
|
|
|
- angular.extend(res.data.item, {dataDzzdm: res.data.extdata.dataDzzdm});
|
|
|
- angular.extend(res.data.item, {gddwdm: res.data.extdata.gddwdm});
|
|
|
- angular.extend(res.data.item, {userType: res.data.extdata.userType});
|
|
|
- angular.extend(res.data.item, {dataScope: res.data.extdata.dataScope});
|
|
|
- angular.extend(res.data.item, {dwId: res.data.extdata.dwId});
|
|
|
- angular.extend(res.data.item, {dwName: res.data.extdata.dwName});
|
|
|
- angular.extend(res.data.item, {oaUserId: res.data.extdata.oaUserId});
|
|
|
- angular.extend(res.data.item, {oaIdCard: res.data.extdata.oaIdCard});
|
|
|
- angular.extend(res.data.item, {generalPartyCode: res.data.extdata.generalPartyCode});
|
|
|
- AuthUser.setUser(res.data.item);
|
|
|
- AuthUser.clearExtData();
|
|
|
|
|
|
- $state.go('homeTabs');
|
|
|
- }
|
|
|
+ $scope.loadCurUser = function () {
|
|
|
+ $http.get("../../api/user/curloginuser", {params: {appkey: "appId"}}).then(function (res) {
|
|
|
+ if (res.data.success && res.data.item) {
|
|
|
+ $state.go('homeTabs');
|
|
|
} else {
|
|
|
$scope.showMsg('失败','单点登录失败!');
|
|
|
$state.go('login');
|