angular.module('push') .controller('academicianCtrl', function ($q, $scope, $ionicActionSheet, ModelService, $stateParams, UtilService, ResourceLibraryService, UserService) { //方法定义 //外籍人工智能院士列表 var wjAIAcademicianList = function () { var deferred = $q.defer(); ResourceLibraryService.aiAcademicianList().then(function (response) { if (response.code == 3350) { $scope.dataList = response.data; angular.forEach($scope.dataList, function (value, index) { var splitArr = value.domain.split(","); value.domain = splitArr; }); } }, function () { }) return deferred.promise; }; //外籍人工智能院士详情 $scope.goAcademicTalentsDetail = function (resource, index) { $scope.go('academicianDetail', { content: resource.content, summary: resource.summary, title: resource.title, logo: resource.logo, domain: resource.domain }); }; //虚拟搜索框 $scope.isShowSearchButton = true; $scope.keyfilter = {key: ""};//搜索关键词 $scope.showSearchButtonLeft = function () { $scope.isShowSearchButton = false; $(".showSearchInput").focus(); }; //清空搜索内容 $scope.clearSearch = function () { $scope.isShowSearchButton = true; $scope.keyfilter.key = ""; }; //方法调用 wjAIAcademicianList(); }) ;