# 接口说明
## 通用接口
### 登陆
- `POST /api/login`
- 参数:

参数         |  类型    |   可选  |    备注
----------- |  ------  |  ------   |  --------
code        |  string  | 	必须  |  小程序code

- 响应:
 
```
//满足UnionID返回条件时，返回的JSON数据包
{
    "openid": "OPENID",
    "session_key": "SESSIONKEY",
    "unionid": "UNIONID"
}
```
```
//错误时返回JSON数据包(示例为Code无效)
{
	"errcode": 40029,
	"errmsg": "invalid code"
}
```

### 上传图片
- `POST /api/upload`
- 参数:

参数         |  类型    |   可选  |    备注
----------- |  ------  |  ------   |  --------
photo       |   png/jpeg  | 	必须  |  图片

- 响应:
 
```
{
	"status": 0,
	"path": "/path/photo.jpeg"
}
```
```
{
	"status": -1,
	"message": "error, photo is valid"
}
```
```
{
	"status": -2,
	"message": "error, error message"
}
```

### 添加订单评论
- `POST /api/${order_type}/${order_id}/comment`
- 参数:
参数         |  类型    |   可选  |    备注
----------- |  ------  |  ------   |  --------
title       |  string  |  必须      |   订单评论标题
content     |  text    | 必须       |   评论内容

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}

{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 分页获取订单评论
- `GET /api/${order_type}/${order_id}/comments`
- 参数: 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[{
			"id": 123456,
			"wechat_id": "wechat_id",
			"title": "测试标题",
			"content": "测试内容",
			"show": 0, // 预留字段, 0可视, 1隐藏
			"created_at": "2018-02-16 11:10:56",
			"updated_at": "2018-02-16 12:00:51"
		},
		...
   ]
}
```

### 我的订单
- `GET /api/my/orders`
- 参数:

参数         |  类型    |   可选               |    备注
----------- |  ------  |  ------------------ |  --------
code        |  string  | 	必须               |  小程序code

- 响应:

```
{
	"status": 0,
	"data": {
		"houseApplianceCleanOrder": [
			{
				"id": 123456,
				"wechat_id": "wechat_id",
				"appliances": "清洁项目1, 清洁项目1, 清洁项目2, 清洁项目3",
				"adress": "地址",
				"contact": "联系人",
				"phone": "13800138000",
				"price": 12.3,
				"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
				"created_at": "2018-02-16 11:10:56",
				"updated_at": "2018-02-16 12:00:51"
			},
			...
		],
		"houseCleanOrder": [
			{
				"id": 123456,
				"wechat_id": "微信id",
				"type": "清洁类型",
				"area": "清洁面积",
				"adress": "地址",
				"contact": "联系人",
				"phone": "13800138000",
				"price": 12.3,
				"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
				"picture1": "/commom/picture1.jepg",
				"picture2": "/commom/picture2.jepg",
				"picture3": "/commom/picture3.jepg",
				"picture4": "/commom/picture4.jepg",
				"picture5": "/commom/picture5.jepg",
				"created_at": "2018-02-16 11:10:56",
				"updated_at": "2018-02-16 12:00:51"
			},
			...
		],
		"housekeeperOrder": [
			{
				"id": 123456,
				"wechat_id": "wechat_id",
				"contents": ["项目1", "项目1", "项目2", "项目3"],
				"people_num": "2-3人",
				"area": "80-100方",
				"server_time": "2018-08-01",
				"rest": "周日",
				"adress": "地址",
				"contact": "联系人",
				"phone": "13800138000",
				"price": 12.3,
				"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
				"created_at": "2018-02-16 11:10:56",
				"updated_at": "2018-02-16 12:00:51"
			},
			...
		],
		"maternityMatronOrder": [
			{
				"id": 123456,
				"wechat_id": "wechat_id",
				"contents": ["项目1", "项目1", "项目2", "项目3"],
				"people_num": "2-3人",
				"area": "80-100方",
				"server_time": "2018-08-01",
				"rest": "周日",
				"adress": "地址",
				"contact": "联系人",
				"phone": "13800138000",
				"price": 12.3,
				"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
				"created_at": "2018-02-16 11:10:56",
				"updated_at": "2018-02-16 12:00:51"
			},
			...
		],
		"productOrder": [
			{
				"id": 123456,
				"wechat_id": "wechat_id",
				"product_id": 12312313,
				"product_name": "产品名称",
				"unit": 122.3,
				"amount": 1,
				"price": 122.3,
				"remark": "买家备注",
				"info": "卖家备注",
				"adress": "地址",
				"contact": "联系人",
				"phone": "13800138000",
				"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
				"created_at": "2018-02-16 11:10:56",
				"updated_at": "2018-02-16 12:00:51"
			},
			...
		]
	}
}
```


### 修改订单状态
- `POST /api/${order_type}/status`
- 参数：

参数         |  类型    |   可选               |    备注
----------- |  ------  |  ------------------ |  --------
id          |  integer | 	必须               |  产品id、活动id、订单id
status      |  integer | 	必须               |  订单状态：0.待处理 1.商家受理 2.待支付 3.已支付

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}
```
```
{
	"status": -1,
	"message": "状态不能为空！"
}
```

