|
6 år sedan | |
---|---|---|
.. | ||
app | 6 år sedan | |
bootstrap | 7 år sedan | |
config | 7 år sedan | |
database | 7 år sedan | |
public | 7 år sedan | |
resources | 7 år sedan | |
routes | 6 år sedan | |
storage | 7 år sedan | |
tests | 7 år sedan | |
.env.example | 7 år sedan | |
.gitattributes | 7 år sedan | |
.gitignore | 7 år sedan | |
artisan | 7 år sedan | |
composer.json | 7 år sedan | |
composer.lock | 7 år sedan | |
package.json | 7 år sedan | |
phpunit.xml | 7 år sedan | |
readme.md | 6 år sedan | |
server.php | 7 år sedan | |
webpack.mix.js | 7 år sedan |
POST /upload
参数 | 类型 | 可选 | 备注 |
---|---|---|---|
photo | png/jpeg | 必须 | 图片 |
{
"status": 0,
"path": "/path/photo.jpeg"
}
{
"status": -1,
"message": "error, photo is valid"
}
{
"status": -2,
"message": "error, error message"
}
POST /campaign/store
参数 | 类型 | 可选 | 备注 |
---|---|---|---|
id | integer | 创建时空,修改时必须 | 活动id |
title | string | 必须 | 标题 |
content | string | 必须 | 内容 |
status | integer | 可选,默认0 | 活动状态:0.进行中, 1.结束 |
{
"status": 0,
"message": "保存成功"
}
{
"status": -1,
"message": "信息不能为空!"
}
DELETE /campaign/delete/${id}
参数:无
响应:
{
"status": 0,
"message": "删除成功"
}
{
"status": -1,
"message": "id不能为空!"
}
GET /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 /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"
},{
"id": 34578,
"title": "测试标题2",
"content": "测试内容2",
"status": 1,
"created_at": "2018-02-16 11:10:56",
"updated_at": "2018-02-16 12:00:51"
},
...
]
}
POST /product/store
参数 | 类型 | 可选 | 备注 |
---|---|---|---|
id | integer | 创建时空,修改时必须 | 产品id |
name | string | 必须 | 产品名称 |
info | string | 必须 | 产品信息 |
color | string | 必须 | 产品款色 |
price | double | 必须 | 产品价格 |
classify | string | 必须 | 产品分类 |
status | integer | 可选,默认0 | 产品状态:0.上架, 1.下架 |
{
"status": 0,
"message": "保存成功"
}
{
"status": -1,
"message": "信息不能为空!"
}
DELETE /product/delete/${id}
参数:无
响应:
{
"status": 0,
"message": "删除成功"
}
{
"status": -1,
"message": "id不能为空!"
}
GET /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"
}
}
GET /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,
"name": "测试名称",
"info": "测试信息",
"price": 1234.31,
"classify": "分类1",
"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"
}, {
"id": 123456,
"name": "测试名称",
"info": "测试信息",
"price": 1234.31,
"classify": "分类1",
"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 /house_clean/store
参数 | 类型 | 可选 | 备注 |
---|---|---|---|
id | integer | 创建时空,修改时必须 | 产品id |
code | string | 必须 | 小程序code |
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 | 可选 | 图片链接 |