数据统计.md 3.8 KB

按天

jog/listByDay

参数 类型 必须 备注
begin string 开始日期 例如 2021-01-01
end string 结束日期 例如 2021-01-01
{
    "result":1,
    "code":0,
    "msg":"成功",
    "data":{
        "records":[
            {
                "distance":9926,
                "created_at":"2021-03-11"
            }
        ],
        "sum":{
            "distance":49999,
            "duration":23804,
            "times":9,
            "consume_avg":388.9,
            "km_duration_avg":450,
            "step_rate_avg":270,
            "step_distance_avg":0.5,
			"met": 3
        },
        "best":{
            "distance":{
                "id":101,
                "created_at":"2021-03-17 07:27:38",
                "value":10763
            },
            "duration":{
                "id":101,
                "created_at":"2021-03-17 07:27:38",
                "value":5258
            },
            "km_duration":{
                "id":93,
                "value":347,
                "created_at":"2021-03-15 05:08:32"
            },
            "km_duration_list":[
                {
                    "id":85,
                    "created_at":"2021-03-13 02:35:06",
                    "distance":1000,
                    "duration":376
                }
            ]
        }
    }
}

按月

jog/listByMonth

参数 类型 必须 备注
year int 年份
{
    "result":1,
    "code":0,
    "msg":"成功",
    "data":{
        "records":[
            {
                "distance":45231,
                "month":2
            }
        ],
        "sum":{
            "distance":155898,
            "duration":78468,
            "times":30,
            "consume_avg":5456.5,
            "km_duration_avg":511,
            "step_rate_avg":234,
            "step_distance_avg":0.5,
			"met": 3
        },
        "best":{
            "distance":{
                "id":19,
                "value":10834,
                "created_at":"2021-03-08 16:31:02"
            },
            "duration":{
                "id":2,
                "value":5812,
                "created_at":"2021-02-20 05:36:52"
            },
            "km_duration":{
                "id":21,
                "value":321,
                "created_at":"2021-03-04 06:06:39"
            },
            "km_duration_list":[
                {
                    "id":1,
                    "created_at":"2021-02-27 09:18:00",
                    "distance":1000,
                    "duration":367
                }
            ]
        }
    }
}

按年

jog/listByYear

{
    "result":1,
    "code":0,
    "msg":"成功",
    "data":{
        "records":[
            {
                "year":2021,
                "distance":155898
            }
        ],
        "sum":{
            "distance":155898,
            "duration":78468,
            "times":30,
            "consume_avg":10913,
            "km_duration_avg":503,
            "step_rate_avg":238,
            "step_distance_avg":0.5,
			"met": 3
        },
        "best":{
            "distance":{
                "id":19,
                "value":10834,
                "created_at":"2021-03-08 16:31:02"
            },
            "duration":{
                "id":2,
                "value":5812,
                "created_at":"2021-02-20 05:36:52"
            },
            "km_duration":{
                "id":21,
                "value":321,
                "created_at":"2021-03-04 06:06:39"
            },
            "km_duration_list":[
                {
                    "id":1,
                    "created_at":"2021-02-27 09:18:00",
                    "distance":1000,
                    "duration":367
                }
            ]
        }
    }
}