## 服务信息接口
### 创建/修改服务信息
- `POST /api/server/store`
- 参数：

参数         |  类型    |   可选               |    备注
----------- |  ------  |  ------------------ |  --------
id          |  integer | 	创建时空，修改时必须  |  活动id
server       |  string  | 	必须               |  服务标识
content     |  string  | 	必须               |  内容

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}
```
```
{
	"status": -1,
	"message": "信息不能为空！"
}
```

## 活动接口
### 创建/修改活动
- `POST /api/campaign/store`
- 参数：

参数         |  类型    |   可选               |    备注
----------- |  ------  |  ------------------ |  --------
id          |  integer | 	创建时空，修改时必须  |  活动id
title       |  string  | 	必须               |  标题
content     |  text    | 	必须               |  内容
status      |  integer | 	可选,默认0          |  活动状态：0.进行中, 1.结束

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}
```
```
{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 删除活动
- `DELETE /api/campaign/${id}`
- 参数：无

- 响应:

 ```
{
	"status": 0,
	"message": "删除成功"
}
```
```
{
	"status": -1,
	"message": "id不能为空！"
}
```

### 获得某活动

- `GET /api/campaign/${id}`
- 参数： 无
- 响应：

 ```
{
	"status": 0,
	"data": {
		"id": 123456,
		"title": "测试标题",
		"content": "测试内容",
		"status": 0,
		"created_at": "2018-02-16 11:10:56",
		"updated_at": "2018-02-16 12:00:51"
	}
}
```

### 分页查询活动
- `GET /api/campaigns`
- 参数： 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[{
			"id": 123456,
			"title": "测试标题",
			"content": "测试内容",
			"status": 0,
			"created_at": "2018-02-16 11:10:56",
			"updated_at": "2018-02-16 12:00:51"
		},
		...
   ]
}
```

## 产品接口
### 创建/修改产品
- `POST /api/product/store`
- 参数：

