参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
except_daily | 否 | int | 是否排除日常步数的数据 |
{
"target": { // 当前设置的运动目标,新需求的达成为动态判断(修改当前目标会影响以前是否达标),所以是否达标由前端根据该数据算
"duration": 1200,
"duration_minute": 20
}
}
请求URL
exerRecord/history
参数
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
year | 是 | int | 年份如 2022 |
返回示例
{
"result": 1,
"code": 0,
"msg": "成功",
"data": [
{
"year": 2022, // 年份
"data": [[1,2,3,30],[],[],[],[],[],[],[],[],[],[],[]], // 月份以及有运动的日,例如 2022 年的 1 月 1、2、3、30 日有运动(显示红点)
}...
]
}
请求URL
exerRecord/listOneDay
参数
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
date | 是 | date | 日期 如 2020-01-01 |
返回示例
{
"result":1,
"code":0,
"msg":"成功",
"data":{
"records":[
{
"id": 217,
"user_id": 1,
"type": "game",
"record_id": 217,
"consume": 9,
"duration": 293,
"step": 478,
"distance": 143,
"crouch": 60,
"jump": 42,
"step_rate": "97.9",
"created_at": "2021-03-20 14:17:31",
"jump_rate": 8,
"crouch_rate": 12,
"met": 3,
"weight": 60
}
],
"sum":{
"id": 29,
"user_id": 1,
"consume": 1070,
"consume_game": 92,
"consume_jog": 978,
"duration": 9990,
"duration_game": 2944,
"duration_jog": 7046,
"step": 33873,
"step_game": 4900,
"step_jog": 27936,
"step_daily": 1037,
"distance": 16603,
"distance_game": 2254,
"distance_jog": 13968,
"distance_daily": 381,
"times": 16,
"times_game": 14,
"times_jog": 2,
"crouch": 665,
"jump": 725,
"created_at": "2021-03-20",
"jump_rate": 4,
"crouch_rate": 3,
"step_rate": 197.2,
"step_rate_game": 99.9,
"step_rate_jog": 237.9,
},
"avg": {
"met": 3
}
}
}
请求URL
exerRecord/listByDay
参数
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
begin | 是 | date | 开始日期 如 2020-01-01 |
end | 是 | date | 结束日期 如 2020-01-01 |
返回示例
{
"result":1,
"code":0,
"msg":"成功",
"data":{
"records":[
{
"id": 25,
"user_id": 1,
"consume": 700,
"consume_game": 52,
"consume_jog": 648,
"duration": 5879,
"duration_game": 1702,
"duration_jog": 4177,
"step": 23091,
"step_game": 2967,
"step_jog": 18516,
"step_daily": 1608,
"distance": 11200,
"distance_game": 1392,
"distance_jog": 9258,
"distance_daily": 550,
"times": 8,
"times_game": 7,
"times_jog": 1,
"crouch": 320,
"jump": 457,
"created_at": "2021-03-16",
"jump_rate": 4,
"crouch_rate": 3,
"step_rate": 219.3,
"step_rate_game": 104.6,
"step_rate_jog": 266,
"met": 3
}
],
"sum":{
"duration": 15109,
"duration_game": 5252,
"duration_jog": 9857,
"consume": 1636,
"consume_game": 160,
"consume_jog": 1476,
"times": 27,
"times_game": 24,
"times_jog": 3,
"step": 54907,
"step_game": 8631,
"step_jog": 42188,
"distance": 26749,
"distance_game": 3930,
"distance_jog": 21094,
"distance_daily": 1725,
"jump": 1238,
"crouch": 1130,
"jump_rate": 14,
"crouch_rate": 12
},
"avg": {
"duration": 5036,
"duration_game": 1750,
"duration_jog": 3285,
"consume": 545,
"consume_game": 53,
"consume_jog": 492,
"times": 9,
"times_game": 8,
"times_jog": 1,
"step": 18302,
"step_game": 2877,
"step_jog": 14062,
"step_daily": 0,
"distance": 8916,
"distance_game": 1310,
"distance_jog": 7031,
"distance_daily": 575,
"jump": 412,
"crouch": 376,
"met": 3,
}
}
}
请求URL
exerRecord/listByMonth
参数
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
year | 是 | int | 年份 如 2020 |
返回示例
{
"result":1,
"code":0,
"msg":"成功",
"data":{
"records":[
{
"id": 1,
"user_id": 1,
"consume": 3630,
"consume_game": 463,
"consume_jog": 3167,
"duration": 38946,
"duration_game": 14851,
"duration_jog": 24095,
"step": 123081,
"step_game": 23977,
"step_jog": 90462,
"step_daily": 8642,
"distance": 61264,
"distance_game": 12006,
"distance_jog": 45231,
"distance_daily": 4027,
"times": 81,
"times_game": 72,
"times_jog": 9,
"jump": 3227,
"crouch": 3589,
"year": 2021,
"month": 2,
"jump_rate": 4,
"crouch_rate": 5,
"step_rate": 176.3,
"step_rate_game": 96.9,
"step_rate_jog": 225.3
}
],
"sum":{
"duration": 126199,
"duration_game": 47731,
"duration_jog": 78468,
"consume": 12389,
"consume_game": 1476,
"consume_jog": 10913,
"times": 260,
"times_game": 230,
"times_jog": 30,
"step": 420261,
"step_game": 77673,
"step_jog": 311796,
"distance": 207992,
"distance_game": 38798,
"distance_jog": 155898,
"distance_daily": 13296,
"jump": 11280,
"crouch": 10993,
"jump_rate": 14,
"crouch_rate": 13
},
"avg": {
"duration": 4351,
"duration_game": 1645,
"duration_jog": 2705,
"consume": 427,
"consume_game": 50,
"consume_jog": 376,
"times": 8,
"times_game": 7,
"times_jog": 1,
"step": 14491,
"step_game": 2678,
"step_jog": 10751,
"step_daily": 0,
"distance": 7172,
"distance_game": 1337,
"distance_jog": 5375,
"distance_daily": 458,
"jump": 388,
"crouch": 379
}
},
"target_finish": [23,19,19,19,2,5,5,2,1,2,0,1], // 从 1 到 12 月每月完成目标的天数
"exer_day": [23,19,19,19,2,13,6,8,9,10,7,5], // 从 1 到 12 月每月有运动的天数
"exer_day_total": 140 // 今年总运动天数
}
请求URL
sportRecord/listByYear
参数
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
begin | 是 | int | 开始年份 如 2020 |
end | 是 | int | 结束年份 如 2021 |
返回示例
{
"result":1,
"code":0,
"msg":"成功",
"data":{
"records":[
{
"year": 2021,
"duration": 126199,
"duration_game": 47731,
"duration_jog": 78468,
"consume": 12389,
"consume_game": 1476,
"consume_duration": 0,
"times": 260,
"times_game": 230,
"times_jog": 30,
"step": 420261,
"step_game": 77673,
"step_jog": 311796,
"step_daily": 30792,
"distance": 207992,
"distance_game": 38798,
"distance_jog": 155898,
"distance_daily": 13296,
"crouch": 10993,
"jump": 11280
}
],
"sum":{
"duration": 126199,
"duration_game": 47731,
"duration_jog": 78468,
"consume": 12389,
"consume_game": 1476,
"consume_jog": 0,
"times": 260,
"times_game": 230,
"times_jog": 30,
"step": 420261,
"step_game": 77673,
"step_jog": 311796,
"distance": 207992,
"distance_game": 38798,
"distance_jog": 155898,
"distance_daily": 13296,
"jump": 11280,
"crouch": 10993,
"jump_rate": 14,
"crouch_rate": 13
},
"avg": {
"duration": 4351,
"duration_game": 1645,
"duration_jog": 2705,
"consume": 427,
"consume_game": 50,
"consume_jog": 0,
"times": 8,
"times_game": 7,
"times_jog": 1,
"step": 14491,
"step_game": 2678,
"step_jog": 10751,
"step_daily": 0,
"distance": 7172,
"distance_game": 1337,
"distance_jog": 5375,
"distance_daily": 458,
"jump": 388,
"crouch": 379
}
}
}