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