reportIndex.js 1.01 KB
(function () {
    "use strict";
    var app= angular.module("xn.page", []);
    app.controller("ReportIndexController",["$http","$scope","CustomizationService","dialogService",function($http,$scope,customizationService,dialogService) {
        $scope.$emit('navShow',3);
        $scope.vm = {
            pageSize:0,
            id:$scope.userId
        };
        customizationService.apiCustomizationSsoTokenFind($scope.vm).success(function(data){
            if (data.errors == null || data.errors.length > 0){
                dialogService.tip(data.errors,null,0);
            } else {
                $scope.result=data.result[0];
                $.ajax({
                    method: "GET",
                    url: "http://dev4api.lecuntao.com/index.php?act=xy_erp&op=login&data="+$scope.result.ssoToken,
                    dataType: "jsonp",
                    success: function(data) {
                        console.log(data);
                    }
                });
            }
        });


       

    }]);
})();