参数         |  类型    |   可选               |    备注
----------- |  ------  |  ------------------ |  --------
id          |  integer | 	创建时空，修改时必须  |  产品id
name        |  string  | 	必须               |  产品名称
info        |  text    | 	必须               |  产品信息
color       |  string  |   必须               |  产品款色
price       |  double  | 	必须               |  产品价格
classify    |  string  | 	必须               |  产品分类
status      |  integer | 	可选,默认0          |  产品状态：0.上架, 1.下架

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}
```
```
{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 删除产品
- `DELETE /api/product/${id}`
- 参数：无
- 响应:

 ```
{
	"status": 0,
	"message": "删除成功"
}
```
```
{
	"status": -1,
	"message": "id不能为空！"
}
```

### 获得某产品

- `GET /api/product/${id}`
- 参数：无
- 响应：

 ```
{
	"status": 0,
	"data": {
		"id": 123456,
		"name": "测试名称",
		"info": "测试信息",
		"price": 1234.31,
		"classify": "分类1",
		"color": "款色",
		"collect_num": 765,  //收藏数
		"sell_num": 5,       //销量
		"status": 0,         //0上架, 1下架
		"created_at": "2018-02-16 11:10:56",
		"updated_at": "2018-02-16 12:00:51"
		}
}
```

### 修改产品状态
- `POST /api/product/status`
- 参数：

参数         |  类型    |   可选               |    备注
----------- |  ------  |  ------------------ |  --------
id          |  integer | 	创建时空，修改时必须  |  产品id
status      |  integer | 	必须               |  状态：0.上架, 1.下架

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}
```
```
{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 分页查询产品
- `GET /api/products`
- 参数： 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[ {
			"id": 123456,
			"name": "测试名称",
			"info": "测试信息",
			"price": 1234.31,
			"classify": "分类1",
			"color": "款色",
			"collect_num": 765,  //收藏数
			"sell_num": 5,       //销量
			"status": 0,         //0上架, 1下架
			"created_at": "2018-02-16 11:10:56",
			"updated_at": "2018-02-16 12:00:51"
		}, 
		...
   ]
}
```

## 家居清洁订单接口
### 创建/修改家居清洁订单
- `POST /api/house_clean_order/store`
- 参数：

参数         |  类型    |   可选               |    备注
----------- |  ------  |  ------------------ |  --------
id          |  integer | 	创建时空，修改时必须  |  产品id
type        |  integer | 	必须               |  清洁类型
area        |  string  |   必须               |  清洁面积
address     |  string  | 	必须               |  服务地址
contact     |  string  | 	必须               |  联系人
phone       |  string  | 	必须               |  联系电话
price       |  double  | 	可选               |  订单价格
status      |  integer | 	可选,默认0          |  订单状态：0.待处理 1.商家受理 2.待支付 3.已支付
picture1    | string   |  可选                | 图片链接
picture2    | string   |  可选                | 图片链接
picture3    | string   |  可选                | 图片链接
picture4    | string   |  可选                | 图片链接
picture5    | string   |  可选                | 图片链接

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}

{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 删除订单
- `DELETE /api/house_clean_order/${id}`
- 参数：无

- 响应:

 ```
{
	"status": 0,
	"message": "删除成功"
}

{
	"status": -1,
	"message": "id不能为空！"
}
```

### 获得某订单

- `GET /api/house_clean_order/${id}`
- 参数：无

- 响应：

 ```
{
	"status": 0,
	"data": {
		"id": 123456,
		"wechat_id": "微信id",
		"type": "清洁类型",
		"area": "清洁面积",
		"adress": "地址",
		"contact": "联系人",
		"phone": "13800138000",
		"price": 12.3,
		"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
		"picture1": "/commom/picture1.jepg",
		"picture2": "/commom/picture2.jepg",
		"picture3": "/commom/picture3.jepg",
		"picture4": "/commom/picture4.jepg",
		"picture5": "/commom/picture5.jepg",
		"created_at": "2018-02-16 11:10:56",
		"updated_at": "2018-02-16 12:00:51"
	}
}
```

### 分页查询订单
- `GET /api/house_clean_orders`
- 参数： 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[ {
			"id": 123456,
			"wechat_id": "微信id",
			"type": "清洁类型",
			"area": "清洁面积",
			"adress": "地址",
			"contact": "联系人",
			"phone": "13800138000",
			"price": 12.3,
			"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
			"picture1": "/commom/picture1.jepg",
			"picture2": "/commom/picture2.jepg",
			"picture3": "/commom/picture3.jepg",
			"picture4": "/commom/picture4.jepg",
			"picture5": "/commom/picture5.jepg",
			"created_at": "2018-02-16 11:10:56",
			"updated_at": "2018-02-16 12:00:51"
		},
		...
   ]
}
```

