[关闭]
@sewise-dev 2019-04-17T02:23:52.000000Z 字数 8005 阅读 532

飞派学院web管理端接口文档

飞派


更新历史

编号 版本 说明 作者 日期
1 v1.0 1.创建文档 Seven 2019-04-16


目录


【备注】

1. 全局返回码说明

每次调用接口时,可能获得正确或错误的返回码,开发者可以根据返回码信息调试接口,排查错误。

返回码 说明
-1 系统繁忙,此时请开发者稍候再试
0 请求失败
1 请求成功
200 响应成功
403 禁止访问
404 异常错误
500 数据验证错误
40001 不合法的凭证,或者access_token无效。
40004 不合法请求

HTTP请求状态返回格式

返回字段 字段类型 说明
status Integer 请求返回码(详细请见状态表)
message String 返回描述
data Array 返回结果

错误样例
{
"status": 40013,
"message": {"0":"invalid appid"}
}
成功样例
{
"status": 200,
"data": {"access_token":"ACCESS_TOKEN","expires_in":7200}
}


1.赛事

1.1 统计概括

接口地址

/v1/matchWeb/statistics

HTTP Content-Type / 请求方式

application/json
GET

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/statistics
Response
{
"status": 200,
"data": {
"playersCount": 0,
"refereesCount": 0,
"todayCount": 0,
"signOutCount": 0
}
}

1.2 保存/编辑赛事

接口地址

/v1/matchWeb/save

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mchId Integer 赛事索引id(编辑时必传)
mchName String 赛事名称
startDate String 赛事开始时间
endDate String 赛事结束时间
cover String 封面
place String 比赛地点
introduce String 赛事介绍
schedule String 赛事日程
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/save
Response
{
"status": 200,
"message": "操作成功",
"data": []
}

1.3 赛事列表

接口地址

/v1/matchWeb/list

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
page Integer 页数
pageSize Integer 页码
order String 排序mchId DESC
q String 搜索关键词
startDate String 开始时间
endDate String 开始时间
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/list
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": 1,
"pagesize": 20,
"total_record": 2,
"record": [
{
"mchId": "2",
"mchName": "2019全国青少年无人机大赛2222",
"cover": "http://www.taobao.com/132323/231111111111111111111141.jpg",
"place": "深圳湾体育中心2",
"startDate": "2019-04-16 10:59:12",
"endDate": "2019-04-22 10:59:22",
"playersCount": 0,
"refereesCount": 0
},
{
"mchId": "1",
"mchName": "2019全国青少年无人机大赛",
"cover": "http://www.taobao.com/132323/2341.jpg",
"place": "深圳湾体育中心",
"startDate": "2019-04-16 10:59:12",
"endDate": "2019-04-22 10:59:22",
"playersCount": 0,
"refereesCount": 0
}
]
}
}

1.4 赛事详情

接口地址

/v1/matchWeb/info/{mchId}

HTTP Content-Type / 请求方式

application/json
GET

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mchId Integer 赛事索引id
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/info/2
Response
{
"status": 200,
"data": {
"mchId": "2",
"mchName": "2019全国青少年无人机大赛2222",
"cover": "http://www.taobao.com/132323/231111111111111111111141.jpg",
"place": "深圳湾体育中心2",
"startDate": "2019-04-16 10:59:12",
"endDate": "2019-04-22 10:59:22",
"introduce": "2222222

的世纪东方我单开放假是11111111111111111111111111111111111111111111两地分居哦是我介绍的飞机熬时间的会计师的分类铠甲书

",
"schedule": "22222222lio90w等死蜗牛的司法局《

232isd9fsdfij束带结发是李方军

"
}
}

1.5 删除赛事

接口地址

/v1/matchWeb/delete/{mchId}

HTTP Content-Type / 请求方式

application/json
GET

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mchId Integer 赛事索引id
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchWeb/delete/2
Response
{
"status": 200,
"message": "操作成功"
}

1.6 保存/编辑项目

接口地址

/v1/matchEventWeb/save

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mcheId Integer 项目索引id(编辑时必传)
mchId Integer 赛事索引id
mcheName String 项目名称
startTime String 开赛时间
registerFee String 报名费
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchEventWeb/save
Response
{
"status": 200,
"message": "操作成功",
"data": []
}

