angular.module('push') .controller('ChooseCityCtrl', function ($scope, AreaService, $stateParams, ConfigService) { if($scope.app){ $scope.setStatusBar(0); } $scope.cityName = ""; $scope.showLoadingToast(); AreaService.getCityList(2,$stateParams.provinceid).then(function (response) { $scope.cityList = response.regionsList; $scope.hideLoadingToast(); },function () { $scope.hideLoadingToast(); }); //清除输入框 $scope.searchEmpty = function () { $scope.cityName = ""; }; $scope.confirmCity = function (city) { AreaService.cityid = city.id; AreaService.cityname = city.areaname; if(ConfigService.cityflg == 1){ $scope.go('tab.home'); }else if(ConfigService.cityflg == 2){ $scope.backViews(-2); } ConfigService.cityflg = 0; } });