angular.module('push') .controller('cloudHomeCtrl', function ($scope, UtilService, AuthorityService, $timeout, AuthorityModelService) { if($scope.app){ $scope.setStatusBar(0); } $scope.search = {searchkey: ""}; //权限列表初始化 var getAuthorityList = function () { $scope.showLoadingToast(); AuthorityService.getAuthorityList("", "").then(function (response) { $scope.AuthorityList = response.cloautlist; $scope.hideLoadingToast(); }, function () { $scope.hideLoadingToast(); UtilService.showMess("网络不给力,请稍后重试"); }) }; getAuthorityList(); //创建权限 $scope.creatAuthority = function () { AuthorityModelService.resetData(); $scope.go('creatAuthority'); }; //进入权限详情 $scope.goAuthoritydetail = function (tempauthority) { $scope.go('authorityName', {authorityid: tempauthority.id, ccomefrom: tempauthority.comefrom, invite_url:tempauthority.invite_url}); }; //查找权限 $scope.searchClassification = function () { $timeout(function () { $(".searchClassification").css("width", "88%"); $(".category_search_icon").css("left", "5%"); $(".new_category_search").animate({paddingLeft: "10%"}); $(".new_category_search").css("text-align", "left"); $(".searchClassDelete").css("display", "inline-block"); }, 100); }; //取消查询 $scope.searchClassDelete = function () { $(".searchClassification").css("width", "100%"); $(".category_search_icon").animate({left: "39%"}); $(".new_category_search").animate({paddingLeft: "0%"}); $(".new_category_search").css("text-align", "center"); $(".searchClassDelete").css("display", "none"); $scope.search.searchkey = ""; }; });