#### 列表
~~~[api]
get:/football/backend/index
number:p=1#当前页数
number:ps=20#分页大小
<<<
success
{
"message": "success",
"code": 1,
"data": [
{
"id": "8",
"match_name": "四国赛",
"match_address": "四国赛",
"host_team": "比利时女足U16",
"guest_team": "瑞士U16",
"host_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"guest_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"host_concede": "0",
"guest_concede": "0",
"first_half_host_score": "0",
"first_half_guest_score": "0",
"host_score": "0",
"guest_score": "0",
"stage": "0",
"sort": "0",
"is_online": "0",
"is_hot": "0",
"is_settle": "0",
"status": "10",
"created_at": "1526372717",
"updated_at": "1526372717",
"start_at": "1526378400",
"awards": [
{
"id": "97",
"football_id": "8",
"type": "1",
"mode": "1",
"value": "1",
"odds": "1.1",
"sort": "1",
"is_starting": "0",
"status": "10",
"created_at": "1526372717",
"updated_at": "1526372717"
}
]
}
],
"_meta": {
"totalCount": 1,
"pageCount": 1,
"currentPage": 1,
"perPage": 20
}
}
~~~
#### 详情
~~~[api]
get:/football/backend/retrieve
*number:id#主键
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": "6",
"match_name": "四国赛",
"match_address": "四国赛",
"host_team": "比利时女足U16",
"guest_team": "瑞士U16",
"host_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"guest_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"host_concede": "0",
"guest_concede": "0",
"first_half_host_score": "0",
"first_half_guest_score": "0",
"host_score": "0",
"guest_score": "0",
"stage": "0",
"sort": "0",
"is_online": "0",
"is_hot": "0",
"is_settle": "0",
"status": "10",
"created_at": "1526372197",
"updated_at": "1526372197",
"start_at": "1526378400",
"awards": [
{
"id": "33",
"football_id": "6",
"type": "1",
"mode": "1",
"value": "1",
"odds": "1.1",
"sort": "1",
"is_starting": "0",
"status": "10",
"created_at": "1526372197",
"updated_at": "1526372197"
}
]
}
}
<<<
error
{
"message": "无数据",
"code": 0,
"data": []
}
~~~
#### 创建
~~~[api]
post:/football/backend/create
*string:match_name#赛事名称
*string:match_address#赛事地址
*string:host_team#主队
*string:guest_team#客队
string:host_icon#主队图标
string:guest_icon#客队图标
float:host_concede#主队让球
float:guest_concede#客队让球
number:first_half_host_score#上半场主队得分
number:first_half_guest_score#上半场客队得分
number:host_score#主队得分
number:guest_score#客队得分
number:stage#阶段,0=>未开场,1=>上半场,2=>下半场,3=>已完场
number:sort#排序
number:is_hot#是否热门
number:is_online#是否上线
number:is_settle#是否结算
number:status#状态,10=>未开场,9=>进行中,0=>已完场
*number:start_at#开始时间
<<<
success
{
"message": "success",
"code": 1,
"data": {
"match_name": "四国赛",
"match_address": "四国赛",
"host_team": "比利时女足U16",
"guest_team": "瑞士U16",
"start_at": "1526378400",
"status": 10,
"created_at": 1526356726,
"updated_at": 1526356726,
"id": 4
}
}
<<<
error
{
"message": "开始时间 cannot be blank.",
"code": 0,
"data": []
}
~~~
#### 编辑
~~~[api]
post:/football/backend/update?id=:id
string:match_name#赛事名称
string:match_address#赛事地址
string:host_team#主队
string:guest_team#客队
string:host_icon#主队图标
string:guest_icon#客队图标
float:host_concede#主队让球
float:guest_concede#客队让球
number:first_half_host_score#上半场主队得分
number:first_half_guest_score#上半场客队得分
number:host_score#主队得分
number:guest_score#客队得分
number:stage#阶段,0=>未开场,1=>上半场,2=>下半场,3=>已完场
number:sort#排序
number:is_hot#是否热门
number:is_online#是否上线
number:is_settle#是否结算
number:status#状态,10=>未开场,9=>进行中,0=>已完场
number:start_at#开始时间
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 4,
"match_name": "四国赛2",
"match_address": "四国赛",
"host_team": "比利时女足U16",
"guest_team": "瑞士U16",
"host_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"guest_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"host_concede": 0,
"guest_concede": 0,
"first_half_host_score": 0,
"first_half_guest_score": 0,
"host_score": 0,
"guest_score": 0,
"stage": 0,
"sort": 0,
"is_online": 1,
"is_hot": 0,
"is_settle": 0,
"status": 10,
"created_at": 1526356726,
"updated_at": 1526356789,
"start_at": 1526378400
}
}
~~~
#### 删除
~~~[api]
post:/football/backend/delete?id=1
*string:id=默认值#说明文字
name#说明文字
<<<
success
{
"message": "success",
"code": 1,
"data": []
}
<<<
error
{
"message": "赛事已上线",
"code": 0,
"data": []
}
~~~
#### 创建投注项
~~~[api]
post:/football/backend/create-award
*number:football_id#赛事ID
*number:type#类型,1=>胜负,2=>大小球,3=>进球,4=>比分
*number:mode#模式,1=>全场胜平负,2=>让球胜负,3=>上半场胜平负,4=>大小球,5=>是否进球,6=>总进球,7=>下一个进球球队,8=>下一个进球时间(分钟),9=>全场比分
*string:value#中奖值
*string:odds#赔率
number:sort=0#排序
number:is_starting=0#是否开始
<<<
success
{
"message": "success",
"code": 1,
"data": {
"football_id": "9",
"type": "1",
"mode": "1",
"value": "1",
"odds": "1",
"status": 10,
"created_at": 1526465849,
"updated_at": 1526465849,
"id": 169
}
}
~~~
#### 编辑投注项
> 更新某一个投注项,把之前的状态改为禁用,再创建一条记录
~~~[api]
post:/football/backend/update-award?id=:id
number:type#类型,1=>胜负,2=>大小球,3=>进球,4=>比分
number:mode#模式,1=>全场胜平负,2=>让球胜负,3=>上半场胜平负,4=>大小球,5=>是否进球,6=>总进球,7=>下一个进球球队,8=>下一个进球时间(分钟),9=>全场比分
string:value#中奖值
string:odds#赔率
number:sort=0#排序
number:is_starting=0#是否开始
<<<
success
{
"message": "success",
"code": 1,
"data": {
"football_id": 6,
"type": 1,
"mode": 1,
"value": "1",
"odds": "1111",
"sort": "1000",
"is_starting": 0,
"status": 10,
"created_at": 1526463655,
"updated_at": 1526463655,
"id": 166
}
}
<<<
error
{
"message": "无数据",
"code": 0,
"data": []
}
~~~
#### 禁用奖项
~~~[api]
post:/football/backend/disable-award?id=:id
<<<
success
{
"message": "success",
"code": 1,
"data": []
]
<<<
error
{
"message": "无数据",
"code": 0,
"data": []
}
~~~
#### 开始赛事
~~~[api]
post:/football/backend/start?id=:id
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 1,
"match_name": "National League 2",
"match_address": "Martvili, 格鲁吉亚",
"host_team": "马尔特维利",
"guest_team": "FC Tskhinvali",
"host_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"guest_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"host_concede": -0.5,
"guset_concede": 0.5,
"first_half_host_score": 10,
"first_half_guest_score": 8,
"host_score": 12,
"guest_score": 30,
"stage": 1,
"sort": 0,
"is_online": 1,
"is_hot": 0,
"status": 9,
"created_at": 1524733200,
"updated_at": 1526028939,
"start_at": 1524733200
}
}
<<<
error
{
"message": "赛事阶段错误",
"code": 0,
"data": []
}
~~~
#### 更新比分
~~~[api]
post:/football/backend/update-score?id=:id
*number:team=1#队伍,1=>主队,2=>客队
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 1,
"match_name": "National League 2",
"match_address": "Martvili, 格鲁吉亚",
"host_team": "马尔特维利",
"guest_team": "FC Tskhinvali",
"host_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"guest_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"host_concede": -0.5,
"guset_concede": 0.5,
"first_half_host_score": 10,
"first_half_guest_score": 8,
"host_score": 12,
"guest_score": 30,
"stage": 2,
"sort": 0,
"is_online": 1,
"is_hot": 0,
"status": 9,
"created_at": 1524733200,
"updated_at": 1526028939,
"start_at": 1524733200
}
}
~~~
#### 结束上半场赛事
~~~[api]
post:/football/backend/end-first-half?id=:id
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 1,
"match_name": "National League 2",
"match_address": "Martvili, 格鲁吉亚",
"host_team": "马尔特维利",
"guest_team": "FC Tskhinvali",
"host_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"guest_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"host_concede": -0.5,
"guset_concede": 0.5,
"first_half_host_score": 10,
"first_half_guest_score": 8,
"host_score": 13,
"guest_score": 31,
"stage": 2,
"sort": 0,
"is_online": 1,
"is_hot": 0,
"status": 9,
"created_at": 1524733200,
"updated_at": 1526116118,
"start_at": 1524733200
}
}
<<<
error
{
"message": "赛事阶段错误",
"code": 0,
"data": []
}
~~~
#### 结束赛事
~~~[api]
post:/football/backend/end-match?id=:id
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 1,
"match_name": "National League 2",
"match_address": "Martvili, 格鲁吉亚",
"host_team": "马尔特维利",
"guest_team": "FC Tskhinvali",
"host_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"guest_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"host_concede": -0.5,
"guest_concede": 0,
"first_half_host_score": 1,
"first_half_guest_score": 0,
"host_score": 1,
"guest_score": 0,
"stage": 3,
"sort": 0,
"is_online": 1,
"is_hot": 0,
"is_settle": 1,
"status": 0,
"created_at": 1524733200,
"updated_at": 1526365989,
"start_at": 1524733200
}
}
<<<
error
{
"message": "赛事阶段错误",
"code": 0,
"data": []
}
~~~
#### 结算
~~~[api]
post:/football/backend/settle?id=:id
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 1,
"match_name": "National League 2",
"match_address": "Martvili, 格鲁吉亚",
"host_team": "马尔特维利",
"guest_team": "FC Tskhinvali",
"host_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"guest_icon": "http://91alice.oss-cn-shenzhen.aliyuncs.com/static/img/no-image.png",
"host_concede": -0.5,
"guest_concede": 0,
"first_half_host_score": 1,
"first_half_guest_score": 0,
"host_score": 1,
"guest_score": 0,
"stage": 3,
"sort": 0,
"is_online": 1,
"is_hot": 0,
"is_settle": 1,
"status": 0,
"created_at": 1524733200,
"updated_at": 1526366005,
"start_at": 1524733200
}
}
<<<
error
{
"message": "赛事阶段错误",
"code": 0,
"data": []
}
~~~