1234567891011121314151617181920212223242526272829303132333435363738394041 |
- angular.module('push')
- .controller('ChooseProvinceCtrl', function ($scope, AreaService, LocationService, ConfigService) {
- if($scope.app){
- $scope.setStatusBar(0);
- }
- $scope.cityflg = ConfigService.cityflg;
- $scope.locacity = ConfigService.location.city;
- $scope.provinceName = "";
- $scope.showLoadingToast();
- AreaService.getCityList(1,"").then(function (response) {
- $scope.provinceList = response.regionsList;
- $scope.hideLoadingToast();
- },function () {
- $scope.hideLoadingToast();
- });
- //清除输入框
- $scope.searchEmpty = function () {
- $scope.provinceName = "";
- };
- //选择省
- $scope.confirmProvince = function (province) {
- $scope.go('chooseCity',{provinceid:province.id});
- };
- $scope.RepeatCityFixed = function () {
- LocationService.getCurrentLocation().then(function () {
- $scope.locacity = ConfigService.location.city;
- },function () {
- })
- };
- $scope.choseCity = function () {
- AreaService.cityname = $scope.locacity;
- ConfigService.cityflg = 0;
- $scope.goback();
- }
- });
|