## 家电清洁订单接口
### 创建/修改订单
- `POST /api/house_appliance_clean_order/store`
- 参数：

参数         |  类型    |   可选               |    备注
----------- |  ------  |  ------------------ |  --------
id          |  integer | 	创建时空，修改时必须  |  产品id
appliances  |  string[]|   必须               |  项目, 数组形式，多个数量则出现多次,比如 ['项目1', '项目1', '项目2', '项目2', '项目3']
address     |  string  | 	必须               |  服务地址
contact     |  string  | 	必须               |  联系人
phone       |  string  | 	必须               |  联系电话
price       |  double  | 	可选               |  订单价格
status      |  integer | 	可选,默认0          |  订单状态：0.待处理 1.商家受理 2.待支付 3.已支付

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}

{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 删除订单
- `DELETE /api/house_appliance_clean_order/${id}`
- 参数：无

- 响应:

 ```
{
	"status": 0,
	"message": "删除成功"
}

{
	"status": -1,
	"message": "id不能为空！"
}
```

### 获得某订单

- `GET /api/house_appliance_clean_order/${id}`
- 参数：无

- 响应：

 ```
{
	"status": 0,
	"data": {
		"id": 123456,
		"wechat_id": "wechat_id",
		"appliances": ["清洁项目1", "清洁项目1", "清洁项目2", "清洁项目3"],
		"adress": "地址",
		"contact": "联系人",
		"phone": "13800138000",
		"price": 12.3,
		"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
		"created_at": "2018-02-16 11:10:56",
		"updated_at": "2018-02-16 12:00:51"
	}
}
```

### 分页查询订单
- `GET /api/house_appliance_clean_orders`
- 参数： 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[ {
			"id": 123456,
			"wechat_id": "wechat_id",
			"appliances": ["清洁项目1", "清洁项目1", "清洁项目2", "清洁项目3"],
			"adress": "地址",
			"contact": "联系人",
			"phone": "13800138000",
			"price": 12.3,
			"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
			"created_at": "2018-02-16 11:10:56",
			"updated_at": "2018-02-16 12:00:51"
		}, 
		...
   ]
}
```

## 保姆订单接口
### 创建/修改订单
- `POST /api/housekeeper_order/store`
- 参数：

参数         |  类型    |   可选               |    备注
----------- |  ------  |  ------------------ |  --------
id          |  integer | 	创建时空，修改时必须  |  产品id
contents    |  string[]|   必须               |  项目内容, 数组形式，多个数量则出现多次，比如 ['项目1', '项目1', '项目2', '项目2', '项目3']
people_num  |  string  | 	必须               |  人数
server_time |  string  | 	必须               |  服务时间
rest        |  string  | 	必须               |  休息时间
area        |  string  | 	必须               |  房屋面积
address     |  string  | 	必须               |  服务地址
contact     |  string  | 	必须               |  联系人
phone       |  string  | 	必须               |  联系电话
price       |  double  | 	可选               |  订单价格
status      |  integer | 	可选,默认0          |  订单状态：0.待处理 1.商家受理 2.待支付 3.已支付

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}

{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 删除订单
- `DELETE /api/housekeeper_order/${id}`
- 参数：无

- 响应:

 ```
{
	"status": 0,
	"message": "删除成功"
}

