(function (app) {
    app.factory('carService', ['$http', 'config', "util", 'data', function ($http, config, util, data) {
        return {
            //发布车源信息
            addCar: function (model) {
                return $http({
                    url: config.server + 'api/messages',
                    method: "post",
                    data: model
                })
            },
            //车源列表
            listCars: function (model) {
                return $http({
                    url: config.server + 'api/messages/search',
                    method: "get",
                    data: model
                })
            }
            
        };
    }]);
})(angular.module('app.services'));