academicianCtrl.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. angular.module('push')
  2. .controller('academicianCtrl', function ($q, $scope, $ionicActionSheet, ModelService, $stateParams, UtilService, ResourceLibraryService, UserService) {
  3. //方法定义
  4. //外籍人工智能院士列表
  5. var wjAIAcademicianList = function () {
  6. var deferred = $q.defer();
  7. ResourceLibraryService.aiAcademicianList().then(function (response) {
  8. if (response.code == 3350) {
  9. $scope.dataList = response.data;
  10. angular.forEach($scope.dataList, function (value, index) {
  11. var splitArr = value.domain.split(",");
  12. value.domain = splitArr;
  13. });
  14. }
  15. }, function () {
  16. })
  17. return deferred.promise;
  18. };
  19. //外籍人工智能院士详情
  20. $scope.goAcademicTalentsDetail = function (resource, index) {
  21. $scope.go('academicianDetail', {
  22. content: resource.content,
  23. summary: resource.summary,
  24. title: resource.title,
  25. logo: resource.logo,
  26. domain: resource.domain
  27. });
  28. };
  29. //虚拟搜索框
  30. $scope.isShowSearchButton = true;
  31. $scope.keyfilter = {key: ""};//搜索关键词
  32. $scope.showSearchButtonLeft = function () {
  33. $scope.isShowSearchButton = false;
  34. $(".showSearchInput").focus();
  35. };
  36. //清空搜索内容
  37. $scope.clearSearch = function () {
  38. $scope.isShowSearchButton = true;
  39. $scope.keyfilter.key = "";
  40. };
  41. //方法调用
  42. wjAIAcademicianList();
  43. })
  44. ;