{
	"status": -1,
	"message": "id不能为空！"
}
```

### 获得某订单

- `GET /api/housekeeper_order/${id}`
- 参数：无

- 响应：

 ```
{
	"status": 0,
	"data": {
		"id": 123456,
		"wechat_id": "wechat_id",
		"contents": ["项目1", "项目1", "项目2", "项目3"],
		"people_num": "2-3人",
		"area": "80-100方",
		"server_time": "2018-08-01",
		"rest": "周日",
		"adress": "地址",
		"contact": "联系人",
		"phone": "13800138000",
		"price": 12.3,
		"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
		"created_at": "2018-02-16 11:10:56",
		"updated_at": "2018-02-16 12:00:51"
	}
}
```

### 分页查询订单
- `GET /api/housekeeper_orders`
- 参数： 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[ {
			"id": 123456,
			"wechat_id": "wechat_id",
			"contents": ["项目1", "项目1", "项目2", "项目3"],
			"people_num": "2-3人",
			"area": "80-100方",
			"server_time": "2018-08-01",
			"rest": "周日",
			"adress": "地址",
			"contact": "联系人",
			"phone": "13800138000",
			"price": 12.3,
			"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
			"created_at": "2018-02-16 11:10:56",
			"updated_at": "2018-02-16 12:00:51"
		}, 
		...
   ]
}
```

## 月嫂订单接口
### 创建/修改订单
- `POST /api/maternity_matron_order/store`
- 参数：

参数            |  类型    |   可选               |    备注
-----------    |  ------  |  ------------------ |  --------
id             |  integer | 	创建时空，修改时必须  |  产品id
level          |  string  |   必须               |  月嫂等级
expected_date  |  string  | 	必须               |  预产期
special_demand |  string  | 	必须               |  特殊需求
server_time     |  string  | 	必须               |  服务时间
address        |  string  | 	必须               |  服务地址
contact        |  string  | 	必须               |  联系人
phone          |  string  | 	必须               |  联系电话
price          |  double  | 	可选               |  订单价格
status         |  integer | 	可选,默认0          |  订单状态：0.待处理 1.商家受理 2.待支付 3.已支付

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}

{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 删除订单
- `DELETE /api/maternity_matron_order/${id}`
- 参数：无

- 响应:

 ```
{
	"status": 0,
	"message": "删除成功"
}

{
	"status": -1,
	"message": "id不能为空！"
}
```

### 获得某订单

- `GET /api/maternity_matron_order/${id}`
- 参数：无

- 响应：

 ```
{
	"status": 0,
	"data": {
		"id": 123456,
		"wechat_id": "wechat_id",
		"level": "8999-10000",
		"expected_date": "2018年12月21日",
		"special_demand": "需要个胸大的",
		"server_time": "2018-12-01至2019-02-01",
		"adress": "地址",
		"contact": "联系人",
		"phone": "13800138000",
		"price": 12.3,
		"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
		"created_at": "2018-02-16 11:10:56",
		"updated_at": "2018-02-16 12:00:51"
	}
}
```

### 分页查询订单
- `GET /api/maternity_matron_orders`
- 参数： 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[ {
			"id": 123456,
			"wechat_id": "wechat_id",
			"level": "8999-10000",
			"expected_date": "2018年12月21日",
			"special_demand": "需要个胸大的",
			"server_time": "2018-12-01至2019-02-01",
			"adress": "地址",
			"contact": "联系人",
			"phone": "13800138000",
			"price": 12.3,
			"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
			"created_at": "2018-02-16 11:10:56",
			"updated_at": "2018-02-16 12:00:51"
		}, 
		...
   ]
}
```

## 产品订单接口
### 创建/修改订单
- `POST /api/product_order/store`
- 参数：

参数            |  类型    |   可选               |    备注
-----------    |  ------  |  ------------------ |  --------
id             |  integer | 	创建时空，修改时必须  |  产品id
product_id     |  integer |   必须               |  产品id
amount         |  integer | 	必须               |  购买数量
remark         |  string  | 	可选               |  买家备注
info           |  string  | 	可选               |  卖家备注
address        |  string  | 	必须               |  服务地址
contact        |  string  | 	必须               |  联系人
phone          |  string  | 	必须               |  联系电话
price          |  double  | 	可选               |  订单价格
status         |  integer | 	可选,默认0          |  订单状态：0.待处理 1.商家受理 2.待支付 3.已支付

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}

{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 删除订单
- `DELETE /api/product_order/${id}`
- 参数：无

- 响应:

 ```
{
	"status": 0,
	"message": "删除成功"
}

