main.js 1019 B

1234567891011121314151617181920212223242526272829303132333435
  1. 'use strict';
  2. angular.module('app').controller('AppCtrl',['$scope','$http','$state',function($scope,$http,$state){
  3. $scope.hosturl = main_host;
  4. //获取报名年份
  5. $scope.getBmYear = function(){
  6. $http.get($scope.hosturl+'/api/EvalStudentBmYears').success(function(data){
  7. if(data.success){
  8. $scope.bmyearlists = data.map.data;
  9. }
  10. });
  11. };
  12. //获取样本类型
  13. $scope.getSimpleType = function(){
  14. $http.get($scope.hosturl+'/api/EvalSimpleTypes').success(function(data){
  15. if(data.success){
  16. $scope.simpletype = data.map.data;
  17. }
  18. });
  19. }
  20. $scope.getBmProv = function(){
  21. $http.get($scope.hosturl+'/api/EvalQueryStudentAreas').success(function(data){
  22. if(data.success){
  23. console.log(data);
  24. $scope.bmprovlists = data.map.provinces;
  25. }
  26. });
  27. }
  28. }]).run(function($rootScope, $templateCache) {
  29. $rootScope.$on('$routeChangeStart', function(event, next, current) {
  30. if (typeof(current) !== 'undefined'){
  31. $templateCache.remove(current.templateUrl);
  32. }
  33. });
  34. });