angular.module('business', []) .controller('businessCtrl', [ '$scope', 'http_service', '$location', 'global_service', function($scope, http_service, $location, global_service){ $scope.mouseover_business_item = function(e){ if($(e.target).is('div')) $(e.target).addClass('hover_active'); else $(e.target).closest('div').addClass('hover_active'); } $scope.mouseout_business_item = function(e){ if($(e.target).is('div')) $(e.target).removeClass('hover_active'); else $(e.target).closest('div').removeClass('hover_active'); } $scope.show_more = function(){ $scope.business_card_shown = !($scope.business_card_shown); } $scope.redirect_to_billing_cfg_guide = function(inCode){ global_service.set_indus(inCode); var guide = { child:[ { "gcPcsCode": 10, "gcPcsStep": 99, "gcInCode":inCode } ] }; http_service.post('guiCfg/insert',guide,function(res){//新增向导信息 if(res.data.opState){ $location.path("/billing_cfg_guide/"+inCode+"/1"); }else{ //弹窗 提示新增向导信息失败 } }); } http_service.post('indus/search', {}, function(res){ if(!res.data.opState){ return false; } $scope.business_list = res.data.data; }) }]);