wifi.js 1.32 KB
/**
 * Created by 王冠伦 on 2018/2/26.
 */
(function () {
    "user strict";

    var railwayController = function($scope,$modal,$http,$interval,dialogService,railwayService){
        $scope.$emit('navShow', 5);

        $scope.vm = {
            requestData:[]
        }
        $scope.wifi={
            phone : '',
            deviceMac : ''};
        $scope.getList = function(){
            $scope.requestData=[];
            $scope.requestData.push($scope.wifi);
            $scope.vm.requestData = $scope.requestData;
            railwayService.getWifiPosition($scope.vm).success(function(data){
                if (data.errors == null || data.errors.length > 0) {
                    dialogService.tip(data.errors);
                }else{
                    if (data.data == null){
                        $scope.vm.description= JSON.stringify(data.message);
                    }else {
                        $scope.vm.description= JSON.stringify(data.data);
                    }
                }
            })
        }
        $scope.doSearch = function(){
            $scope.vm.pageNumber = 1;
            $scope.getList();
        }
    }

    angular.module("xn.page", ["xn.directive.form"])
        .controller("RailwayController",["$scope","$modal","$http","$interval","dialogService","RailwayService",railwayController])
})();