1.7 项目列表

接口地址

/v1/matchEventWeb/list

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mchId Integer 赛事索引id
q String 搜索关键词
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchEventWeb/list
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": 1,
"pagesize": 20,
"total_record": 2,
"record": [
{
"mcheId": "2",
"mcheName": "飞翼花式三角绕标赛",
"registerFee": "65.00",
"startTime": "2019-04-16 15:16:09",
"playerCount": 0,
"boysCount": 0,
"girlsCount": 0
},
{
"mcheId": "1",
"mcheName": "悬浮纸飞机绕标挑战赛",
"registerFee": "50.00",
"startTime": "2019-04-16 15:14:02",
"playerCount": 0,
"boysCount": 0,
"girlsCount": 0
}
]
}
}

1.8 项目详情

接口地址

/v1/matchEventWeb/info/{mcheId}

HTTP Content-Type / 请求方式

application/json
GET

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mcheId Integer 项目索引id
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchEventWeb/info/2
Response
{
"status": 200,
"data": {
"mcheId": "2",
"mchId": "1",
"mcheName": "飞翼花式三角绕标赛",
"registerFee": "65.00",
"startTime": "2019-04-16 15:16:09"
}
}

1.9 删除项目

接口地址

/v1/matchEventWeb/delete/{mcheId}

HTTP Content-Type / 请求方式

application/json
GET

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mcheId Integer 项目索引id
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/matchEventWeb/delete/2
Response
{
"status": 200,
"message": "操作成功"
}

2.选手/裁判

2.1 搜索用户

接口地址

/v1/refereeWeb/search

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
q Integer 搜索关键词
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/refereeWeb/search
Response
{
"status": 200,
"data": [
{
"userId": "2199",
"username": "13715234552",
"trueName": "呵呵"
}
]
}

2.2 保存/编辑(选手/裁判)

接口地址

/v1/refereeWeb/save/{role}

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
role Integer 角色:1.选手 2.裁判
mchId Integer 赛事索引id
mcheId Integer 项目索引id
uId Integer 裁判userId
sex Integer 性别:0.男 1.女
birthday String 生日(2019-04-16)
unit String 所属单位
mcheyId String 参赛索引id(编辑时必传)
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/refereeWeb/save
Response
{
"status": 200,
"message": "操作成功"
}

2.3 (选手/裁判)列表

接口地址

/v1/refereeWeb/list/{role}

HTTP Content-Type / 请求方式

application/json
POST

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
role Integer 角色:1.选手 2.裁判
page Integer 页数
pageSize Integer 页码
order String 排序mcheyId DESC
q String 搜索关键词
startDate String 开始时间
endDate String 结束时间
mchId Integer 赛事索引id
mcheId Integer 项目索引id
sex Integer 性别:0.男 1.女
age Integer 年龄
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/refereeWeb/list/2
Response
{
"status": 200,
"data": {
"total_page": 1,
"page": 1,
"pagesize": 20,
"total_record": 1,
"record": [
{
"mcheyId": "4",
"userId": "2155",
"username": "18807531020",
"fullname": "18807531020",
"role": "2",
"sex": "0",
"mobile": "18888888888",
"birthday": "1989-04-16 00:00:00",
"age": "30",
"unit": "深圳中学",
"mchId": "1",
"mchName": "2019全国青少年无人机大赛",
"mcheId": "3",
"mcheName": "飞翼花式三角绕标赛",
"creationDate": "2019-04-16 18:11:28"
}
]
}
}

2.4 删除(选手/裁判)

接口地址

/v1/refereeWeb/delete/{mcheyId}

HTTP Content-Type / 请求方式

application/json
GET

请求参数
参数 必选 类型 说明
RequestBody
access_token String 用户授权签名
mcheyId Integer 报名索引id
HTTP 响应状态

200

返回字段 字段类型 说明
status int 返回状态码
message String 返回错误信息
data Array 返回结果
接口示例

Request
curl -X GET -H "Content-Type:application/json" -d http://api.xxx.com/v1/refereeWeb/delete/2
Response
{
"status": 200,
"message": "操作成功"
}

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注