{
	"status": -1,
	"message": "id不能为空！"
}
```

### 获得某订单

- `GET /api/product_order/${id}`
- 参数：无

- 响应：

 ```
{
	"status": 0,
	"data": {
		"id": 123456,
		"wechat_id": "wechat_id",
		"product_id": 12312313,
		"product_name": "产品名称",
		"unit": 122.3,
		"amount": 1,
		"price": 122.3,
		"remark": "买家备注",
		"info": "卖家备注",
		"adress": "地址",
		"contact": "联系人",
		"phone": "13800138000",
		"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
		"created_at": "2018-02-16 11:10:56",
		"updated_at": "2018-02-16 12:00:51"
	}
}
```

### 分页查询订单
- `GET /api/product_orders`
- 参数： 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[ {
			"id": 123456,
			"wechat_id": "wechat_id",
			"product_id": 12312313,
			"product_name": "产品名称",
			"unit": 122.3,
			"amount": 1,
			"price": 122.3,
			"remark": "买家备注",
			"info": "卖家备注",
			"adress": "地址",
			"contact": "联系人",
			"phone": "13800138000",
			"status": 0, // 0.待处理 1.商家受理 2.待支付 3.已支付
			"created_at": "2018-02-16 11:10:56",
			"updated_at": "2018-02-16 12:00:51"
		}, 
		...
   ]
}
```

## 服务信息接口
### 创建/修改服务信息
- `POST /api/server_info/store`
- 参数：

参数            |  类型    |   可选               |    备注
-----------    |  ------  |  ------------------ |  --------
id             |  integer | 	创建时空，修改时必须  |  服务id
server         |  string  | 	必须               |  服务名称
content        |  text    | 	必须               |  服务内容说明
photo          |  string  | 	必须               |  首页显示的图片地址

- 响应:

```
{
	"status": 0,
	"message": "保存成功"
}

{
	"status": -1,
	"message": "信息不能为空！"
}
```

### 删除订单
- `DELETE /api/server_info/${id}`
- 参数：无

- 响应:

 ```
{
	"status": 0,
	"message": "删除成功"
}

{
	"status": -1,
	"message": "id不能为空！"
}
```

### 获得某订单

- `GET /api/server_info/${id}`
- 参数：无

- 响应：

 ```
{
	"status": 0,
	"data": {
		"id": 123456,
		"server": "保姆服务",
		"content": "<html>...</html>",
		"photo": "https://wechat.sotype.com/123.png",
		"created_at": "2018-02-16 11:10:56",
		"updated_at": "2018-02-16 12:00:51"
	}
}
```

### 分页查询服务
- `GET /api/server_infos`
- 参数： 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[ {
            "id": 123456,
            "server": "保姆服务",
            "content": "<html>...</html>",
		    "photo": "https://wechat.sotype.com/123.png",
            "created_at": "2018-02-16 11:10:56",
            "updated_at": "2018-02-16 12:00:51"
        }, 
		...
   ]
}
```



## 分类接口
### 分页查询分类
- `GET /api/classifies`
- 参数： 无
- 响应:

```
{
   "total": 50,
   "per_page": 15,
   "current_page": 1,
   "last_page": 4,
   "first_page_url": "http://laravel.app?page=1",
   "last_page_url": "http://laravel.app?page=4",
   "next_page_url": "http://laravel.app?page=2",
   "prev_page_url": null,
   "path": "http://laravel.app",
   "from": 1,
   "to": 15,
   "data":[ {
            id: 1,
            created_at: "2018-09-09 13:50:50",
            updated_at: "2018-09-09 13:50:50",
            pid: 0,
            name: "家政"
        },
        {
            id: 2,
            created_at: "2018-09-09 13:50:50",
            updated_at: "2018-09-09 13:50:50",
            pid: 0,
            name: "钟点/家庭保洁服务"
        }, 
		...
   ]
}
```