V5.0

1. 修改记录

版本号 日期 操作 作者 描述

V3.0

2021-10-15

C

zk

整合原平台和海外版平台

V3.1

2021-10-20

AM

zk

新增了4.5部分接口

V3.2

2021-10-28

AM

zk

修改bug;勋章/计划/课程都加入英文字段;排名机上所有运动累计排名

V3.3

2021-11-25

AM

zk

修改bug;新增接口4.5.11/4.5.13

V3.4

2021-12-9

AM

zk

修改bug;新增接口4.8.9

V3.5

2022-3-7

AM

zk

新增扫码登录模块3.9

V3.6

2022-3-9

AM

zk

新增扫码小程序扫码登录接口

V3.7

2022-4-29

AM

zk

新增跳绳最大频率字段;上传单车运动记录 新增加一个最大功率字段;单车程序模式key改为:1-阻力 2-坡度

V3.8

2022-5-6

AM

zk

修改微信扫码登录模块

V3.9

2022-5-7

AM

zk

修改程序模式部分接口4.2.2

V4.0

2022-8-18

AM

zk

新增接口4.7.5. 上传拉绳运动记录

V4.1

2022-9-21

AM

zk

新增接口4.6.6.上报设备信息

V4.2

2022-9-29

AM

zk

新增接口4.5.14.用户注销

V4.3

2022-10-21

AM

zk

修改接口3.9.3,3.9.4门闸、储物柜通过mqtt返回登录信息;
新增模块5.5. 储物柜模块;新增接口5.1.2. 人脸登录v4,进行运营商用户授权

V4.4

2022-10-31

AM

zk

新增4.6.7. 查询所属运营商的手机号,新增4.17. 短信模块

V4.5

2023-04-21

AM

zk

新增6. 按运营商排序新增接口模块,涉及APP端部分接口,

V4.6

2023-04-24

AM

zk

新增6.3 新版活动模块

V4.7

2023-05-30

AM

zk

新增7.竞技模块;新增运动类型(划船器)

V4.8

2023-9-18

AM

zk

修改跑步实时排名逻辑,新增接口3.4.13获得排行榜中临近的实时排名信息

V4.9

2023-12-19

AM

zk

新增8. 共享跑步机模块

V5.0

2024-3-22

AM

zk

新增5.6 高德地图模块

2. 概要

本文是大葱康健平台系统接口说明文档,所有接口都是RESTFul风格的API,接口说明包括:请求方式、请求地址、请求参数说明和响应消息等。
说明:跑跑步机不再实时上报运动数据,运动完成再上报运动数据,并且跑步低于30s不上报。
除登录接口外,所有接口必须在header中传入token,格式为:(XHareToken:tokenStr),系统暂时设置token超时时间为3小时,
如果token到期前1小时还有http请求,将在HttpResponse的header中下发新的token,格式也是:(XHareToken:tokenStr)。
新测试环境ip: 139.9.148.114,端口:8091

运动类型说明:

运动类型 编号

跑步

1

力量训练

2

单车

3

跳绳

4

拉绳

5

椭圆机

6

划船

7

楼梯机

8

储物柜

21

闸机

22

3. 跑步机模块

3.1. 微信相关模块

3.1.1. 获取微信登录二维码

curl请求
$ curl 'https://iot.daconghealth.com/api/wechat/qrCode/1865714D268F' -i -X GET
http请求
GET /api/wechat/qrCode/1865714D268F HTTP/1.1
Host: iot.daconghealth.com
path参数
Table 1. /api/wechat/qrCode/{mac}
Parameter Description

mac

终端MAC地址,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 365

{"code":80001,"message":"寰俊鍏紬骞冲彴寮傚父","data":"閿欒浠g爜锛�40164, 閿欒淇℃伅锛歩nvalid ip 139.205.166.163 ipv6 ::ffff:139.205.166.163, not in whitelist rid: 66c2e7a0-3bcee81c-6e817816锛屽井淇″師濮嬫姤鏂囷細{\"errcode\":40164,\"errmsg\":\"invalid ip 139.205.166.163 ipv6 ::ffff:139.205.166.163, not in whitelist rid: 66c2e7a0-3bcee81c-6e817816\"}"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

String

二维码地址

3.2. Socket服务模块

Socket服务模块相关的接口。

3.2.1. 获得Socket服务信息

curl请求
$ curl 'https://iot.daconghealth.com/api/access/socket' -i -X GET \
    -H 'Authorization: Basic:MTMyMzA0OTc6ZFRpM3hZN0RnTnY5TXl5RQ=='
http请求
GET /api/access/socket HTTP/1.1
Authorization: Basic:MTMyMzA0OTc6ZFRpM3hZN0RnTnY5TXl5RQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 178

{"code":10000,"message":"success","data":{"host":"tcp://192.168.16.62:1883","username":"zk","password":"ZK517kun","qos":1,"token":"BGbZKeK6lpCZM1JLrd4z3BJimx+UXL5XkdBBKIGIlXg="}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.host

String

域名

data.username

String

用户名

data.password

String

用户密码

data.qos

String

服务质量

data.token

String

socket连接token

3.3. 用户相关接口

3.3.1. 修改用户

curl请求
$ curl 'https://iot.daconghealth.com/api/users' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGZTJuYmZwRXBkeXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"birthday":"1980-12-31 00:00:00","bloodPressure":"120","country":"游仙","gender":1,"avatarUrl":"http://xxx.xxx","city":"绵阳","mobile":"18099996666","weight":"130","faceId":"2222aaaaaaaa","extend":"{}","realName":"张三","bodyFat":"20","heartRate":"80","province":"四川","grade":3,"height":"180"}'
http请求
PUT /api/users HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGZTJuYmZwRXBkeXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 304
Host: iot.daconghealth.com

{"birthday":"1980-12-31 00:00:00","bloodPressure":"120","country":"游仙","gender":1,"avatarUrl":"http://xxx.xxx","city":"绵阳","mobile":"18099996666","weight":"130","faceId":"2222aaaaaaaa","extend":"{}","realName":"张三","bodyFat":"20","heartRate":"80","province":"四川","grade":3,"height":"180"}
请求字段说明
Path Type Description

avatarUrl

String

头像URL,可以为空

gender

Integer

1:男性,2:女性,0:未知,可以为空

city

String

所在城市,可以为空

province

String

所在省份,可以为空

country

String

所在国家,可以为空

birthday

Date

出身日期,可以为空

height

Integer

身高,可以为空

weight

Integer

体重,可以为空

heartRate

Integer

心率,可以为空

grade

Integer

用户等级,0:青铜,1:白银,2:黄金,3:钻石,4:王者,可以为空

faceId

String

百度人脸ID,可以为空

extend

String

扩展字段,可以为空

realName

String

姓名,可以为空

mobile

String

电话号码,可以为空

bodyFat

Integer

体脂,百分数整数部分,可以为空

bloodPressure

Integer

血压,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

3.3.2. 退出登录

curl请求
$ curl 'https://iot.daconghealth.com/api/users/logout/5' -i -X PUT \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLS0ZnRmRIZWpnb3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
PUT /api/users/logout/5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLS0ZnRmRIZWpnb3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 2. /api/users/logout/{id}
Parameter Description

id

用户ID,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 56

{"code":10000,"message":"success","data":"退出成功"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

3.4. 跑步记录模块

跑步记录模块相关的接口。

3.4.1. 上报跑步记录

跑步时长超过30S才上传,

curl请求
$ curl 'https://iot.daconghealth.com/api/running/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHMTZCTnRSTjlSdHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"distance":100,"runTypeId":1,"recordList":"{}","minkm":"5.6,7.8,8.9,3.1,3.5,6.5,7.1","runType":1,"maxSpeed":5.6,"userId":5,"steps":200,"maxGradient":0,"mac":"54E1AD3160EE","avgSpeed":4.2,"duration":420,"minHeartRate":80,"calorie":50,"startTime":1724049310522,"minGradient":0,"minSpeed":3.1,"maxHeartRate":150,"avgHeartRate":120,"avgGradient":0,"height":0}'
http请求
POST /api/running/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHMTZCTnRSTjlSdHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 356
Host: iot.daconghealth.com

{"distance":100,"runTypeId":1,"recordList":"{}","minkm":"5.6,7.8,8.9,3.1,3.5,6.5,7.1","runType":1,"maxSpeed":5.6,"userId":5,"steps":200,"maxGradient":0,"mac":"54E1AD3160EE","avgSpeed":4.2,"duration":420,"minHeartRate":80,"calorie":50,"startTime":1724049310522,"minGradient":0,"minSpeed":3.1,"maxHeartRate":150,"avgHeartRate":120,"avgGradient":0,"height":0}
请求字段说明
Path Type Description

userId

String

用户ID,不能为空

runType

Integer

跑步类型,0:运动计划;1:快速启动;2:距离目标跑;3:时间目标跑;4:热量消耗目标跑;5:场景跑;6:配方跑;7:无跑步;8:按键板启动跑;9:底部工具条启动跑,支持触摸调速和坡度;10:maf180训练法 ,不支持触摸调速和坡度

runTypeId

Long

跑步类型ID,快速跑无值,其他的对应各类型id

mac

String

MAC地址,不能为空

startTime

Date

开始时间

duration

Integer

跑步时长

distance

Float

跑步距离

steps

Integer

步数

calorie

Float

热量

maxSpeed

Float

最大速度

minSpeed

Float

最小速度

avgSpeed

Float

平均速度

maxHeartRate

Integer

最大心率

minHeartRate

Integer

最小心率

avgHeartRate

Integer

平均心率

maxGradient

Integer

最大坡度

minGradient

Integer

最小坡度

avgGradient

Integer

平均坡度

recordList

String

运动记录明细数据

height

Float

爬升高度

minkm

String

每分钟配速

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

3.4.2. 获得某天跑步记录

curl请求
$ curl 'https://iot.daconghealth.com/api/records/current?pageNum=1&pageSize=5&userId=3&date=2018-04-28' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNL2VuK2EyUGNPWnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/current?pageNum=1&pageSize=5&userId=3&date=2018-04-28 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNL2VuK2EyUGNPWnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

userId

用户ID,可以为空

date

日期,可以为空,格式必须为:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 318

{"code":200,"message":"success","data":{"total":0,"list":[],"pageNum":1,"pageSize":5,"size":0,"startRow":0,"endRow":0,"pages":0,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[],"navigateFirstPage":0,"navigateLastPage":0}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONArray

list

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

3.4.3. 获得历史跑步记录

curl请求
$ curl 'https://iot.daconghealth.com/api/records/history?pageNum=1&pageSize=10&userId=5&beginDate=2018-04-20&endDate=2021-05-10' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhETnVPVExKaFBrdXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/history?pageNum=1&pageSize=10&userId=5&beginDate=2018-04-20&endDate=2021-05-10 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhETnVPVExKaFBrdXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

userId

用户ID,可以为空

beginDate

开始日期,格式必须为:yyyy-MM-dd

endDate

结束日期,格式必须为:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 733

{"code":200,"message":"success","data":{"total":1,"list":[{"id":"1","nickname":"pk","startTime":"2020-07-09 14:33:26","duration":10,"distance":10.0,"steps":1000,"calorie":100.0,"maxSpeed":5.0,"minSpeed":4.0,"avgSpeed":4.0,"maxHeartRate":100,"minHeartRate":60,"avgHeartRate":80,"maxGradient":0,"minGradient":0,"avgGradient":0,"height":0.0,"minkm":null,"systemCode":"dc","recordList":null,"paceRecord":null,"sportsType":1,"device":{"name":"我的跑步机1","hasScreen":1}}],"pageNum":1,"pageSize":10,"size":1,"startRow":1,"endRow":1,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONArray

list

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

3.4.4. 获得用户在排行榜中页数

curl请求
$ curl 'https://iot.daconghealth.com/api/records/rankingPageNum?userId=3&pageSize=9' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhCRGNzYXNWV3BhaXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/rankingPageNum?userId=3&pageSize=9 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhCRGNzYXNWV3BhaXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

pageSize

每页条数,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 41

{"code":200,"message":"success","data":1}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

Integer

所在页数

3.4.5. 获得用户排名

curl请求
$ curl 'https://iot.daconghealth.com/api/records/rankingNo?userId=5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLY3RMamxCSytXVHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/rankingNo?userId=5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLY3RMamxCSytXVHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 41

{"code":200,"message":"success","data":4}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

Integer

用户名次

3.4.6. 获得用户等级

curl请求
$ curl 'https://iot.daconghealth.com/api/records/userGrade?userId=1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBdkF5RUtEYjk2aXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/userGrade?userId=1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBdkF5RUtEYjk2aXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 41

{"code":200,"message":"success","data":0}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

Integer

用户等级

3.4.7. 获得排行榜

curl请求
$ curl 'https://iot.daconghealth.com/api/records/ranking?pageNum=1&pageSize=9&userId=43' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLdWZ4ZFVmVTJBTXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/ranking?pageNum=1&pageSize=9&userId=43 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLdWZ4ZFVmVTJBTXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

userId

用户ID,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 318

{"code":200,"message":"success","data":{"total":0,"list":[],"pageNum":1,"pageSize":9,"size":0,"startRow":0,"endRow":0,"pages":0,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[],"navigateFirstPage":0,"navigateLastPage":0}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONArray

list

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

3.4.8. 获得排行榜中临近的排名信息

curl请求
$ curl 'https://iot.daconghealth.com/api/records/ranking/near?userId=10' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMUXBoeGdHUzVPU3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/ranking/near?userId=10 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMUXBoeGdHUzVPU3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户ID,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 496

{"code":200,"message":"success","data":[{"ranking":4,"nickname":"jk","distance":10.0,"avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","city":"绵阳","province":"四川"},{"ranking":5,"nickname":"绿茶","distance":0.0,"avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/cncVKibqBibYcfWic4CpOXwL8jRAdZ217Rcn6zIXT2Df8RdJeZG2Rn4vZhiaEKUfJsw5NjcopPkDpGvj1GkKhbIAxg/0","city":"Mianyang","province":"Sichuan"}]}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONOArray

响应数据

data[].nickname

String

昵称

data[].ranking

Date

排名

data[].distance

Float

距离

data[].avatarUrl

String

用户头像

data[].province

String

用户所在省份

data[].city

String

用户所在城市

3.4.9. 获得跑步记录报告

curl请求
$ curl 'https://iot.daconghealth.com/api/records/report?userId=43&runType=0&runTypeId=17&date=2018-05-03' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKQkpoK0JyYzdiNnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/report?userId=43&runType=0&runTypeId=17&date=2018-05-03 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKQkpoK0JyYzdiNnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

runType

类型ID,不能为空,0:运动计划,1:快速启动,2:距离目标跑,3:时间目标跑,4:热量消耗目标跑,5:场景跑,6:配方跑,7:无跑步,8:按键板启动跑,9:底部工具条启动跑 支持触摸调速和坡度,10:maf180训练法 不支持触摸调速和坡度

runTypeId

子类型ID,不能为空,例如计划类型就是计划的ID

date

日期,不能为空,格式为:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 44

{"code":200,"message":"success","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

运动报告数据

3.4.10. 获得最新跑步记录报告

curl请求
$ curl 'https://iot.daconghealth.com/api/records/currentReport?userId=43&time=2018-05-16+11%3A00%3A00' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHeWxjemtkeU1PMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/currentReport?userId=43&time=2018-05-16+11%3A00%3A00 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHeWxjemtkeU1PMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

time

当前时间,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 44

{"code":200,"message":"success","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

运动报告数据

3.4.11. 获得用户某种跑步类型的次数

curl请求
$ curl 'https://iot.daconghealth.com/api/records/runningTimes?userId=43&runType=0&beginDate=2018-04-20&endDate=2018-05-10' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEMUFUblpFTjlrQ3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/runningTimes?userId=43&runType=0&beginDate=2018-04-20&endDate=2018-05-10 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEMUFUblpFTjlrQ3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

runType

类型ID,不能为空,0:运动计划,1:快速启动,2:距离目标跑,3:时间目标跑,4:热量消耗目标跑,5:场景跑,6:配方跑,7:无跑步,8:按键板启动跑,9:底部工具条启动跑 支持触摸调速和坡度,10:maf180训练法 不支持触摸调速和坡度

beginDate

开始日期,格式必须为:yyyy-MM-dd

endDate

结束日期,格式必须为:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 41

{"code":200,"message":"success","data":0}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

Integer

跑步次数

3.4.12. 获取用户某天的跑步记录详情

curl请求
$ curl 'https://iot.daconghealth.com/api/records/history/detail?userId=43&date=2018-05-03' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEQ3Q4VlFHbmxwcnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/history/detail?userId=43&date=2018-05-03 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEQ3Q4VlFHbmxwcnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

date

日期,不能为空,格式为:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 44

{"code":200,"message":"success","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

运动报告数据

3.4.13. 获得排行榜中临近的实时排名信息

curl请求
$ curl 'https://iot.daconghealth.com/api/records/ranking/near/realtime?userId=5&distance=1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOT1dQbmlRZE5jbXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/records/ranking/near/realtime?userId=5&distance=1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOT1dQbmlRZE5jbXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户ID,不能为空

distance

运动距离,默认为0

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 724

{"code":200,"message":"success","data":[{"ranking":2,"nickname":"jk3","distance":13.0,"avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","city":"绵阳","province":"四川"},{"ranking":3,"nickname":"jk2","distance":12.0,"avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","city":"绵阳","province":"四川"},{"ranking":4,"nickname":"jk","distance":11.0,"avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","city":"绵阳","province":"四川"}]}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONOArray

响应数据

data[].nickname

String

昵称

data[].ranking

Date

排名

data[].distance

Float

距离

data[].avatarUrl

String

用户头像

data[].province

String

用户所在省份

data[].city

String

用户所在城市

3.5. 设备模块

设备模块相关的接口。

3.5.1. 修改设备锁定状态

curl请求
$ curl 'https://iot.daconghealth.com/api/devices/locked/1865715CD987' -i -X PUT \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d 'locked=1'
http请求
PUT /api/devices/locked/1865715CD987 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
Content-Type: application/x-www-form-urlencoded

locked=1
path参数
Table 3. /api/devices/locked/{mac}
Parameter Description

mac

设备mac,不能为空

请求参数
Parameter Description

locked

锁定状态,0:激活,1:锁定

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

3.6. 健康状况记录模块

健康状况记录模块相关的接口。

3.6.1. 添加身体测评数据

curl请求
$ curl 'https://iot.daconghealth.com/api/healths/assessment/10' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEYTJIR2gwbTA4ank0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"recovering":0,"hasSomeSituation":0,"training":0,"takingMedicine":0,"continuousTraining":0}'
http请求
PUT /api/healths/assessment/10 HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEYTJIR2gwbTA4ank0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 92
Host: iot.daconghealth.com

{"recovering":0,"hasSomeSituation":0,"training":0,"takingMedicine":0,"continuousTraining":0}
path参数
Table 4. /api/healths/assessment/{userId}
Parameter Description

userId

用户ID,不能为空

请求字段说明
Path Type Description

training

Integer

正在进行连续的训练,每周至少4次,已经持续两年时间,0:否,1:是,可以为空

recovering

Integer

曾经或正在从心脏病、任何手术或住院等大病中恢复,0:否,1:是,不能为空

hasSomeSituation

Integer

受了伤、训练或比赛表现在退步、每年得两次以上的感冒、会过敏和哮喘,0:否,1:是,不能为空

continuousTraining

Integer

已经训练超过两年,且没有出现以上提到的任何问题,0:否,1:是,不能为空

takingMedicine

Integer

是否正在定期服用药物,0:否,1:是,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

String

响应数据

3.6.2. 获取最近身体测评数据

curl请求
$ curl 'https://iot.daconghealth.com/api/healths/assessment/5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKWDFzdm1ITGxSRHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/healths/assessment/5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKWDFzdm1ITGxSRHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 5. /api/healths/assessment/{userId}
Parameter Description

userId

用户ID,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 174

{"code":10000,"message":"success","data":{"list":[{"userId":"5","type":2,"value":150,"createTime":"2019-12-10 14:10:02","updateTime":"2019-12-10 14:10:02","systemCode":""}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONArray

测评数据

3.6.3. 获取最大有氧运动心率

curl请求
$ curl 'https://iot.daconghealth.com/api/healths/maxHeartRate/5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBMEYwa0xNamtreXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/healths/maxHeartRate/5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBMEYwa0xNamtreXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 6. /api/healths/maxHeartRate/{userId}
Parameter Description

userId

用户ID,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 45

{"code":10000,"message":"success","data":140}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

Integer

最大有氧运动心率

3.6.4. 查询历史健康状况记录

curl请求
$ curl 'https://iot.daconghealth.com/api/healths/history?pageNum=1&pageSize=5&userId=3&type=0&beginDate=2019-12-10&endDate=2019-12-10' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhCUTd1ZnlXN0NZY3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/healths/history?pageNum=1&pageSize=5&userId=3&type=0&beginDate=2019-12-10&endDate=2019-12-10 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhCUTd1ZnlXN0NZY3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

userId

用户ID,可以为空

type

数据类型,可以为空,0:心率,1:体重

beginDate

开始日期,格式必须是:yyyy-MM-dd

endDate

结束日期,格式必须是:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 320

{"code":10000,"message":"success","data":{"total":0,"list":[],"pageNum":1,"pageSize":5,"size":0,"startRow":0,"endRow":0,"pages":0,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[],"navigateFirstPage":0,"navigateLastPage":0}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONArray

list

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

3.7. 可穿戴设备模块

可穿戴设备模块相关的接口。

3.7.1. 添加设备

curl请求
$ curl 'https://iot.daconghealth.com/api/wearableDevices' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhFV09aL2xuaVJVSnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"bluetooth":"V1.5","vendor":"厂商","name":"测试设备","description":"测试添加设备","type":0,"userId":1,"mac":"11-22-22-33-44-33"}'
http请求
POST /api/wearableDevices HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhFV09aL2xuaVJVSnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 141
Host: iot.daconghealth.com

{"bluetooth":"V1.5","vendor":"厂商","name":"测试设备","description":"测试添加设备","type":0,"userId":1,"mac":"11-22-22-33-44-33"}
请求字段说明
Path Type Description

userId

String

用户ID,不能为空

name

String

设备名称,不能为空,不能超过30个字符

mac

String

MAC地址,不能为空,不能超过30个字符

type

Integer

设备类型,0:手环,1:手表,2:体重仪,3:心率仪,4:耳麦,不能为空

bluetooth

String

蓝牙版本,可以为空,不能超过20个字符

vendor

String

磁盘空间,可以为空,不能超过30个字符

description

String

测试添加设备,可以为空,不能超过50个字符

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 45

{"code":10000,"message":"success","data":"4"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

String

设备Id

3.7.2. 根据id获得设备

curl请求
$ curl 'https://iot.daconghealth.com/api/wearableDevices/3' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOVUR0TnhFTTBOYXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/wearableDevices/3 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOVUR0TnhFTTBOYXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 7. /api/wearableDevices/{id}
Parameter Description

id

数据ID,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 234

{"code":10000,"message":"success","data":{"id":"3","description":"","createTime":"2018-05-10 09:38:07","updateTime":"2018-05-10 09:38:07","userId":"5","name":"ALIBABA","mac":"54:03:84:64:52:1C","type":2,"bluetooth":"ble","vendor":""}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

设备ID

data.userId

String

用户ID

data.name

String

设备名称

data.mac

String

MAC地址

data.type

Integer

设备类型,0:手环,1:手表,2:体重仪,3:心率仪,4:耳麦

data.bluetooth

String

蓝牙版本

data.vendor

String

厂商

data.description

String

描述/备注

data.createTime

Date

创建时间

data.updateTime

Date

更新时间

3.7.3. 根据MAC获得设备

curl请求
$ curl 'https://iot.daconghealth.com/api/wearableDevices/54:03:84:64:52:1C/5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPTTg0RFJEWG1MaHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/wearableDevices/54:03:84:64:52:1C/5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPTTg0RFJEWG1MaHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 8. /api/wearableDevices/{mac}/{userId}
Parameter Description

mac

mac地址,不能为空

userId

用户Id,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 147

{"code":10000,"message":"success","data":{"id":"3","userId":"5","name":"ALIBABA","mac":"54:03:84:64:52:1C","type":2,"bluetooth":"ble","vendor":""}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

设备ID

data.userId

String

用户ID

data.name

String

设备名称

data.mac

String

MAC地址

data.type

Integer

设备类型,0:手环,1:手表,2:体重仪,3:心率仪,4:耳麦

data.bluetooth

String

蓝牙版本

data.vendor

String

厂商

3.7.4. 获得某用户设备列表

curl请求
$ curl 'https://iot.daconghealth.com/api/wearableDevices/user?userId=5&type=2' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKSlMzWFJvUVpFeHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/wearableDevices/user?userId=5&type=2 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKSlMzWFJvUVpFeHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户ID,不能为空

type

设备类型,0:手环,1:手表,2:体重仪,3:心率仪,4:耳麦,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 158

{"code":10000,"message":"success","data":{"list":[{"id":"3","userId":"5","name":"ALIBABA","mac":"54:03:84:64:52:1C","type":2,"bluetooth":"ble","vendor":""}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

String

设备ID

data.list[].userId

String

用户ID

data.list[].name

String

设备名称

data.list[].mac

String

MAC地址

data.list[].type

Integer

设备类型,0:手环,1:手表,2:体重仪,3:心率仪,4:耳麦

data.list[].bluetooth

String

蓝牙版本

data.list[].vendor

String

厂商

3.7.5. 获得设备列表

curl请求
$ curl 'https://iot.daconghealth.com/api/wearableDevices?pageNum=1&pageSize=5&userId=5&keyWord=ALIBABA&type=2' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGeEZaMXc4RmNyT3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/wearableDevices?pageNum=1&pageSize=5&userId=5&keyWord=ALIBABA&type=2 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGeEZaMXc4RmNyT3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

userId

用户ID,可以为空

keyWord

设备名称,可以为空,用作模糊查询

type

设备类型,0:手环,1:手表,2:体重仪,3:心率仪,4:耳麦,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 513

{"code":10000,"message":"success","data":{"total":1,"list":[{"id":"3","description":"","createTime":"2018-05-10 09:38:07","updateTime":"2018-05-10 09:38:07","userId":"5","name":"ALIBABA","mac":"54:03:84:64:52:1C","type":2,"bluetooth":"ble","vendor":""}],"pageNum":1,"pageSize":5,"size":1,"startRow":1,"endRow":1,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].userId

String

用户ID

data.list[].name

String

设备名称

data.list[].mac

String

MAC地址

data.list[].type

Integer

设备类型,0:手环,1:手表,2:体重仪,3:心率仪,4:耳麦

data.list[].bluetooth

String

蓝牙版本

data.list[].vendor

String

厂商

data.list[].createTime

Date

创建时间

data.list[].updateTime

Date

修改时间

data.list[].description

String

描述/备注

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

3.7.6. 根据ID修改设备信息

curl请求
$ curl 'https://iot.daconghealth.com/api/wearableDevices/3' -i -X PUT \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKaGcrajgyb3NZUnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"bluetooth":"V1.5","vendor":"厂商","name":"测试设备","description":"测试修改设备","type":0,"userId":5,"mac":"11-22-22-33-44-31"}'
http请求
PUT /api/wearableDevices/3 HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKaGcrajgyb3NZUnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 141
Host: iot.daconghealth.com

{"bluetooth":"V1.5","vendor":"厂商","name":"测试设备","description":"测试修改设备","type":0,"userId":5,"mac":"11-22-22-33-44-31"}
path参数
Table 9. /api/wearableDevices/{id}
Parameter Description

id

数据ID,不能为空

请求字段说明
Path Type Description

userId

String

用户ID,可以为空

name

String

设备名称,可以为空,不能超过30个字符

mac

String

MAC地址,可以为空,不能超过30个字符

type

Integer

设备类型,0:手环,1:手表,2:体重仪,3:心率仪,4:耳麦,可以为空

bluetooth

String

蓝牙版本,可以为空,不能超过20个字符

vendor

String

磁盘空间,可以为空,不能超过30个字符

description

String

测试添加设备,可以为空,不能超过50个字符

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

3.7.7. 根据ID删除设备

curl请求
$ curl 'https://iot.daconghealth.com/api/wearableDevices/3' -i -X DELETE \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIUEw2OVNNenF2Z3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
DELETE /api/wearableDevices/3 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIUEw2OVNNenF2Z3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 10. /api/wearableDevices/{id}
Parameter Description

id

数据ID,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

3.7.8. 根据MAC删除设备

curl请求
$ curl 'https://iot.daconghealth.com/api/wearableDevices/54:03:84:64:52:1C/5' -i -X DELETE \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEZ0VNVWM2aE9Zc3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
DELETE /api/wearableDevices/54:03:84:64:52:1C/5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEZ0VNVWM2aE9Zc3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 11. /api/wearableDevices/{mac}/{userId}
Parameter Description

mac

mac地址,不能为空

userId

用户Id,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

3.8. 跑步计划模块

跑步计划模块相关的接口。

3.8.1. 添加跑步计划

curl请求
$ curl 'https://iot.daconghealth.com/api/plans' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhFamFNZ3ZCUlJXc3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"beginDate":"2024-08-19","aim":0,"ability":0,"userId":"9"}'
http请求
POST /api/plans HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhFamFNZ3ZCUlJXc3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 59
Host: iot.daconghealth.com

{"beginDate":"2024-08-19","aim":0,"ability":0,"userId":"9"}
请求字段说明
Path Type Description

userId

String

用户Id,不能为空

aim

Integer

运动目标,0:健身保养,1:减脂瘦身,2:全马备战,不能为空

ability

Integer

当前能力,0:马拉松,1:半马,2:10公里,3:5公里,4:30-60分钟,5:20-30分钟,6:少于20分钟,不能为空

beginDate

String

开始时间,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 44

{"code":200,"message":"success","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

String

计划Id

3.8.2. 获得用户跑步计划

curl请求
$ curl 'https://iot.daconghealth.com/api/plans/9' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMdXgyWm4vMkVsY3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/plans/9 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMdXgyWm4vMkVsY3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 12. /api/plans/{userId}
Parameter Description

userId

用户Id,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 53570

{"code":200,"message":"success","data":{"id":"3","aim":0,"beginDate":"2024-08-19","endDate":"2024-09-16","ability":0,"status":0,"detail":[{"date":"2024-08-19","baseOn":0,"useGradient":0,"totalDistance":2.24,"totalTime":30,"totalCalorie":175.0,"steps":[{"id":"256","methodId":"29","dayIndex":1,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"257","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"258","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"259","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"260","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"261","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"262","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"263","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"264","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"265","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"266","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"267","methodId":"29","dayIndex":1,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-20","baseOn":0,"useGradient":0,"totalDistance":2.26,"totalTime":30,"totalCalorie":177.0,"steps":[{"id":"268","methodId":"30","dayIndex":2,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"269","methodId":"30","dayIndex":2,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"270","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"271","methodId":"30","dayIndex":2,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"272","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"273","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"274","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"275","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"276","methodId":"30","dayIndex":2,"speed":6.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"277","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"278","methodId":"30","dayIndex":2,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"279","methodId":"30","dayIndex":2,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-21","baseOn":0,"useGradient":0,"totalDistance":2.4,"totalTime":30,"totalCalorie":187.0,"steps":[{"id":"280","methodId":"31","dayIndex":3,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"281","methodId":"31","dayIndex":3,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"282","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"283","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"284","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"285","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"286","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"287","methodId":"31","dayIndex":3,"speed":6.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"288","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"289","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"290","methodId":"31","dayIndex":3,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"291","methodId":"31","dayIndex":3,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-22","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-08-23","baseOn":0,"useGradient":0,"totalDistance":2.29,"totalTime":30,"totalCalorie":179.0,"steps":[{"id":"292","methodId":"33","dayIndex":5,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"293","methodId":"33","dayIndex":5,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"294","methodId":"33","dayIndex":5,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"295","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"296","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"297","methodId":"33","dayIndex":5,"speed":6.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"298","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"299","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"300","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"301","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"302","methodId":"33","dayIndex":5,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"303","methodId":"33","dayIndex":5,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-24","baseOn":0,"useGradient":0,"totalDistance":2.2,"totalTime":30,"totalCalorie":173.0,"steps":[{"id":"304","methodId":"34","dayIndex":6,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"305","methodId":"34","dayIndex":6,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"306","methodId":"34","dayIndex":6,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"307","methodId":"34","dayIndex":6,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"308","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"309","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"310","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"311","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"312","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"313","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"314","methodId":"34","dayIndex":6,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"315","methodId":"34","dayIndex":6,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-25","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-08-26","baseOn":0,"useGradient":0,"totalDistance":2.24,"totalTime":30,"totalCalorie":175.0,"steps":[{"id":"316","methodId":"36","dayIndex":8,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"317","methodId":"36","dayIndex":8,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"318","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"319","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"320","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"321","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"322","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"323","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"324","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"325","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"326","methodId":"36","dayIndex":8,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"327","methodId":"36","dayIndex":8,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-27","baseOn":0,"useGradient":0,"totalDistance":2.38,"totalTime":30,"totalCalorie":186.0,"steps":[{"id":"328","methodId":"37","dayIndex":9,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"329","methodId":"37","dayIndex":9,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"330","methodId":"37","dayIndex":9,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"331","methodId":"37","dayIndex":9,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"332","methodId":"37","dayIndex":9,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"333","methodId":"37","dayIndex":9,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"334","methodId":"37","dayIndex":9,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"335","methodId":"37","dayIndex":9,"speed":6.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"336","methodId":"37","dayIndex":9,"speed":6.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"337","methodId":"37","dayIndex":9,"speed":6.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"338","methodId":"37","dayIndex":9,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"339","methodId":"37","dayIndex":9,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-28","baseOn":0,"useGradient":0,"totalDistance":2.35,"totalTime":30,"totalCalorie":183.0,"steps":[{"id":"340","methodId":"38","dayIndex":10,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"341","methodId":"38","dayIndex":10,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"342","methodId":"38","dayIndex":10,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"343","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"344","methodId":"38","dayIndex":10,"speed":6.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"345","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"346","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"347","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"348","methodId":"38","dayIndex":10,"speed":6.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"349","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"350","methodId":"38","dayIndex":10,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"351","methodId":"38","dayIndex":10,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-29","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-08-30","baseOn":0,"useGradient":0,"totalDistance":2.2,"totalTime":30,"totalCalorie":173.0,"steps":[{"id":"352","methodId":"40","dayIndex":12,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"353","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"354","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"355","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"356","methodId":"40","dayIndex":12,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"357","methodId":"40","dayIndex":12,"speed":6.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"358","methodId":"40","dayIndex":12,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"359","methodId":"40","dayIndex":12,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"360","methodId":"40","dayIndex":12,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"361","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"362","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"363","methodId":"40","dayIndex":12,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-31","baseOn":0,"useGradient":0,"totalDistance":2.35,"totalTime":30,"totalCalorie":183.0,"steps":[{"id":"364","methodId":"41","dayIndex":13,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"365","methodId":"41","dayIndex":13,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"366","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"367","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"368","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"369","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"370","methodId":"41","dayIndex":13,"speed":6.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"371","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"372","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"373","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"374","methodId":"41","dayIndex":13,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"375","methodId":"41","dayIndex":13,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-01","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-09-02","baseOn":0,"useGradient":0,"totalDistance":2.31,"totalTime":30,"totalCalorie":181.0,"steps":[{"id":"376","methodId":"43","dayIndex":15,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"377","methodId":"43","dayIndex":15,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"378","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"379","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"380","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"381","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"382","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"383","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"384","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"385","methodId":"43","dayIndex":15,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"386","methodId":"43","dayIndex":15,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"387","methodId":"43","dayIndex":15,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-03","baseOn":0,"useGradient":0,"totalDistance":2.28,"totalTime":30,"totalCalorie":178.0,"steps":[{"id":"388","methodId":"44","dayIndex":16,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"389","methodId":"44","dayIndex":16,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"390","methodId":"44","dayIndex":16,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"391","methodId":"44","dayIndex":16,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"392","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"393","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"394","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"395","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"396","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"397","methodId":"44","dayIndex":16,"speed":6.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"398","methodId":"44","dayIndex":16,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"399","methodId":"44","dayIndex":16,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-04","baseOn":0,"useGradient":0,"totalDistance":2.08,"totalTime":30,"totalCalorie":164.0,"steps":[{"id":"400","methodId":"45","dayIndex":17,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"401","methodId":"45","dayIndex":17,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"402","methodId":"45","dayIndex":17,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"403","methodId":"45","dayIndex":17,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"404","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"405","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"406","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"407","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"408","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"409","methodId":"45","dayIndex":17,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"410","methodId":"45","dayIndex":17,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"411","methodId":"45","dayIndex":17,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-05","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-09-06","baseOn":0,"useGradient":0,"totalDistance":2.28,"totalTime":30,"totalCalorie":178.0,"steps":[{"id":"412","methodId":"47","dayIndex":19,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"413","methodId":"47","dayIndex":19,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"414","methodId":"47","dayIndex":19,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"415","methodId":"47","dayIndex":19,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"416","methodId":"47","dayIndex":19,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"417","methodId":"47","dayIndex":19,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"418","methodId":"47","dayIndex":19,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"419","methodId":"47","dayIndex":19,"speed":6.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"420","methodId":"47","dayIndex":19,"speed":6.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"421","methodId":"47","dayIndex":19,"speed":null,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"422","methodId":"47","dayIndex":19,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"423","methodId":"47","dayIndex":19,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-07","baseOn":0,"useGradient":0,"totalDistance":2.24,"totalTime":30,"totalCalorie":175.0,"steps":[{"id":"424","methodId":"48","dayIndex":20,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"425","methodId":"48","dayIndex":20,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"426","methodId":"48","dayIndex":20,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"427","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"428","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"429","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"430","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"431","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"432","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"433","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"434","methodId":"48","dayIndex":20,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"435","methodId":"48","dayIndex":20,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-08","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-09-09","baseOn":0,"useGradient":0,"totalDistance":2.17,"totalTime":30,"totalCalorie":170.0,"steps":[{"id":"436","methodId":"50","dayIndex":22,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"437","methodId":"50","dayIndex":22,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"438","methodId":"50","dayIndex":22,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"439","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"440","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"441","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"442","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"443","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"444","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"445","methodId":"50","dayIndex":22,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"446","methodId":"50","dayIndex":22,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"447","methodId":"50","dayIndex":22,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-10","baseOn":0,"useGradient":0,"totalDistance":2.31,"totalTime":30,"totalCalorie":181.0,"steps":[{"id":"448","methodId":"51","dayIndex":23,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"449","methodId":"51","dayIndex":23,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"450","methodId":"51","dayIndex":23,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"451","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"452","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"453","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"454","methodId":"51","dayIndex":23,"speed":6.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"455","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"456","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"457","methodId":"51","dayIndex":23,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"458","methodId":"51","dayIndex":23,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"459","methodId":"51","dayIndex":23,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-11","baseOn":0,"useGradient":0,"totalDistance":2.33,"totalTime":30,"totalCalorie":182.0,"steps":[{"id":"460","methodId":"52","dayIndex":24,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"461","methodId":"52","dayIndex":24,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"462","methodId":"52","dayIndex":24,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"463","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"464","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"465","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"466","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"467","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"468","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"469","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"470","methodId":"52","dayIndex":24,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"471","methodId":"52","dayIndex":24,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-12","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-09-13","baseOn":0,"useGradient":0,"totalDistance":2.38,"totalTime":30,"totalCalorie":186.0,"steps":[{"id":"472","methodId":"54","dayIndex":26,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"473","methodId":"54","dayIndex":26,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"474","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"475","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"476","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"477","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"478","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"479","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"480","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"481","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"482","methodId":"54","dayIndex":26,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"483","methodId":"54","dayIndex":26,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-14","baseOn":0,"useGradient":0,"totalDistance":2.31,"totalTime":30,"totalCalorie":181.0,"steps":[{"id":"484","methodId":"55","dayIndex":27,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"485","methodId":"55","dayIndex":27,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"486","methodId":"55","dayIndex":27,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"487","methodId":"55","dayIndex":27,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"488","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"489","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"490","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"491","methodId":"55","dayIndex":27,"speed":6.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"492","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"493","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"494","methodId":"55","dayIndex":27,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"495","methodId":"55","dayIndex":27,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-15","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null}],"distance":45.600006,"time":600,"calorie":3567.0,"addUpDistance":0.0,"addUpTime":0,"addUpCalorie":0.0,"addDays":0,"coverUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"planId":"1","name":"减脂计划","nameEng":"eng name","days":28}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

运动计划Id

data.aim

Integer

运动目标,0:健身保养,1:减脂瘦身,2:全马备战

data.ability

Integer

当前能力,0:马拉松,1:半马,2:10公里,3:5公里,4:30-60分钟,5:20-30分钟,6:少于20分钟

data.beginDate

Date

开始日期

data.endDate

Date

结束日期

data.status

Integer

计划状态,0:进行中,1:部分完成,2:已完成,3:已取消

data.distance

Float

距离

data.time

Integer

时长

data.addUpDistance

Float

已跑距离

data.addUpTime

Integer

已跑时长

data.detail

JSONObject

计划明细

3.8.3. 获得用户某天跑步计划

curl请求
$ curl 'https://iot.daconghealth.com/api/plans/9/2024-08-19%2014:35:09' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDQTY3R3VwS3JsTnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/plans/9/2024-08-19%2014:35:09 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDQTY3R3VwS3JsTnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 13. /api/plans/{userId}/{date}
Parameter Description

userId

用户Id,不能为空

date

日期,不能为空,格式必须是:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2925

{"code":200,"message":"success","data":{"id":"4","aim":0,"beginDate":"2024-08-19","endDate":"2024-09-16","ability":0,"status":0,"detail":[{"date":"2024-08-19","baseOn":0,"useGradient":0,"totalDistance":2.24,"totalTime":30,"totalCalorie":175.0,"steps":[{"id":"256","methodId":"29","dayIndex":1,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"257","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"258","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"259","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"260","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"261","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"262","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"263","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"264","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"265","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"266","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"267","methodId":"29","dayIndex":1,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"}],"status":1,"name":null,"nameEng":null,"type":null}],"distance":null,"time":null,"calorie":null,"addUpDistance":null,"addUpTime":null,"addUpCalorie":null,"addDays":null,"coverUrls":null,"planId":"1","name":"减脂计划","nameEng":"eng name","days":28}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

运动计划Id

data.aim

Integer

运动目标,0:健身保养,1:减脂瘦身,2:全马备战

data.ability

Integer

当前能力,0:马拉松,1:半马,2:10公里,3:5公里,4:30-60分钟,5:20-30分钟,6:少于20分钟

data.beginDate

Date

开始日期

data.endDate

Date

结束日期

data.status

Integer

计划状态,0:进行中,1:部分完成,2:已完成,3:已取消

data.distance

Float

距离

data.time

Integer

时长

data.addUpDistance

Float

已跑距离

data.addUpTime

Integer

已跑时长

data.detail

JSONObject

计划明细

data.detail[].date

Date

日期

data.detail[].status

Integer

状态,0:未完成,1:计划跑步,2:部分完成,3:休息,4:已完成

data.detail[].baseOn

Integer

分段依据,0:时间,1:距离

data.detail[].useGradient

Integer

是否使用坡度,0:不使用, 1:使用

data.detail[].totalDistance

Float

总距离

data.detail[].totalTime

Integer

总时间,单位:分钟

data.detail[].totalCalorie

Float

总热量,单位:kj

data.detail[].steps

JSONObject

具体步骤

data.detail[].steps[].speed

Float

速度,单位:公里/小时,如果是单车,字段表示阻力

data.detail[].steps[].gradient

Integer

坡度

data.detail[].steps[].beginTime

Integer

开始时刻

data.detail[].steps[].beginDistance

Integer

开始距离

data.detail[].steps[].duration

Integer

持续时间

3.8.4. 修改用户某天跑步计划状态

curl请求
$ curl 'https://iot.daconghealth.com/api/plans/15/2018-04-28/2' -i -X PUT \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOeWFuYWlnbFhlQXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
PUT /api/plans/15/2018-04-28/2 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOeWFuYWlnbFhlQXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 14. /api/plans/{planId}/{date}/{status}
Parameter Description

planId

计划ID,不能为空

date

日期,不能为空,格式必须是:yyyy-MM-dd

status

状态,0:未完成,1:计划跑步,2:部分完成,3:休息,4:已完成,不能为空

http响应
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 43

{"code":404,"message":"褰撳墠娌℃湁璁″垝"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

3.8.5. 修改用户整体跑步计划状态

curl请求
$ curl 'https://iot.daconghealth.com/api/plans/9/1' -i -X PUT \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJRFNnVmYwSTUrenk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
PUT /api/plans/9/1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJRFNnVmYwSTUrenk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 15. /api/plans/{userId}/{status}
Parameter Description

userId

用户Id,不能为空

status

状态,0:进行中,1:部分完成,2:已完成,3:已取消,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 42

{"code":200,"message":"success","data":""}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

3.8.6. 计划延迟

curl请求
$ curl 'https://iot.daconghealth.com/api/plans/delay' -i -X PUT \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOVHZwZDdudDk0V3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d 'userId=9&date=2024-08-19+14%3A35%3A09&days=5'
http请求
PUT /api/plans/delay HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOVHZwZDdudDk0V3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
Content-Type: application/x-www-form-urlencoded

userId=9&date=2024-08-19+14%3A35%3A09&days=5
请求参数
Parameter Description

userId

用户ID,不能为空

date

开始延迟日期,不能为空

days

延迟天数,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 42

{"code":200,"message":"success","data":""}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

3.9. 新版扫码登录

3.9.1. 获取二维码数据

curl请求
$ curl 'https://iot.daconghealth.com/api/scan/qrcode/8CFCA0117B5E?mp=xmore&type=1' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/scan/qrcode/8CFCA0117B5E?mp=xmore&type=1 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 16. /api/scan/qrcode/{mac}
Parameter Description

mac

设备的mac,去除冒号,必填

请求参数
Parameter Description

mp

公众号区别,可选dc、xmore,可以为空,默认为dc

type

扫码登录方式,0-轮询,1-MQTT推送,默认为0

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 183

{"code":10000,"message":"success","data":{"qr":"https://iot.daconghealth.com/qrcode/scan?appid=wx386f55716b801313&mac=8CFCA0117B5E&timestamp=1724049311319","expire":300,"appid":null}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.qr

String

生成二维码数据

data.appid

String

公众号appid

data.expire

Integer

二维码有效时间,单位秒

3.9.2. 查询登录状态

curl请求
$ curl 'https://iot.daconghealth.com/api/scan/query/8CFCA0117B5E' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/scan/query/8CFCA0117B5E HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 17. /api/scan/query/{mac}
Parameter Description

mac

设备的mac,去除冒号,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 54

{"code":20001,"message":"用户未登录","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code 返回message 返回其他字段

10000

成功

20001

用户未登录

3.9.3. 微信扫码公众号授权登录

门闸、储物柜通过mqtt返回登录信息

curl请求
$ curl 'https://iot.daconghealth.com/api/scan/verify' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"code":"3rqdewfcdbsdfs","appid":"wx386f55716b801313","mac":"8CFCA0117B5E","timestamp":1646633277996}'
http请求
POST /api/scan/verify HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 101
Host: iot.daconghealth.com

{"code":"3rqdewfcdbsdfs","appid":"wx386f55716b801313","mac":"8CFCA0117B5E","timestamp":1646633277996}
请求字段说明
Path Type Description

code

String

授权code,必填

mac

String

设备的mac,去除冒号,必填

appid

String

公众号appid,必填

timestamp

Long

时间戳

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 57

{"code":20015,"message":"二维码已过期","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code 返回message 返回其他字段

10000

成功

20015

二维码已过期

20016

二维码异常请刷新二维码

3.9.4. 小程序扫码登录

门闸、储物柜通过mqtt返回登录信息

curl请求
$ curl 'https://iot.daconghealth.com/api/ma/scan/verify' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLMzFDZzIyZVE3NXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"mac":"8CFCA0117B5E","timestamp":1646633277996}'
http请求
POST /api/ma/scan/verify HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLMzFDZzIyZVE3NXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 48
Host: iot.daconghealth.com

{"mac":"8CFCA0117B5E","timestamp":1646633277996}
请求字段说明
Path Type Description

mac

String

设备的mac,去除冒号,必填

timestamp

Long

时间戳

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 57

{"code":20015,"message":"二维码已过期","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4. 海外版/小程序 模块

4.1. 认证模块

认证模块相关接口。本模块的接口在未登录状态使用使用basic认证方式token名为Authorization值为"Basic:" + 密文。

4.1.1. 邮箱注册

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/auth/register' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhou@163.com"}'
http请求
POST /api/v3/auth/register HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 70
Host: iot.daconghealth.com

{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhou@163.com"}
请求字段说明
Path Type Description

email

String

不能为空,邮箱地址

password

String

不能为空,密码,MD5加密

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code说明
返回code 返回message 返回其他字段

10000

成功发送激活邮件

20018

邮箱格式错误

30040

邮箱已注册且已激活未发激活邮件

30041

邮箱已注册但未激活又发激活邮件

4.1.2. 用户邮箱登录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/auth/login/email' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhouk517@163.com"}'
http请求
POST /api/v3/auth/login/email HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 74
Host: iot.daconghealth.com

{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhouk517@163.com"}
请求字段说明
Path Type Description

email

String

不能为空,邮箱地址

password

String

不能为空,密码,MD5加密

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 897

{"code":10000,"message":"success","data":{"token":"aWdEWCtYcjNqaVorcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNN3R4ODk5UTFQb3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==","user":{"id":"2","createTime":1575958188000,"updateTime":1634262529000,"description":"测试数据","uuid":"12dbfe4f210111ecaef58cec4b8c9904","unionId":null,"openId":"oVdXessXTM88qc-_iNN1JVPOgqBg","openId1":null,"openId11":null,"openId2":null,"openId21":null,"nickname":"noyesz","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132","mobile":null,"email":"zhouk517@163.com","google":null,"facebook":null,"gender":null,"country":null,"province":null,"city":null,"language":null,"age":0,"birthday":null,"height":180,"weight":140,"heartRate":75,"grade":0,"loginStatus":0,"extend":null,"realName":null,"bodyFat":null,"bloodPressure":null}}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.token

String

token

data.user

JSONObject

用户信息

data.user.id

Integer

ID

data.user.uuid

String

唯一id

data.user.mobile

String

手机号码

data.user.email

String

邮箱

data.user.unionId

String

微信unionId

data.user.openId

String

微信openId

data.user.facebook

String

facebook唯一标示

data.user.google

String

google唯一标示

data.user.nickname

String

用户昵称

data.user.avatarUrl

String

头像URL

data.user.gender

Integer

性别,1:男性,2:女性,0:未知

data.user.birthday

Date

出生日期 yyyy-MM-dd

data.user.country

String

所在国家

data.user.province

String

所在省份

data.user.city

String

所在城市

data.user.description

String

描述/备注

返回code 返回message 返回其他字段

10000

成功

token,user

20018

邮箱格式错误

20002

账号不存在或密码错误

4.1.3. 用户重置密码

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/auth/reset/pwd' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhou@163.com"}'
http请求
POST /api/v3/auth/reset/pwd HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 70
Host: iot.daconghealth.com

{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhou@163.com"}
请求字段说明
Path Type Description

email

String

不能为空,邮箱地址

password

String

不能为空,密码,MD5加密

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 54

{"code":20019,"message":"邮箱未注册","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code 返回message 返回其他字段

10000

成功

token,user

20018

邮箱格式错误

20019

邮箱未注册

4.1.4. 用户微信登录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/auth/login/wx/041xzb000oEVyL1IrN00035spn4xzb0c' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d 'platform=0'
http请求
POST /api/v3/auth/login/wx/041xzb000oEVyL1IrN00035spn4xzb0c HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com

platform=0
path参数
Table 18. /api/v3/auth/login/wx/{code}
Parameter Description

code

微信授权code

path请求参数
Parameter Description

platform

平台,1-ios,0-android,可以为空,默认0

http响应
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 247

{"code":80001,"message":"寰俊鍏紬骞冲彴寮傚父","data":"閿欒浠g爜锛�40029, 閿欒淇℃伅锛歩nvalid code, rid: 66c2e7a3-595bd8de-4c56d2ec锛屽井淇″師濮嬫姤鏂囷細{\"errcode\":40029,\"errmsg\":\"invalid code, rid: 66c2e7a3-595bd8de-4c56d2ec\"}"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code 返回message 返回其他字段

10000

成功

token,user

4.1.5. 用户谷歌登录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/auth/login/google' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"google":"123e2r2r2rqfqqe1"}'
http请求
POST /api/v3/auth/login/google HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 29
Host: iot.daconghealth.com

{"google":"123e2r2r2rqfqqe1"}
请求字段说明
Path Type Description

google

String

不能为空,谷歌ID

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 769

{"code":10000,"message":"success","data":{"token":"UFN1c3M3ZFhiZU9zK3ZQV0I2dktROHZqakNnY0wrbG9DOXAxd2xmeDdZUWM2OGNMOE9jNXhEYW40T2ZZZ1BmWHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==","user":{"id":"27","createTime":1724049315000,"updateTime":1724049315000,"description":null,"uuid":"3135a1665df511efba7300ffbec652f6","unionId":null,"openId":null,"openId1":null,"openId11":null,"openId2":null,"openId21":null,"nickname":"谷歌授权用户123e2r2r2rqfqqe1","avatarUrl":null,"mobile":null,"email":null,"google":"123e2r2r2rqfqqe1","facebook":null,"gender":null,"country":null,"province":null,"city":null,"language":null,"age":0,"birthday":null,"height":null,"weight":null,"heartRate":null,"grade":0,"loginStatus":0,"extend":null,"realName":null,"bodyFat":null,"bloodPressure":null}}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.1.6. 用户脸书登录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/auth/login/facebook' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"facebook":"123e2r2r2rqfqqe1"}'
http请求
POST /api/v3/auth/login/facebook HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 31
Host: iot.daconghealth.com

{"facebook":"123e2r2r2rqfqqe1"}
请求字段说明
Path Type Description

facebook

String

不能为空,脸书ID

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 769

{"code":10000,"message":"success","data":{"token":"Ri9tOXlqT2xnQzZzK3ZQV0I2dktROHZqakNnY0wrbG9DOXAxd2xmeDdZUWM2OGNMOE9jNXhLdHh4dzdoMDI4UXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==","user":{"id":"28","createTime":1724049316000,"updateTime":1724049316000,"description":null,"uuid":"3148cb835df511efba7300ffbec652f6","unionId":null,"openId":null,"openId1":null,"openId11":null,"openId2":null,"openId21":null,"nickname":"脸书授权用户123e2r2r2rqfqqe1","avatarUrl":null,"mobile":null,"email":null,"google":null,"facebook":"123e2r2r2rqfqqe1","gender":null,"country":null,"province":null,"city":null,"language":null,"age":0,"birthday":null,"height":null,"weight":null,"heartRate":null,"grade":0,"loginStatus":0,"extend":null,"realName":null,"bodyFat":null,"bloodPressure":null}}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.2. 程序模式

4.2.1. 程序模式列表获取

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/programs?pageNum=1&pageSize=5&type=1&name=%E7%87%83%E8%84%82%E7%98%A6%E8%BA%AB' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNbitqSEhPUGdqT3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/programs?pageNum=1&pageSize=5&type=1&name=%E7%87%83%E8%84%82%E7%98%A6%E8%BA%AB HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNbitqSEhPUGdqT3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

type

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

name

模糊查询名称

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 601

{"code":10000,"message":"success","data":{"total":1,"list":[{"id":"1","type":1,"name":"燃脂瘦身","nameEng":"","cover":"1","distance":5630,"duration":1200,"calorie":402,"work":0,"sort":0,"remarks":"test","createTime":"2021-09-27 14:47:23","updateTime":"2021-09-27 14:47:52","urls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"]}],"pageNum":1,"pageSize":5,"size":1,"startRow":1,"endRow":1,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].name

String

名称

data.list[].nameEng

String

名称(英文)

data.list[].type

Integer

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

data.list[].distance

Integer

总距离,单位:米

data.list[].duration

Integer

总时长,单位:秒

data.list[].calorie

Integer

消耗卡路里,单位:卡

data.list[].cover

String

封面资源,多个用逗号隔开

data.list[].urls

List

封面资源详情列表

data.list[].remarks

String

描述/备注

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.2.2. 程序模式详情获取

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/programs/1/steps' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKcUk3VEw1Y2ZCM3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/programs/1/steps HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKcUk3VEw1Y2ZCM3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 19. /api/v3/programs/{programId}/steps
Parameter Description

programId

程序模式ID

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 760

{"code":10000,"message":"success","data":{"list":[{"id":"1","programId":"1","startIndex":0,"endIndex":5,"value1":13,"value2":2,"remarks":"初始化数据","createTime":"2020-07-14 11:44:12","updateTime":"2022-05-07 11:05:40"},{"id":"2","programId":"1","startIndex":5,"endIndex":10,"value1":14,"value2":3,"remarks":"初始化数据","createTime":"2020-07-14 11:44:46","updateTime":"2022-05-07 11:05:41"},{"id":"3","programId":"1","startIndex":10,"endIndex":15,"value1":8,"value2":4,"remarks":"初始化数据","createTime":"2020-07-14 11:45:01","updateTime":"2022-05-07 11:05:42"},{"id":"4","programId":"1","startIndex":15,"endIndex":20,"value1":15,"value2":5,"remarks":"初始化数据","createTime":"2020-07-14 11:45:14","updateTime":"2022-05-07 11:05:43"}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list[].startIndex

Integer

开始时刻

data.list[].endIndex

Integer

结束时刻

data.list[].value1

Integer

跑步机-速度/单车-阻力

data.list[].value2

Integer

坡度

data.list[].remarks

String

备注

4.3. 实景

4.3.1. 场景列表获取

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/scenes?pageNum=1&pageSize=5&type=1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOMkhOYXdFUmZxeXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/scenes?pageNum=1&pageSize=5&type=1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOMkhOYXdFUmZxeXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

type

实景运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 817

{"code":10000,"message":"success","data":{"total":2,"list":[{"id":"1","name":"地图模式","nameEng":"","type":1,"map":1,"sort":1,"imgUrl":"111","videoUrl":"222","videoUrlEng":"0","info":"333","infoEng":"0","remarks":"初始化数据","createTime":"2020-07-14 11:42:34","updateTime":"2021-09-24 16:13:32"},{"id":"2","name":"北京马拉松","nameEng":"","type":1,"map":0,"sort":2,"imgUrl":"111","videoUrl":"222","videoUrlEng":"0","info":"333","infoEng":"0","remarks":"初始化数据","createTime":"2020-07-14 11:43:17","updateTime":"2021-09-24 16:13:35"}],"pageNum":1,"pageSize":5,"size":2,"startRow":1,"endRow":2,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].name

String

名字

data.list[].nameEng

String

名字(英文)

data.list[].type

Integer

实景运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

data.list[].map

Integer

是否地图模式,0-否,1-是

data.list[].sort

Integer

排序字段

data.list[].imgUrl

String

图片地址

data.list[].videoUrl

String

视频地址

data.list[].videoUrlEng

String

视频地址(英文)

data.list[].info

String

简介

data.list[].infoEng

String

简介(英文)

data.list[].remarks

String

描述/备注

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.4. 微信小程序模块

4.4.1. 小程序登录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/wxApp/wxa32905b90e71aeba/login' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d 'code=003OzmMg2fiBBB0fs5Jg2wCpMg2OzmMS'
http请求
POST /api/v3/wxApp/wxa32905b90e71aeba/login HTTP/1.1
Content-Type: application/json
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com

code=003OzmMg2fiBBB0fs5Jg2wCpMg2OzmMS
path参数
Table 20. /api/v3/wxApp/{appId}/login
Parameter Description

appId

小程序appId,必填

请求参数
Parameter Description

code

微信小程序js_code

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 63

{"code":80001,"message":"微信公众平台异常","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.4.2. 小程序扫码登录跑步机

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/wxApp/login/scan/1865715CD987:1524896380' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKeGUzVTFhY2xTb3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
POST /api/v3/wxApp/login/scan/1865715CD987:1524896380 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKeGUzVTFhY2xTb3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 21. /api/v3/wxApp/login/scan/{qrCode}
Parameter Description

qrCode

二维码内容,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 163

{"code":10000,"message":"success","data":{"XHareToken":"cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDbmNhV1Mxa3paOGd1Y1RDU2FReGdVPQ=="}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.XHareToken

String

token令牌

4.5. 用户模块

用户模块相关的接口。

4.5.1. 获取用户

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOdnh0cE1XVzRnOXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/users HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOdnh0cE1XVzRnOXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 941

{"code":10000,"message":"success","data":{"id":"5","description":"","createTime":"2018-04-23 18:05:01","updateTime":"2023-12-19 14:19:32","uuid":"12dc0225210111ecaef58cec4b8c9904","unionId":"oMZTg1KsXzXw9NxWRsMZDK30rJp4","openId":"oFV3g04R0mLCzBcBCzPtvq4OgYv8","openId1":null,"openId11":null,"openId2":"oqUWF5X5oq1oQbE0sJmdKCPrjQIM","openId21":"oqUWF5X5oq1oQbE0sJmdKCPrjQIM","faceId":"78b9b8b4_2207_4264_98a4_3e4d5ef70768","nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","mobile":null,"email":null,"google":null,"facebook":null,"gender":1,"country":"中国","province":"四川","city":"绵阳","language":"zh_CN","age":40,"birthday":"1984-01-20","height":88,"weight":83,"heartRate":73,"grade":0,"loginStatus":1,"mac":"1865715CD987","extend":"","realName":"","bodyFat":null,"bloodPressure":null,"systemCode":"dc","bindMac":null}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

数据ID

data.unionId

String

微信unionId

data.openId

String

微信openId

data.faceId

String

百度人脸ID

data.mobile

String

电话号码

data.email

String

邮箱地址

data.google

String

Google唯一标示

data.facebook

String

Facebook唯一标示

data.nickname

String

昵称

data.avatarUrl

String

头像URL

data.gender

Integer

1:男性,2:女性,0:未知

data.city

String

所在城市

data.province

String

所在省份

data.country

String

所在国家

data.language

String

用户的语言

data.age

Integer

年龄

data.birthday

Date

出身日期

data.height

Integer

身高

data.weight

Integer

体重

data.heartRate

Integer

心率

data.grade

Integer

用户等级,0:青铜,1:白银,2:黄金,3:钻石,4:王者

data.extend

String

扩展字段

data.realName

String

用户姓名

data.bodyFat

Integer

体脂

data.bloodPressure

Integer

血压

data.systemCode

String

系统代号

data.description

String

描述/备注

data.createTime

Date

创建时间

data.updateTime

Date

更新时间

4.5.2. 更新用户信息

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users' -i -X POST \
    -H 'Content-Type: multipart/form-data' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLdmpCdWZHamhxbXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -F 'file=@1.png;type=image/png' \
    -F 'birthday=1980-12-31' \
    -F 'height=180' \
    -F 'weight=130' \
    -F 'heartRate=80' \
    -F 'faceId=2222aaaaaaaa' \
    -F 'avatarUrl=http://xxx.xxx' \
    -F 'gender=1' \
    -F 'city=绵阳' \
    -F 'province=四川' \
    -F 'country=游仙' \
    -F 'grade=3' \
    -F 'extend={}' \
    -F 'realName=张三' \
    -F 'mobile=18099996666' \
    -F 'bodyFat=20' \
    -F 'bloodPressure=120'
http请求
$ http --form POST 'https://iot.daconghealth.com/api/v3/users' \
    'file'@'1.png' \
    'XHareToken:cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLdmpCdWZHamhxbXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    'birthday=1980-12-31' \
    'height=180' \
    'weight=130' \
    'heartRate=80' \
    'faceId=2222aaaaaaaa' \
    'avatarUrl=http://xxx.xxx' \
    'gender=1' \
    'city=绵阳' \
    'province=四川' \
    'country=游仙' \
    'grade=3' \
    'extend={}' \
    'realName=张三' \
    'mobile=18099996666' \
    'bodyFat=20' \
    'bloodPressure=120'
请求参数
Parameter Description

avatarUrl

头像URL,可以为空

gender

1:男性,2:女性,0:未知,可以为空

city

所在城市,可以为空

province

所在省份,可以为空

country

所在国家,可以为空

birthday

出身日期,可以为空

height

身高,可以为空

weight

体重,可以为空

heartRate

心率,可以为空

grade

用户等级,0:青铜,1:白银,2:黄金,3:钻石,4:王者,可以为空

faceId

百度人脸ID,可以为空

extend

扩展字段,可以为空

realName

姓名,可以为空

mobile

电话号码,可以为空

bodyFat

体脂,百分数整数部分,可以为空

bloodPressure

血压,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.3. 退出登录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/logout/' -i -X PUT \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIdW5xcDJieUltMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
PUT /api/v3/users/logout/ HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIdW5xcDJieUltMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.4. 用户绑定微信账号

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/wx/1111111' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEdzllcjFCRDZUZnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d 'platform=0'
http请求
POST /api/v3/users/wx/1111111 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEdzllcjFCRDZUZnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
Content-Type: application/x-www-form-urlencoded

platform=0
path参数
Table 22. /api/v3/users/wx/{code}
Parameter Description

code

不能为空,微信授权code

path请求参数
Parameter Description

platform

平台,1-ios,0-android,可以为空,默认0

http响应
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 247

{"code":80001,"message":"寰俊鍏紬骞冲彴寮傚父","data":"閿欒浠g爜锛�40029, 閿欒淇℃伅锛歩nvalid code, rid: 66c2e7a9-355122b8-1ad946cf锛屽井淇″師濮嬫姤鏂囷細{\"errcode\":40029,\"errmsg\":\"invalid code, rid: 66c2e7a9-355122b8-1ad946cf\"}"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.5. 用户取消绑定微信账号

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/close/wx' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKL1orTlpybm03cXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
POST /api/v3/users/close/wx HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhKL1orTlpybm03cXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.6. 用户绑定谷歌账号

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/google' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGWnpNWGw2WVhIMHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"google":"13dwevvsavsfdvsa"}'
http请求
POST /api/v3/users/google HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGWnpNWGw2WVhIMHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 29
Host: iot.daconghealth.com

{"google":"13dwevvsavsfdvsa"}
请求字段说明
Path Type Description

google

String

不能为空,谷歌ID

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.7. 用户取消绑定谷歌账号

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/close/google' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJR3NDVFo5cmowcnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
POST /api/v3/users/close/google HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJR3NDVFo5cmowcnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.8. 用户绑定脸书账号

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/facebook' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBL05KL3VtNnVKNHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"facebook":"ac13decfevvsavsfdvsa"}'
http请求
POST /api/v3/users/facebook HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBL05KL3VtNnVKNHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 35
Host: iot.daconghealth.com

{"facebook":"ac13decfevvsavsfdvsa"}
请求字段说明
Path Type Description

facebook

String

不能为空,脸书ID

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.9. 用户取消绑定脸书账号

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/close/facebook' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLSThqaC9yWE8zL3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
POST /api/v3/users/close/facebook HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLSThqaC9yWE8zL3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.10. 绑定邮箱

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/bind/email' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhONDJYZnhWRWVPeXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhou2@163.com"}'
http请求
POST /api/v3/users/bind/email HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhONDJYZnhWRWVPeXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 71
Host: iot.daconghealth.com

{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhou2@163.com"}
请求字段说明
Path Type Description

email

String

不能为空,邮箱地址

password

String

不能为空,原登录密码,MD5加密后

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.11. 解绑邮箱

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/close/email' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOZXQ2dDE2MzlJUHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
POST /api/v3/users/close/email HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOZXQ2dDE2MzlJUHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.12. 用户活跃上报

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/online' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGdm9wWCs1dy9CWnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
POST /api/v3/users/online HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGdm9wWCs1dy9CWnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.13. 查询用户是否关注公众号

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/subscribe' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMK1NsdENjTTVvdXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/users/subscribe HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMK1NsdENjTTVvdXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 43

{"code":10000,"message":"success","data":1}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

1-关注,0-未关注

4.5.14. 用户注销

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/close' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIQ3Azek9aNHljQnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
POST /api/v3/users/close HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIQ3Azek9aNHljQnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.15. 上传头像图片

使用"multipart/form-data"的Content-Type进行上传,上传文件对应的form-data的key为"file"。

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/users/avatar' -i -X POST \
    -H 'Content-Type: multipart/form-data' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPVElEUnp1STM5dXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -F 'file=@1.png;type=image/png'
http请求
$ http --form POST 'https://iot.daconghealth.com/api/v3/users/avatar' \
    'file'@'1.png' \
    'XHareToken:cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPVElEUnp1STM5dXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 91

{"code":10000,"message":"success","data":"192.168.16.62/api/file/dc/png_1724049322664.png"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.5.16. 用户注销账号

通过邮箱和密码注销账号

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/users/close/account' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhou2@163.com"}'
http请求
POST /api/v3/common/users/close/account HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 71
Host: iot.daconghealth.com

{"password":"e10adc3949ba59abbe56e057f20f883e","email":"zhou2@163.com"}
请求字段说明
Path Type Description

email

String

不能为空,邮箱地址

password

String

不能为空,原登录密码,MD5加密后

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 54

{"code":20004,"message":"用户不存在","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.6. 设备模块

设备模块相关的接口。

4.6.1. 查询设备列表

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/devices/list?pageNum=1&pageSize=5&keyWord=%E8%B7%91%E6%AD%A5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEUGViNXFuUnkzUXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/devices/list?pageNum=1&pageSize=5&keyWord=%E8%B7%91%E6%AD%A5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEUGViNXFuUnkzUXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

keyWord

设备名称,可以为空,用作模糊查询

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1023

{"code":200,"message":"success","data":{"total":5,"list":[{"longitude":104.705022,"latitude":31.471422,"name":"跑步机1号","mac":"54E1AD3160EE","address":"园艺山创新中心2期","using":true},{"longitude":104.705022,"latitude":31.471422,"name":"跑步机2号","mac":"54E1AD31B05F","address":"园艺山创新中心2期","using":false},{"longitude":104.705022,"latitude":31.471422,"name":"跑步机","mac":"1865715CDA31","address":"园艺山创新中心2期","using":false},{"longitude":104.705022,"latitude":31.471422,"name":"跑步机","mac":"1865715CD987","address":"园艺山创新中心2期","using":true},{"longitude":104.705022,"latitude":31.471422,"name":"真实跑步机504","mac":"1865714D268F","address":"园艺山创新中心2期","using":false}],"pageNum":1,"pageSize":5,"size":5,"startRow":1,"endRow":5,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].longitude

Double

经度

data.list[].latitude

Double

纬度

data.list[].name

String

设备名称

data.list[].mac

String

设备名称

data.list[].address

String

具体地址

data.list[].using

Boolean

是否使用中

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.6.2. 查询用户绑定的设备列表

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/devices' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGWm1JaUVWN0JZVXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/devices HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGWm1JaUVWN0JZVXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1031

{"code":10000,"message":"success","data":{"list":[{"id":"1","userId":"5","mac":"54E1AD3160EE","name":"我的跑步机1","lastOnlineTime":"2020-07-15 13:56:34","remarks":"测试数据","createTime":"2020-07-15 13:56:41","updateTime":"2020-07-15 13:56:41","type":1,"firmwareVersion":"V202001"},{"id":"2","userId":"5","mac":"4A3633074200","name":"我的力量训练器1","lastOnlineTime":"2020-07-15 13:57:37","remarks":"测试数据","createTime":"2020-07-15 13:57:42","updateTime":"2020-07-15 13:57:42","type":2,"firmwareVersion":"V202001"},{"id":"4","userId":"5","mac":"1865715CD98B","name":"我的单车","lastOnlineTime":"2020-07-16 10:41:57","remarks":"测试数据","createTime":"2020-07-16 10:41:57","updateTime":"2020-07-16 10:41:57","type":3,"firmwareVersion":"3.2.2.01_xmore"},{"id":"5","userId":"5","mac":"54E2AD31B05F","name":"我的跳绳神器","lastOnlineTime":"2020-07-16 10:42:18","remarks":"测试数据","createTime":"2020-07-16 10:42:18","updateTime":"2020-07-16 10:42:18","type":4,"firmwareVersion":"V202001"}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].mac

String

经度

data.list[].type

Integer

终端类型(0-未知,1-跑步机,2-撸铁设备,3-单车,4-跳绳)

data.list[].name

String

绑定设备昵称

data.list[].firmwareVersion

String

固件版本

data.list[].lastOnlineTime

String

上次连接时间

data.list[].userId

String

用户id

data.list[].createTime

Date

创建时间

data.list[].updateTime

Date

修改时间

data.list[].remarks

String

描述/备注

4.6.3. 查询用户最后使用的设备

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/devices/last' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhINVAzSFcrbURsQ3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/devices/last HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhINVAzSFcrbURsQ3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 285

{"code":10000,"message":"success","data":{"id":"5","userId":"5","mac":"54E2AD31B05F","name":"我的跳绳神器","lastOnlineTime":"2020-07-16 10:42:18","remarks":"测试数据","createTime":"2020-07-16 10:42:18","updateTime":"2020-07-16 10:42:18","type":4,"firmwareVersion":"V202001"}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

数据ID

data.mac

String

经度

data.type

Integer

终端类型(0-未知,1-跑步机,2-撸铁设备,3-单车,4-跳绳)

data.name

String

绑定设备昵称

data.firmwareVersion

String

固件版本

data.lastOnlineTime

String

上次连接时间

data.userId

String

用户id

data.createTime

Date

创建时间

data.updateTime

Date

更新时间

data.remarks

String

描述/备注

4.6.4. 用户绑定设备

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/devices/bind' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIdnZnVThUbHdPSnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"address":"海淀中街","province":"北京市","city":"北京市","latitude":"37.0210","name":"我的设备","county":"海淀区","type":"1","firmwareVersion":"V20200715","mac":"1234567890","remarks":"测试","longitude":"100.0025"}'
http请求
POST /api/v3/devices/bind HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIdnZnVThUbHdPSnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 234
Host: iot.daconghealth.com

{"address":"海淀中街","province":"北京市","city":"北京市","latitude":"37.0210","name":"我的设备","county":"海淀区","type":"1","firmwareVersion":"V20200715","mac":"1234567890","remarks":"测试","longitude":"100.0025"}
请求字段说明
Path Type Description

mac

String

设备mac不能为空

type

Integer

终端类型(0-未知,1-跑步机,2-撸铁设备,3-单车,4-跳绳)

name

Integer

绑定设备昵称

firmwareVersion

Integer

固件版本

province

Integer

所在省

city

Integer

所在市

county

Integer

所在区县

address

String

详细地址

latitude

String

纬度

longitude

String

经度

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.6.5. 用户解绑设备

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/devices/unbind' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNczFqOS94YmFKK3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"mac":"54E2AD31B05F"}'
http请求
POST /api/v3/devices/unbind HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNczFqOS94YmFKK3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 22
Host: iot.daconghealth.com

{"mac":"54E2AD31B05F"}
请求字段说明
Path Type Description

mac

String

设备mac不能为空

type

Integer

终端类型(0-未知,1-跑步机,2-撸铁设备,3-单车,4-跳绳)

name

Integer

绑定设备昵称

firmwareVersion

Integer

固件版本

province

Integer

所在省

city

Integer

所在市

county

Integer

所在区县

address

String

详细地址

latitude

String

纬度

longitude

String

经度

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.6.6. 上报设备信息

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/devices/info' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"softVersion":"V_14_1.1.4","address":"xxx","centralControllerVersion":"0.26 FC_62","city":"温州","serialVersion":"V_3_1.3","latitude":0,"county":"xxx","mute":0,"type":1,"resolution":"1920*1080","mac":"54E1AD3160EE","manufacturer":"正星","volume":50,"positionVersion":"v1.0.0","screenSize":"30c","hardVersion":"Android_19_4.4.2","province":"浙江","faceVersion":"V_6_1.6","diskSpace":652374016,"lowerControllerVersion":"1","model":"JW_TPV3188_195T_A01T","firmwareVersion":"3.2.2.01_xmore","longitude":0}'
http请求
POST /api/v3/common/devices/info HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 508
Host: iot.daconghealth.com

{"softVersion":"V_14_1.1.4","address":"xxx","centralControllerVersion":"0.26 FC_62","city":"温州","serialVersion":"V_3_1.3","latitude":0,"county":"xxx","mute":0,"type":1,"resolution":"1920*1080","mac":"54E1AD3160EE","manufacturer":"正星","volume":50,"positionVersion":"v1.0.0","screenSize":"30c","hardVersion":"Android_19_4.4.2","province":"浙江","faceVersion":"V_6_1.6","diskSpace":652374016,"lowerControllerVersion":"1","model":"JW_TPV3188_195T_A01T","firmwareVersion":"3.2.2.01_xmore","longitude":0}
请求字段说明
Path Type Description

mac

String

MAC地址

softVersion

String

软件版本

hardVersion

String

硬件版本

firmwareVersion

String

固件版本

type

Integer

终端类型(0-未知,1-跑步机,2-撸铁设备,3-单车,4-跳绳)

model

String

设备型号

resolution

String

设备分辨率

diskSpace

Integer

磁盘空间

volume

Integer

音量

mute

Integer

是否静音,0:否 1:是

faceVersion

String

人脸识别版本

serialVersion

String

serial版本

positionVersion

String

位置版本号

centralControllerVersion

String

上控版本号

lowerControllerVersion

String

下控版本号

manufacturer

String

设备制造商

screenSize

Integer

屏幕尺寸

province

String

设备所在省份

city

Integer

设备所在城市

county

Integer

设备所在区县

address

Integer

设备所在具体地址

latitude

String

设备所在经度

longitude

String

设备所在纬度

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.6.7. 查询所属运营商的手机号

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/devices/54E1AD3160EE/operator/mobile' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/common/devices/54E1AD3160EE/operator/mobile HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 23. /api/v3/common/devices/{mac}/operator/mobile
Parameter Description

mac

设备的mac,去除冒号,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 55

{"code":10000,"message":"success","data":"13778116426"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.7. 运动数据上报模块

运动数据上报模块相关的接口。

4.7.1. 上报跑步记录

跑步时长超过30S才上传

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/running/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOcDB0TTM3U3I4eHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"distance":100,"runTypeId":1,"recordList":"{}","minkm":"5.6,7.8,8.9,3.1,3.5,6.5,7.1","runType":1,"maxSpeed":5.6,"userId":5,"steps":200,"maxGradient":0,"mac":"54E1AD3160EE","avgSpeed":4.2,"duration":420,"minHeartRate":80,"calorie":50,"startTime":0,"minGradient":0,"minSpeed":3.1,"maxHeartRate":150,"avgHeartRate":120,"avgGradient":0,"height":0}'
http请求
POST /api/v3/running/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOcDB0TTM3U3I4eHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 344
Host: iot.daconghealth.com

{"distance":100,"runTypeId":1,"recordList":"{}","minkm":"5.6,7.8,8.9,3.1,3.5,6.5,7.1","runType":1,"maxSpeed":5.6,"userId":5,"steps":200,"maxGradient":0,"mac":"54E1AD3160EE","avgSpeed":4.2,"duration":420,"minHeartRate":80,"calorie":50,"startTime":0,"minGradient":0,"minSpeed":3.1,"maxHeartRate":150,"avgHeartRate":120,"avgGradient":0,"height":0}
请求字段说明
Path Type Description

userId

String

用户ID,不能为空

runType

Integer

101-快速启动,102-距离目标跑,103-时间目标跑,104-卡路里目标跑,105-实景模式跑,106-程序模式跑,107-计划跑,108-课程跑

runTypeId

Long

跑步类型ID,快速跑无值,其他的对应各类型id

mac

String

MAC地址,不能为空

startTime

Date

开始时间

duration

Integer

跑步时长

distance

Float

跑步距离

steps

Integer

步数

calorie

Float

热量

maxSpeed

Float

最大速度

minSpeed

Float

最小速度

avgSpeed

Float

平均速度

maxHeartRate

Integer

最大心率

minHeartRate

Integer

最小心率

avgHeartRate

Integer

平均心率

maxGradient

Integer

最大坡度

minGradient

Integer

最小坡度

avgGradient

Integer

平均坡度

recordList

String

运动记录明细数据

height

Float

爬升高度

minkm

String

每分钟配速

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.7.2. 上传力量训练记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/strength/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEdm9aSHZWMTJ3a3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"completion":99,"work":100,"isDone":1,"gapNumber":1,"totalKg":200,"maxKg":80,"version":"1","mac":"1234567890","distributions":[{"number":10,"kg":20},{"number":10,"kg":20}],"sportModeType":1,"distribution2":"内容app定","duration":2000,"number":50,"maxValidKg":60,"record":"{\"data\":[{\"unit\":\"分钟\",\"titile\":\"运动时间\",\"id\":0},{\"unit\":\"KM\",\"titile\":\"运动距离\",\"id\":1},{\"unit\":\"千卡\",\"titile\":\"消耗卡路里\",\"id\":2}]}","targetValue":1,"calorie":3000,"startTime":"2020-07-08 10:00:00","gapGroup":1,"maxPower":100,"remarks":"测试"}'
http请求
POST /api/v3/strength/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEdm9aSHZWMTJ3a3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 578
Host: iot.daconghealth.com

{"completion":99,"work":100,"isDone":1,"gapNumber":1,"totalKg":200,"maxKg":80,"version":"1","mac":"1234567890","distributions":[{"number":10,"kg":20},{"number":10,"kg":20}],"sportModeType":1,"distribution2":"内容app定","duration":2000,"number":50,"maxValidKg":60,"record":"{\"data\":[{\"unit\":\"分钟\",\"titile\":\"运动时间\",\"id\":0},{\"unit\":\"KM\",\"titile\":\"运动距离\",\"id\":1},{\"unit\":\"千卡\",\"titile\":\"消耗卡路里\",\"id\":2}]}","targetValue":1,"calorie":3000,"startTime":"2020-07-08 10:00:00","gapGroup":1,"maxPower":100,"remarks":"测试"}
请求字段说明
Path Type Description

mac

String

运动设备mac不能为空

startTime

date

运动开始日期

work

Integer

运动所做的功,单位:焦

number

Integer

次数,单位:次

duration

Integer

运动时长,单位:秒

calorie

Integer

热量,单位:kcal

totalKg

Integer

累积重量,单位: kg*10

maxKg

Integer

最大重量,单位:kg * 10

maxValidKg

Integer

最大有效重量,单位:kg * 10

maxPower

Integer

最大功率,单位:w

record

String

运动记录明细数据

distributions

JSONArray

重量分布情况

distributions[].kg

Integer

重量,单位:kg * 10

distributions[].number

Integer

次数,单位:次

remarks

String

备注

sportModeType

Integer

运动模式

targetValue

Integer

目标运动的运动目标值

isDone

Integer

目标运动是否完成,0-未完成,1-已完成

gapGroup

Integer

间隙训练组数

gapNumber

Integer

间隙训练次数

completion

Integer

完成度 0-100 节律训练才有此字段

distribution2

String

新分布情况

version

String

数据版本号,新版传1,老版默认0

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.7.3. 上传单车运动记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/bicycle/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJOTVsdWF6SGhvYXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"avgRotationRate":10,"avgPower":10,"distance":100,"successRate":95,"type":101,"mac":"1865715CD98B","duration":420,"record":"{}","calorie":50,"startTime":"2024-08-19 14:35:16","maxPower":19,"programId":"1","remarks":"测试上传"}'
http请求
POST /api/v3/bicycle/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJOTVsdWF6SGhvYXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 231
Host: iot.daconghealth.com

{"avgRotationRate":10,"avgPower":10,"distance":100,"successRate":95,"type":101,"mac":"1865715CD98B","duration":420,"record":"{}","calorie":50,"startTime":"2024-08-19 14:35:16","maxPower":19,"programId":"1","remarks":"测试上传"}
请求字段说明
Path Type Description

mac

String

MAC地址,不能为空

startTime

Date

开始时间

duration

Integer

运动时长,单位:秒

distance

Integer

运动距离,单位:米

calorie

Integer

热量,单位:kcal

avgPower

Integer

平均功率,单位:w

maxPower

Integer

最大功率,单位:w

avgRotationRate

Integer

平均转速

type

Integer

101-自由骑行,102-距离倒计模式,103-时间倒计模式,104-卡路里倒计模式,105-实景模式,106-程序模式

programId

String

程序模式程序ID

successRate

Integer

达标率,与程序模式相关

record

String

运动记录明细数据

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.7.4. 上传跳绳运动记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/jump/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJOG5VL1d0QnpzbXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"duration":200,"number":1000,"maxFrequency":50,"avgFrequency":50,"record":"{}","calorie":3000,"startTime":"2020-07-08 10:00:00","type":0,"mac":"1234567890","remarks":"测试"}'
http请求
POST /api/v3/jump/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJOG5VL1d0QnpzbXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 176
Host: iot.daconghealth.com

{"duration":200,"number":1000,"maxFrequency":50,"avgFrequency":50,"record":"{}","calorie":3000,"startTime":"2020-07-08 10:00:00","type":0,"mac":"1234567890","remarks":"测试"}
请求字段说明
Path Type Description

mac

String

运动设备mac不能为空

startTime

date

运动开始日期

number

Integer

跳绳个数,单位:个

duration

Integer

运动时长,单位:秒

calorie

Integer

热量,单位:kcal

maxFrequency

Integer

最大频次,单位:个

avgFrequency

Integer

平均频次,单位:个

type

Integer

跳绳类型:0-自由跳,1-时间倒计模式,2-个数倒计模式

record

String

运动记录明细数据

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.7.5. 上传拉绳运动记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/pull/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPSlNyL0RLc2V1a3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"maxFrequency":50,"avgFrequency":50,"groupNum":10,"type":0,"mac":"1234567890","duration":200,"number":1000,"record":"{}","calorie":3000,"startTime":"2020-07-08 10:00:00","groupData":"{}","avgHeartRate":50,"remarks":"测试"}'
http请求
POST /api/v3/pull/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPSlNyL0RLc2V1a3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 225
Host: iot.daconghealth.com

{"maxFrequency":50,"avgFrequency":50,"groupNum":10,"type":0,"mac":"1234567890","duration":200,"number":1000,"record":"{}","calorie":3000,"startTime":"2020-07-08 10:00:00","groupData":"{}","avgHeartRate":50,"remarks":"测试"}
请求字段说明
Path Type Description

mac

String

运动设备mac不能为空

startTime

date

运动开始日期

number

Integer

跳绳个数,单位:个

duration

Integer

运动时长,单位:秒

calorie

Integer

热量,单位:kcal

maxFrequency

Integer

最大频次,单位:个

avgFrequency

Integer

平均频次,单位:个

avgHeartRate

Integer

平均心率

type

Integer

跳绳类型:0-自由跳,1-时间倒计模式,2-个数倒计模式

groupNum

Integer

组数

groupData

String

组数数据

record

String

运动记录明细数据

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.7.6. 上传划船器运动记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/rowing/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGZEZkUVVBbStsbHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"avgPower":10,"distance":100,"avgFrequency":10,"type":11,"params":"30","mac":"AA65715CD98B","avgSpeed":10,"duration":420,"mode":1,"number":10,"record":"{}","calorie":50,"startTime":"2024-08-19 14:35:24","maxPower":19,"remarks":"测试上传"}'
http请求
POST /api/v4/rowing/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGZEZkUVVBbStsbHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 243
Host: iot.daconghealth.com

{"avgPower":10,"distance":100,"avgFrequency":10,"type":11,"params":"30","mac":"AA65715CD98B","avgSpeed":10,"duration":420,"mode":1,"number":10,"record":"{}","calorie":50,"startTime":"2024-08-19 14:35:24","maxPower":19,"remarks":"测试上传"}
请求字段说明
Path Type Description

mac

String

MAC地址,不能为空

startTime

Date

开始时间

duration

Integer

运动时长,单位:秒

distance

Integer

运动距离,单位:米

calorie

Integer

热量,单位:kcal

avgFrequency

Integer

平均频次

number

Integer

次数

avgSpeed

Integer

平均速度,单位:km/h

avgPower

Integer

平均功率,单位:w

maxPower

Integer

最大功率,单位:w

mode

Integer

模式:0-自由划,1-目标模式,2-专业模式,3-竞技模式,4-训练模式

type

Integer

模式下的类型

params

String

具体模式参数,多个参数用逗号隔开

record

String

运动记录明细数据

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.7.7. 上传楼梯机运动记录

所有数据转成int存储

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/stair/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMNG5MOTdGTkxSTHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"speedMax":15,"frequencyMax":15,"heartRateMax":15,"type":0,"mac":"1234567890","duration":200,"speedAvg":10,"speedMin":8,"record":"{}","calorie":3000,"startTime":"2020-07-08 10:00:00","step":10,"frequencyAvg":10,"frequencyMin":8,"floor":10,"heartRateAvg":10,"heartRateMin":8,"remarks":"测试","height":10.25}'
http请求
POST /api/v3/stair/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMNG5MOTdGTkxSTHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 309
Host: iot.daconghealth.com

{"speedMax":15,"frequencyMax":15,"heartRateMax":15,"type":0,"mac":"1234567890","duration":200,"speedAvg":10,"speedMin":8,"record":"{}","calorie":3000,"startTime":"2020-07-08 10:00:00","step":10,"frequencyAvg":10,"frequencyMin":8,"floor":10,"heartRateAvg":10,"heartRateMin":8,"remarks":"测试","height":10.25}
请求字段说明
Path Type Description

mac

String

运动设备mac不能为空

startTime

date

运动开始日期

height

BigDecimal

高度,2位小数

duration

Integer

运动时长

calorie

Integer

热量

step

Integer

步数

floor

Integer

楼层

speedAvg

Integer

平均速度

speedMax

Integer

最大速度

speedMin

Integer

最小速度

heartRateAvg

Integer

平均心率

heartRateMax

Integer

最大心率

heartRateMin

Integer

最小心率

frequencyAvg

Integer

平均步频

frequencyMax

Integer

最大步频

frequencyMin

Integer

最小步频

type

Integer

运动类型:0-快速启动,1-时间模式,2-高度模式,3-卡路里模式,4-程序模式,5-心率模式,6-竞技模式

record

String

运动记录明细数据

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.7.8. 上传力量测试记录

返回当次训练的排名

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/strength/test/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHQ256bmVHT0MxUXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"duration":2000,"startTime":"2020-07-08 10:00:00","kg":100,"mac":"4A3633074200","remarks":"测试","height":100}'
http请求
POST /api/v3/strength/test/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHQ256bmVHT0MxUXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 113
Host: iot.daconghealth.com

{"duration":2000,"startTime":"2020-07-08 10:00:00","kg":100,"mac":"4A3633074200","remarks":"测试","height":100}
请求字段说明
Path Type Description

mac

String

运动设备mac不能为空

startTime

date

运动开始日期

kg

Integer

重量,单位:kg*10

height

Integer

高度

duration

Integer

运动时长,单位:秒

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 384

{"code":10000,"message":"success","data":{"id":"5","userId":"5","mac":"4A3633074200","startTime":"2024-08-19 14:35:21","kg":100,"height":100,"duration":2000,"remarks":"测试","createTime":"2024-08-19 14:35:21","rankNo":1,"nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132"}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.7.9. 攀爬机运动记录上报

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/climber/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHdWpMK0Z4SU9GWXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"avgPower":10,"distance":100,"successRate":95,"type":101,"mac":"DD65715CD98B","duration":420,"record":"{}","calorie":50,"startTime":"2024-08-19 14:35:24","step":10,"maxPower":19,"programId":"1","remarks":"测试上传"}'
http请求
POST /api/v4/climber/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHdWpMK0Z4SU9GWXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 220
Host: iot.daconghealth.com

{"avgPower":10,"distance":100,"successRate":95,"type":101,"mac":"DD65715CD98B","duration":420,"record":"{}","calorie":50,"startTime":"2024-08-19 14:35:24","step":10,"maxPower":19,"programId":"1","remarks":"测试上传"}
请求字段说明
Path Type Description

mac

String

MAC地址,不能为空

startTime

Date

开始时间

duration

Integer

运动时长,单位:秒

distance

Integer

运动距离,单位:米

calorie

Integer

热量,单位:kcal

step

Integer

步数

avgPower

Integer

平均功率,单位:w

maxPower

Integer

最大功率,单位:w

type

Integer

101-自由骑行,102-距离倒计模式,103-时间倒计模式,104-卡路里倒计模式,105-实景模式,106-程序模式

programId

String

程序模式程序ID

successRate

Integer

达标率,与程序模式相关

record

String

运动记录明细数据

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.8. 运动数据

所有运动数据查询相关接口。

4.8.1. 查询运动总的统计数据

我的页面-总运动数据使用

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/total' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHc1BkMmVaSjVObnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/total HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHc1BkMmVaSjVObnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 745

{"code":10000,"message":"success","data":{"calorie":79,"duration":3372,"times":106,"continuousDays":0,"totalDays":5,"list":[{"id":"526","type":1,"userId":"5","calorie":63,"duration":3325,"times":5,"distance":1611,"work":0,"number":0,"remarks":null,"createTime":"2022-09-08 14:44:50","updateTime":"2024-03-04 10:57:47","value":1611},{"id":"22859","type":3,"userId":"5","calorie":6,"duration":37,"times":0,"distance":566,"work":0,"number":0,"remarks":null,"createTime":"2023-08-31 16:48:35","updateTime":"2024-03-04 10:57:47","value":6},{"id":"40175","type":2,"userId":"5","calorie":10,"duration":10,"times":101,"distance":10,"work":10,"number":10,"remarks":null,"createTime":"2024-01-03 15:13:53","updateTime":"2024-03-04 10:57:47","value":10}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.duration

Integer

时长

data.calorie

Integer

热量

data.times

Integer

运动次数

data.continuousDays

Integer

连续运动天数

data.totalDays

Integer

总共运动天数

data.list

List

分运动的记录

4.8.2. 查询运动今天的统计数据

开始运动界面使用

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/today?type=1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLalJsenY4am1tQXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/today?type=1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLalJsenY4am1tQXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 318

{"code":10000,"message":"success","data":{"id":"12","type":1,"userId":"5","calorie":50,"duration":420,"times":1,"distance":100,"work":0,"number":0,"date":"2024-08-19","dateStr":null,"remarks":null,"createTime":"2024-08-19 14:35:20","updateTime":"2024-08-19 14:35:20","startDate":null,"endDate":null,"operatorId":null}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.calorie

Integer

热量,单位:kcal

data.duration

Integer

运动时长,单位:秒

data.times

Integer

运动次数,单位:次

data.distance

Integer

运动距离,单位:米

data.work

Integer

运动所做的功,单位:焦

data.number

Integer

个数,单位:个

data.date

Date

日期

4.8.3. 查询运动记录

运动数据页(详细)使用

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/record?pageNum=1&pageSize=5&type=1&from=2020-07-01&to=2020-08-01' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDNnlCSVlabkk1b3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/record?pageNum=1&pageSize=5&type=1&from=2020-07-01&to=2020-08-01 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDNnlCSVlabkk1b3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

type

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

from

开始日期,格式必须为:yyyy-MM-dd

to

截止日期,格式必须为:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 734

{"code":10000,"message":"success","data":{"total":1,"list":[{"id":"1","nickname":"pk","startTime":"2020-07-09 14:33:26","duration":10,"distance":10.0,"steps":1000,"calorie":100.0,"maxSpeed":5.0,"minSpeed":4.0,"avgSpeed":4.0,"maxHeartRate":100,"minHeartRate":60,"avgHeartRate":80,"maxGradient":0,"minGradient":0,"avgGradient":0,"height":0.0,"minkm":null,"systemCode":"dc","recordList":null,"paceRecord":null,"sportsType":1,"device":{"name":"我的跑步机1","hasScreen":1}}],"pageNum":1,"pageSize":5,"size":1,"startRow":1,"endRow":1,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.8.4. 查询运动统计数据

运动数据页(详细)使用

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/statistics?pageNum=1&pageSize=5&period=1&type=1&from=2020-07-01&to=2020-08-01' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNVzZqQmExSk1oRXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/statistics?pageNum=1&pageSize=5&period=1&type=1&from=2020-07-01&to=2020-08-01 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNVzZqQmExSk1oRXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

period

1-按天数据,2-按周数据,3-按月数据,4-按年数据

type

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

from

开始日期,格式必须为:yyyy-MM-dd

to

截止日期,格式必须为:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1543

{"code":10000,"message":"success","data":{"total":32,"list":[{"id":null,"type":null,"userId":null,"calorie":0,"duration":0,"times":0,"distance":0,"work":0,"number":0,"date":null,"dateStr":"2020-07-01","remarks":null,"createTime":null,"updateTime":null,"startDate":null,"endDate":null,"operatorId":null},{"id":null,"type":null,"userId":null,"calorie":0,"duration":0,"times":0,"distance":0,"work":0,"number":0,"date":null,"dateStr":"2020-07-02","remarks":null,"createTime":null,"updateTime":null,"startDate":null,"endDate":null,"operatorId":null},{"id":null,"type":null,"userId":null,"calorie":0,"duration":0,"times":0,"distance":0,"work":0,"number":0,"date":null,"dateStr":"2020-07-03","remarks":null,"createTime":null,"updateTime":null,"startDate":null,"endDate":null,"operatorId":null},{"id":null,"type":null,"userId":null,"calorie":0,"duration":0,"times":0,"distance":0,"work":0,"number":0,"date":null,"dateStr":"2020-07-04","remarks":null,"createTime":null,"updateTime":null,"startDate":null,"endDate":null,"operatorId":null},{"id":null,"type":null,"userId":null,"calorie":0,"duration":0,"times":0,"distance":0,"work":0,"number":0,"date":null,"dateStr":"2020-07-05","remarks":null,"createTime":null,"updateTime":null,"startDate":null,"endDate":null,"operatorId":null}],"pageNum":1,"pageSize":5,"size":5,"startRow":1,"endRow":5,"pages":7,"prePage":0,"nextPage":2,"isFirstPage":true,"isLastPage":false,"hasPreviousPage":false,"hasNextPage":true,"navigatePages":8,"navigatepageNums":[1,2,3,4,5,6,7],"navigateFirstPage":1,"navigateLastPage":7}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

4.8.5. 查询运动排名记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/rank?pageNum=1&pageSize=5&period=0&type=10' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPMWtyQnFkWCtMVXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/rank?pageNum=1&pageSize=5&period=0&type=10 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPMWtyQnFkWCtMVXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

period

0-全部数据,1-按天数据,2-按周数据,3-按月数据,4-按年数据

type

运动类型,0-全部运动,1-跑步机,2-撸铁设备,3-单车,4-跳绳

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 320

{"code":10000,"message":"success","data":{"total":0,"list":[],"pageNum":1,"pageSize":5,"size":0,"startRow":0,"endRow":0,"pages":0,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[],"navigateFirstPage":0,"navigateLastPage":0}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.8.6. 查询用户的运动排名记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/rank/user?period=1&type=1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQaDVOR3RyWmxaeHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/rank/user?period=1&type=1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQaDVOR3RyWmxaeHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

period

0-全部数据,1-按天数据,2-按周数据,3-按月数据,4-按年数据

type

运动类型,0-全部运动,1-跑步机,2-撸铁设备,3-单车,4-跳绳

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 46

{"code":10000,"message":"success","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.8.7. 查询运动记录(单条运动记录)

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/record/info?key=8&type=1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBbWpwbnZaNWFpbHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/record/info?key=8&type=1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBbWpwbnZaNWFpbHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

key

记录id

type

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 692

{"code":10000,"message":"success","data":{"id":"8","nickname":"流年","startTime":"2022-09-23 08:17:07","duration":49,"distance":115.0,"steps":0,"calorie":8.1,"maxSpeed":9.0,"minSpeed":1.0,"avgSpeed":8.4,"maxHeartRate":0,"minHeartRate":0,"avgHeartRate":0,"maxGradient":0,"minGradient":0,"avgGradient":0,"height":0.0,"minkm":"7'6\"","systemCode":"dc","recordList":"{speed=1.0, grade=0, rate=0, distance=0, time=1},{speed=9.0, grade=0, rate=0, distance=8, time=6},{speed=9.0, grade=0, rate=0, distance=20, time=11},{speed=9.0, grade=0, rate=0, distance=33, time=16},{speed=9.0, grade=0, rate=0, distance=115, time=49}","paceRecord":null,"sportsType":1,"device":{"name":null,"hasScreen":null}}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.8.8. 查询最近(周/月/年)的统计数据

新增最近全部统计数据类别

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/recently?type=1&period=2' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPTnJHMlNXN0VVMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/recently?type=1&period=2 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPTnJHMlNXN0VVMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

type

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

period

0-全部数据,2-按周数据,3-按月数据,4-按年数据

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 296

{"code":10000,"message":"success","data":{"id":null,"type":null,"userId":null,"calorie":50,"duration":420,"times":1,"distance":100,"work":0,"number":0,"date":null,"dateStr":null,"remarks":null,"createTime":null,"updateTime":null,"startDate":"2024-08-12","endDate":"2024-08-19","operatorId":null}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.calorie

Integer

热量,单位:kcal

data.duration

Integer

运动时长,单位:秒

data.times

Integer

运动次数,单位:次

data.distance

Integer

运动距离,单位:米

data.work

Integer

运动所做的功,单位:焦

data.number

Integer

个数,单位:个

4.8.9. 查询实时排名

基于redis的实时排名机制

实时排名机制:
1、 初始拉取排名,显示3个用户,当前用户在第二位;
2、 更新:
1) 当前用户超越上一用户重新拉取排名
2) 每隔2分钟拉取一次排名
3、 未完成跑步时拉取排名逻辑:带上当次运动距离,拉取用户排名(如1中结构),后台数据库当前用户数据未更新;
4、 运动完成,提交运动数据,后台更新运动数据;

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/rank/realtime?value=0&type=5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPZW1GMGs5RDZDWHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/rank/realtime?value=0&type=5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPZW1GMGs5RDZDWHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

type

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

value

分运动的排名数据临时值

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 433

{"code":10000,"message":"success","data":{"list":[{"type":null,"userId":"5","nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","value":3000,"rankNo":1},{"type":null,"userId":"968","nickname":null,"avatarUrl":null,"value":59,"rankNo":2},{"type":null,"userId":"2163","nickname":null,"avatarUrl":null,"value":27,"rankNo":3}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.8.10. 查询排行榜

基于redis的实时排名机制

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/rank/list?pageSize=2&type=5&pageNum=3' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPbkdCdk5FRGNKMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/rank/list?pageSize=2&type=5&pageNum=3 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPbkdCdk5FRGNKMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

type

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

pageSize

每页数据条数

pageNum

页码,第一页页码为1,如果不填显示当前用户所在页

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 490

{"code":10000,"message":"success","data":{"total":6,"list":[{"type":null,"userId":"1309","nickname":null,"avatarUrl":null,"value":6,"rankNo":4},{"type":null,"userId":"2077","nickname":null,"avatarUrl":null,"value":1,"rankNo":5}],"pageNum":3,"pageSize":2,"size":2,"startRow":0,"endRow":0,"pages":3,"prePage":0,"nextPage":0,"isFirstPage":false,"isLastPage":false,"hasPreviousPage":true,"hasNextPage":false,"navigatePages":0,"navigatepageNums":null,"navigateFirstPage":0,"navigateLastPage":0}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.8.11. 查询Top榜

基于redis的实时排名机制

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/sports/rank/top?top=10&type=5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMQzNZb1E4eDBCbnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/sports/rank/top?top=10&type=5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMQzNZb1E4eDBCbnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

type

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

top

top数量

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 686

{"code":10000,"message":"success","data":{"list":[{"type":null,"userId":"5","nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","value":3000,"rankNo":1},{"type":null,"userId":"968","nickname":null,"avatarUrl":null,"value":59,"rankNo":2},{"type":null,"userId":"2163","nickname":null,"avatarUrl":null,"value":27,"rankNo":3},{"type":null,"userId":"2407","nickname":null,"avatarUrl":null,"value":15,"rankNo":4},{"type":null,"userId":"1309","nickname":null,"avatarUrl":null,"value":6,"rankNo":5},{"type":null,"userId":"2077","nickname":null,"avatarUrl":null,"value":1,"rankNo":6}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.9. 活动模块

活动模块相关接口。

4.9.1. 查询活动详情

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/public/activity/1' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/public/activity/1 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 24. /api/v3/public/activity/{activityId}
Parameter Description

activityId

活动ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 619

{"code":10000,"message":"success","data":{"id":"1","name":"谁是力量王","top":0,"type":2,"status":2,"minAge":0,"maxAge":100,"taskValue":0,"startTime":"2020-07-01 00","endTime":"2021-07-01 00","signStartTime":"2020-06-01 00","signEndTime":"2020-06-30 00","coverImg":"1","detailImg":"2,3","maxUsers":0,"amountUsers":1,"remarks":"测试活动","createTime":"2020-07-20 13:28:02","updateTime":"2021-09-15 17:00:00","coverUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"detailUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg0.jpg","http://39.97.165.184:8080/api/file/lining/1562571088614qUgw.png"]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

数据ID

data.name

String

活动名字

data.top

Integer

是否推荐,1-推荐,0-未推荐

data.type

Integer

活动类型,(排行榜类:1-跑步跑得最多,2-撸铁撸得最多,3-骑车消耗能量最多,4-跳绳跳的最多;完成任务类:101-完成多少时间的运动,102-消耗多少卡路里)

data.status

Integer

活动状态,0-未开始,1-进行中,2-已结束

data.minAge

Integer

活动最小年龄要求

data.maxAge

Integer

活动最大年龄要求

data.taskValue

Integer

任务类活动所需完成的值

data.startTime

Date

活动开始时间

data.endTime

Date

活动结束时间

data.signStartTime

Date

报名开始时间

data.signEndTime

Date

报名结束时间

data.coverImg

String

活动封面图片id,可多张,用逗号隔开

data.coverUrls

List

封面图片url

data.detailImg

String

动详情图片id,可多张,用逗号隔开

data.detailUrls

List

活动详情图片url

data.maxUsers

Integer

活动最多参与人数,为0表示不限制

data.amountUsers

Integer

活动参与人数

data.remarks

String

描述/备注

data.createTime

Date

创建时间

data.updateTime

Date

更新时间

4.9.2. 分页查询活动列表

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/public/activity?pageNum=1&pageSize=5&type=2&status=2&keyword=%E5%8A%9B%E9%87%8F' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/public/activity?pageNum=1&pageSize=5&type=2&status=2&keyword=%E5%8A%9B%E9%87%8F HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

type

活动类型,(排行榜类:1-跑步跑得最多,2-撸铁撸得最多,3-骑车消耗能量最多,4-跳绳跳的最多;完成任务类:101-完成多少时间的运动,102-消耗多少卡路里)

status

活动状态,0-未开始,1-进行中,2-已结束,可以为空

keyword

模糊查询,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 898

{"code":10000,"message":"success","data":{"total":1,"list":[{"id":"1","name":"谁是力量王","top":0,"type":2,"status":2,"minAge":0,"maxAge":100,"taskValue":0,"startTime":"2020-07-01 00","endTime":"2021-07-01 00","signStartTime":"2020-06-01 00","signEndTime":"2020-06-30 00","coverImg":"1","detailImg":"2,3","maxUsers":0,"amountUsers":1,"remarks":"测试活动","createTime":"2020-07-20 13:28:02","updateTime":"2021-09-15 17:00:00","coverUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"detailUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg0.jpg","http://39.97.165.184:8080/api/file/lining/1562571088614qUgw.png"]}],"pageNum":1,"pageSize":5,"size":1,"startRow":1,"endRow":1,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].name

String

活动名字

data.list[].name

String

活动名字

data.list[].top

Integer

是否推荐,1-推荐,0-未推荐

data.list[].type

Integer

活动类型,(排行榜类:1-跑步跑得最多,2-撸铁撸得最多,3-骑车消耗能量最多,4-跳绳跳的最多;完成任务类:101-完成多少时间的运动,102-消耗多少卡路里)

data.list[].status

Integer

活动状态,0-未开始,1-进行中,2-已结束

data.list[].minAge

Integer

活动最小年龄要求

data.list[].maxAge

Integer

活动最大年龄要求

data.list[].taskValue

Integer

任务类活动所需完成的值

data.list[].startTime

Date

活动开始时间

data.list[].endTime

Date

活动结束时间

data.list[].signStartTime

Date

报名开始时间

data.list[].signEndTime

Date

报名结束时间

data.list[].coverImg

String

活动封面图片id,可多张,用逗号隔开

data.list[].coverUrls

List

封面图片url

data.list[].detailImg

String

动详情图片id,可多张,用逗号隔开

data.list[].detailUrls

List

活动详情图片url

data.list[].maxUsers

Integer

活动最多参与人数,为0表示不限制

data.list[].amountUsers

Integer

活动参与人数

data.list[].remarks

String

描述/备注

data.list[].createTime

Date

创建时间

data.list[].updateTime

Date

修改时间

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.9.3. 用户参加的活动列表

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/activity/joined?type=1&status=1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPL2Y1ekwwVElFdnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/activity/joined?type=1&status=1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPL2Y1ekwwVElFdnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

type

活动类型,(排行榜类:1-跑步跑得最多,2-撸铁撸得最多,3-骑车消耗能量最多,4-跳绳跳的最多;完成任务类:101-完成多少时间的运动,102-消耗多少卡路里)

status

活动状态,0-未开始,1-进行中,2-已结束,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 630

{"code":10000,"message":"success","data":{"list":[{"id":"1","name":"谁是力量王","top":0,"type":2,"status":2,"minAge":0,"maxAge":100,"taskValue":0,"startTime":"2020-07-01 00","endTime":"2021-07-01 00","signStartTime":"2020-06-01 00","signEndTime":"2020-06-30 00","coverImg":"1","detailImg":"2,3","maxUsers":0,"amountUsers":1,"remarks":"测试活动","createTime":"2020-07-20 13:28:02","updateTime":"2021-09-15 17:00:00","coverUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"detailUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg0.jpg","http://39.97.165.184:8080/api/file/lining/1562571088614qUgw.png"]}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].name

String

活动名字

data.list[].top

Integer

是否推荐,1-推荐,0-未推荐

data.list[].type

Integer

活动类型,(排行榜类:1-跑步跑得最多,2-撸铁撸得最多,3-骑车消耗能量最多,4-跳绳跳的最多;完成任务类:101-完成多少时间的运动,102-消耗多少卡路里)

data.list[].status

Integer

活动状态,0-未开始,1-进行中,2-已结束

data.list[].minAge

Integer

活动最小年龄要求

data.list[].maxAge

Integer

活动最大年龄要求

data.list[].taskValue

Integer

任务类活动所需完成的值

data.list[].startTime

Date

活动开始时间

data.list[].endTime

Date

活动结束时间

data.list[].signStartTime

Date

报名开始时间

data.list[].signEndTime

Date

报名结束时间

data.list[].coverImg

String

活动封面图片id,可多张,用逗号隔开

data.list[].coverUrls

List

封面图片url

data.list[].detailImg

String

动详情图片id,可多张,用逗号隔开

data.list[].detailUrls

List

活动详情图片url

data.list[].maxUsers

Integer

活动最多参与人数,为0表示不限制

data.list[].amountUsers

Integer

活动参与人数

data.list[].remarks

String

描述/备注

data.list[].createTime

Date

创建时间

data.list[].updateTime

Date

修改时间

4.9.4. 用户报名活动

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/activity/join/1' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQaFlCY01aSHpVMXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
POST /api/v3/activity/join/1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQaFlCY01aSHpVMXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 25. /api/v3/activity/join/{activityId}
Parameter Description

activityId

活动ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 79

{"code":30020,"message":"未在活动报名时间内,不能参加","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code说明
返回code 返回message 返回其他字段

10000

报名成功

10004

参数有误

30020

未在活动报名时间内不能参加

30021

用户已报名该活动

30022

活动参与人数已满

4.9.5. 用户是否参加某活动

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/activity/isJoined/1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQb2VKcERlUWRaank0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/activity/isJoined/1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQb2VKcERlUWRaank0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 26. /api/v3/activity/isJoined/{activityId}
Parameter Description

activityId

活动ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 46

{"code":10000,"message":"success","data":true}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

boolean

是否参加过

4.9.6. 查询活动参与的人员列表

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/activity/1/user/list?pageNum=1&pageSize=5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDTno0ZVRhalk1THk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/activity/1/user/list?pageNum=1&pageSize=5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDTno0ZVRhalk1THk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 27. /api/v3/activity/{activityId}/user/list
Parameter Description

activityId

活动ID,必填

请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 552

{"code":10000,"message":"success","data":{"total":1,"list":[{"id":"1","userId":"5","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","nickName":"PK","majorValue":190,"rankNo":1,"remarks":"测试"}],"pageNum":1,"pageSize":5,"size":1,"startRow":1,"endRow":1,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].userId

String

用户ID

data.list[].avatarUrl

String

用户头像

data.list[].nickName

String

用户昵称

data.list[].majorValue

Integer

活动期间完成的值

data.list[].rankNo

Integer

排名类活动活动结束后进行排名

data.list[].remarks

String

描述/备注

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.9.7. 查询自己参与参与活动的信息

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/activity/1/user' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQREh2ZjdiWWQ0Qnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/activity/1/user HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQREh2ZjdiWWQ0Qnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 28. /api/v3/activity/{activityId}/user
Parameter Description

activityId

活动ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 273

{"code":10000,"message":"success","data":{"id":"1","userId":"5","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","nickName":"PK","majorValue":190,"rankNo":1,"remarks":"测试"}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

数据ID

data.userId

String

用户ID

data.avatarUrl

String

用户头像

data.nickName

String

用户昵称

data.majorValue

Integer

活动期间完成的值

data.rankNo

Integer

排名类活动活动结束后进行排名

data.remarks

String

描述/备注

4.10. 人脸认证模块

人脸认证模块相关的接口。

4.10.1. 人脸注册

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/face/reg' -i -X POST \
    -H 'Content-Type: multipart/form-data;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLRXNiWC9kYjdjaHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -F 'file=@002.png;type=image/png'
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 71

{"code":80021,"message":"人脸接口错误","data":"pic not has face"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

成功

4.11. 力量训练器模块

4.11.1. 获取力量训练排行榜

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/strength/rank/list?pageNum=1&pageSize=5&period=1&sort=0' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBdjVFN0VqS0l2Snk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/strength/rank/list?pageNum=1&pageSize=5&period=1&sort=0 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBdjVFN0VqS0l2Snk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

period

排序周期:1-天,2-周,3-月,4-年

sort

排序字段:0-时间,1-做功,2-卡路里

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 320

{"code":10000,"message":"success","data":{"total":0,"list":[],"pageNum":1,"pageSize":5,"size":0,"startRow":0,"endRow":0,"pages":0,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[],"navigateFirstPage":0,"navigateLastPage":0}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.11.2. 获取用户的力量训练排行榜

返回值排名为0的则为未上榜。
curl请求
$ curl 'https://iot.daconghealth.com/api/v3/strength/rank?period=1&sort=0' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNbktVbnN3aXo5eXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/strength/rank?period=1&sort=0 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNbktVbnN3aXo5eXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

period

排序周期:1-天,2-周,3-月,4-年

sort

排序字段:0-时间,1-做功,2-卡路里

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 46

{"code":10000,"message":"success","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.11.3. 获取力量测试排行榜

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/strength/test/rank/list?pageNum=1&pageSize=5&kg=100&height=100' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHdmE1TVVTeW1Ubnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/strength/test/rank/list?pageNum=1&pageSize=5&kg=100&height=100 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHdmE1TVVTeW1Ubnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

kg

重量

height

高度

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1679

{"code":10000,"message":"success","data":{"total":4,"list":[{"id":"3","userId":"1","mac":"4A3633074200","startTime":"2024-01-12 14:32:12","kg":100,"height":100,"duration":180,"remarks":"100","createTime":"2024-01-12 14:32:35","rankNo":1,"nickname":"星火","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132"},{"id":"2","userId":"2","mac":"4A3633074200","startTime":"2024-01-12 14:32:12","kg":100,"height":100,"duration":102,"remarks":"100","createTime":"2024-01-12 14:32:35","rankNo":2,"nickname":"noyesz","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132"},{"id":"1","userId":"1","mac":"4A3633074200","startTime":"2024-01-12 14:32:12","kg":100,"height":100,"duration":100,"remarks":"100","createTime":"2024-01-12 14:32:35","rankNo":3,"nickname":"星火","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132"},{"id":"4","userId":"5","mac":"4A3633074200","startTime":"2024-01-12 14:32:12","kg":100,"height":100,"duration":100,"remarks":"100","createTime":"2024-01-12 14:32:35","rankNo":4,"nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132"}],"pageNum":1,"pageSize":5,"size":4,"startRow":1,"endRow":4,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.11.4. 获取用户的力量测试最佳排名

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/strength/test/rank?kg=100&height=100' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQUnltOEZrakU1V3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/strength/test/rank?kg=100&height=100 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQUnltOEZrakU1V3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

kg

重量

height

高度

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 380

{"code":10000,"message":"success","data":{"id":"4","userId":"5","mac":"4A3633074200","startTime":"2024-01-12 14:32:12","kg":100,"height":100,"duration":100,"remarks":"100","createTime":"2024-01-12 14:32:35","rankNo":4,"nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132"}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.11.5. 节律训练完成度分级

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/strength/completion/list' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/common/strength/completion/list HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 865

{"code":10000,"message":"success","data":{"list":[{"id":"1","completionH":100,"completionL":90,"evaluate":"很优秀,继续保持哦!","evaluateEn":null,"sort":1,"remarks":null,"createTime":"2024-01-15 09:15:05","updateTime":"2024-01-15 09:15:05"},{"id":"2","completionH":90,"completionL":80,"evaluate":"很不错,还有提升空间!","evaluateEn":null,"sort":2,"remarks":null,"createTime":"2024-01-15 09:16:06","updateTime":"2024-01-15 09:16:06"},{"id":"3","completionH":80,"completionL":60,"evaluate":"不要气馁,下次会更好!","evaluateEn":null,"sort":3,"remarks":null,"createTime":"2024-01-15 09:16:23","updateTime":"2024-01-15 09:16:23"},{"id":"4","completionH":60,"completionL":0,"evaluate":"不要灰心,加油努力哦!","evaluateEn":null,"sort":4,"remarks":null,"createTime":"2024-01-15 09:16:39","updateTime":"2024-01-15 09:16:39"}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].completionH

Integer

高于此完成度

data.list[].completionL

Integer

低于此完成度

data.list[].evaluate

String

中文评价

data.list[].evaluateEn

String

英文评价

data.list[].sort

Integer

排序

data.list[].remarks

String

描述/备注

data.list[].createTime

Date

创建时间

data.list[].updateTime

Date

修改时间

4.12. 海外版扫码登录

4.12.1. 获取二维码数据

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/scan/qrcode/8CFCA0117B5E' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/scan/qrcode/8CFCA0117B5E HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 29. /api/v3/scan/qrcode/{mac}
Parameter Description

mac

设备的mac,去除冒号,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 109

{"code":10000,"message":"success","data":{"qr":"1a734a1afd4bd67f155144d618f170bb","expire":300,"appid":null}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.qr

String

生成二维码数据

data.expire

Integer

二维码有效时间,单位秒

4.12.2. 查询登录状态

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/scan/query/8CFCA0117B5E' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/scan/query/8CFCA0117B5E HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 30. /api/v3/scan/query/{mac}
Parameter Description

mac

设备的mac,去除冒号,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 963

{"code":10000,"message":"success","data":{"token":"cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLLzNhZUNubk9nZnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==","user":{"id":"5","createTime":1524477901000,"updateTime":1702966772000,"description":"","uuid":"12dc0225210111ecaef58cec4b8c9904","unionId":"oMZTg1KsXzXw9NxWRsMZDK30rJp4","openId":"oFV3g04R0mLCzBcBCzPtvq4OgYv8","openId1":null,"openId11":null,"openId2":"oqUWF5X5oq1oQbE0sJmdKCPrjQIM","openId21":"oqUWF5X5oq1oQbE0sJmdKCPrjQIM","nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","mobile":null,"email":null,"google":null,"facebook":null,"gender":1,"country":"中国","province":"四川","city":"绵阳","language":"zh_CN","age":34,"birthday":"1984-01-20","height":88,"weight":83,"heartRate":73,"grade":0,"loginStatus":1,"extend":"","realName":"","bodyFat":null,"bloodPressure":null}}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code 返回message 返回其他字段

10000

成功

20001

用户未登录

4.12.3. 扫码登录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/scan/verify' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMem1HQnhPdjRUbXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"qr":"1a734a1afd4bd67f155144d618f170bb"}'
http请求
POST /api/v3/scan/verify HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMem1HQnhPdjRUbXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 41
Host: iot.daconghealth.com

{"qr":"1a734a1afd4bd67f155144d618f170bb"}
请求字段说明
Path Type Description

qr

String

不能为空,接口获取到的二维码内容

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code 返回message 返回其他字段

10000

成功

20015

二维码已过期

20016

二维码异常请刷新二维码

4.13. 计划模块

计划模块相关的接口。

4.13.1. 查询计划列表

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/plans/list?pageNum=1&pageSize=5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHR21RYmtYV09CMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/plans/list?pageNum=1&pageSize=5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHR21RYmtYV09CMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1530

{"code":10000,"message":"success","data":{"total":2,"list":[{"id":"1","enable":1,"name":"减脂计划","nameEng":"eng name","types":"1","cover":"1","detailImg":"1,2","detailImgEng":"1,2","days":28,"distance":null,"time":null,"calorie":null,"count":0,"sort":1,"remarks":"老系统保留计划","createTime":1634108266000,"updateTime":1635401290000,"coverUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"detailUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg","http://huipaotu.xbrowser.cn/lining/activity_bg0.jpg"],"detailEngUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg","http://huipaotu.xbrowser.cn/lining/activity_bg0.jpg"]},{"id":"2","enable":1,"name":"健身计划","nameEng":"eng name","types":"1","cover":"2","detailImg":"1,2","detailImgEng":"1,2","days":28,"distance":null,"time":null,"calorie":null,"count":0,"sort":1,"remarks":"老系统保留计划","createTime":1634108280000,"updateTime":1635401290000,"coverUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg0.jpg"],"detailUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg","http://huipaotu.xbrowser.cn/lining/activity_bg0.jpg"],"detailEngUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg","http://huipaotu.xbrowser.cn/lining/activity_bg0.jpg"]}],"pageNum":1,"pageSize":5,"size":2,"startRow":1,"endRow":2,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

String

计划Id

data.list[].name

String

计划名字

data.list[].types

String

计划关联的运动类型,多个用逗号隔开

data.list[].days

Integer

总天数

data.list[].distance

Float

总距离,单位:km

data.list[].time

Integer

总时长,单位:分钟

data.list[].calorie

Integer

总燃脂,单位:kcal

data.list[].count

Integer

参加人数

data.list[].sort

Integer

排序

data.list[].remarks

String

备注

data.list[].coverUrls

List

封面图片URL列表

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.13.2. 用户添加计划

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/plans' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIbXl6cGczTmVLb3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"beginDate":"2024-08-19","aim":0,"planId":"1","ability":0}'
http请求
POST /api/v3/plans HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIbXl6cGczTmVLb3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 59
Host: iot.daconghealth.com

{"beginDate":"2024-08-19","aim":0,"planId":"1","ability":0}
请求字段说明
Path Type Description

planId

String

计划ID,不能为空

aim

Integer

运动目标,0:健身保养,1:减脂瘦身,2:全马备战,可以为空

ability

Integer

当前能力,0:马拉松,1:半马,2:10公里,3:5公里,4:30-60分钟,5:20-30分钟,6:少于20分钟,不能为空

beginDate

String

开始时间,格式为:yyyy-MM-dd,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.13.3. 用户获得已参与计划

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/plans' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhCbk5nNy94aUFtank0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/plans HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhCbk5nNy94aUFtank0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 53572

{"code":10000,"message":"success","data":{"id":"8","aim":0,"beginDate":"2024-08-19","endDate":"2024-09-15","ability":0,"status":0,"detail":[{"date":"2024-08-19","baseOn":0,"useGradient":0,"totalDistance":2.24,"totalTime":30,"totalCalorie":175.0,"steps":[{"id":"256","methodId":"29","dayIndex":1,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"257","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"258","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"259","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"260","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"261","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"262","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"263","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"264","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"265","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"266","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"267","methodId":"29","dayIndex":1,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-20","baseOn":0,"useGradient":0,"totalDistance":2.26,"totalTime":30,"totalCalorie":177.0,"steps":[{"id":"268","methodId":"30","dayIndex":2,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"269","methodId":"30","dayIndex":2,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"270","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"271","methodId":"30","dayIndex":2,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"272","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"273","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"274","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"275","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"276","methodId":"30","dayIndex":2,"speed":6.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"277","methodId":"30","dayIndex":2,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"278","methodId":"30","dayIndex":2,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"},{"id":"279","methodId":"30","dayIndex":2,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:22"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-21","baseOn":0,"useGradient":0,"totalDistance":2.4,"totalTime":30,"totalCalorie":187.0,"steps":[{"id":"280","methodId":"31","dayIndex":3,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"281","methodId":"31","dayIndex":3,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"282","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"283","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"284","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"285","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"286","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"287","methodId":"31","dayIndex":3,"speed":6.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"288","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"289","methodId":"31","dayIndex":3,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"290","methodId":"31","dayIndex":3,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"},{"id":"291","methodId":"31","dayIndex":3,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:36"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-22","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-08-23","baseOn":0,"useGradient":0,"totalDistance":2.29,"totalTime":30,"totalCalorie":179.0,"steps":[{"id":"292","methodId":"33","dayIndex":5,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"293","methodId":"33","dayIndex":5,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"294","methodId":"33","dayIndex":5,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"295","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"296","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"297","methodId":"33","dayIndex":5,"speed":6.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"298","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"299","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"300","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"301","methodId":"33","dayIndex":5,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"302","methodId":"33","dayIndex":5,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"303","methodId":"33","dayIndex":5,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-24","baseOn":0,"useGradient":0,"totalDistance":2.2,"totalTime":30,"totalCalorie":173.0,"steps":[{"id":"304","methodId":"34","dayIndex":6,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"305","methodId":"34","dayIndex":6,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"306","methodId":"34","dayIndex":6,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"307","methodId":"34","dayIndex":6,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"308","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"309","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"310","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"311","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"312","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"313","methodId":"34","dayIndex":6,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"314","methodId":"34","dayIndex":6,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"315","methodId":"34","dayIndex":6,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-25","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-08-26","baseOn":0,"useGradient":0,"totalDistance":2.24,"totalTime":30,"totalCalorie":175.0,"steps":[{"id":"316","methodId":"36","dayIndex":8,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"317","methodId":"36","dayIndex":8,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"318","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"319","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"320","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"321","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"322","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"323","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"324","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"325","methodId":"36","dayIndex":8,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"326","methodId":"36","dayIndex":8,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"327","methodId":"36","dayIndex":8,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-27","baseOn":0,"useGradient":0,"totalDistance":2.38,"totalTime":30,"totalCalorie":186.0,"steps":[{"id":"328","methodId":"37","dayIndex":9,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"329","methodId":"37","dayIndex":9,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"330","methodId":"37","dayIndex":9,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"331","methodId":"37","dayIndex":9,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"332","methodId":"37","dayIndex":9,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"333","methodId":"37","dayIndex":9,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"334","methodId":"37","dayIndex":9,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"335","methodId":"37","dayIndex":9,"speed":6.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"336","methodId":"37","dayIndex":9,"speed":6.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"337","methodId":"37","dayIndex":9,"speed":6.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"338","methodId":"37","dayIndex":9,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"339","methodId":"37","dayIndex":9,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-28","baseOn":0,"useGradient":0,"totalDistance":2.35,"totalTime":30,"totalCalorie":183.0,"steps":[{"id":"340","methodId":"38","dayIndex":10,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"341","methodId":"38","dayIndex":10,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"342","methodId":"38","dayIndex":10,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"343","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"344","methodId":"38","dayIndex":10,"speed":6.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"345","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"346","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"347","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"348","methodId":"38","dayIndex":10,"speed":6.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"349","methodId":"38","dayIndex":10,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"350","methodId":"38","dayIndex":10,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"351","methodId":"38","dayIndex":10,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-29","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-08-30","baseOn":0,"useGradient":0,"totalDistance":2.2,"totalTime":30,"totalCalorie":173.0,"steps":[{"id":"352","methodId":"40","dayIndex":12,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"353","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"354","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"355","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"356","methodId":"40","dayIndex":12,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"357","methodId":"40","dayIndex":12,"speed":6.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"358","methodId":"40","dayIndex":12,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"359","methodId":"40","dayIndex":12,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"360","methodId":"40","dayIndex":12,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"361","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"362","methodId":"40","dayIndex":12,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"363","methodId":"40","dayIndex":12,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-08-31","baseOn":0,"useGradient":0,"totalDistance":2.35,"totalTime":30,"totalCalorie":183.0,"steps":[{"id":"364","methodId":"41","dayIndex":13,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"365","methodId":"41","dayIndex":13,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"366","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"367","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"368","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"369","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"370","methodId":"41","dayIndex":13,"speed":6.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"371","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"372","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"373","methodId":"41","dayIndex":13,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"374","methodId":"41","dayIndex":13,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"375","methodId":"41","dayIndex":13,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-01","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-09-02","baseOn":0,"useGradient":0,"totalDistance":2.31,"totalTime":30,"totalCalorie":181.0,"steps":[{"id":"376","methodId":"43","dayIndex":15,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"377","methodId":"43","dayIndex":15,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"378","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"379","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"380","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"381","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"382","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"383","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"384","methodId":"43","dayIndex":15,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"385","methodId":"43","dayIndex":15,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"386","methodId":"43","dayIndex":15,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"387","methodId":"43","dayIndex":15,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-03","baseOn":0,"useGradient":0,"totalDistance":2.28,"totalTime":30,"totalCalorie":178.0,"steps":[{"id":"388","methodId":"44","dayIndex":16,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"389","methodId":"44","dayIndex":16,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"390","methodId":"44","dayIndex":16,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"391","methodId":"44","dayIndex":16,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"392","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"393","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"394","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"395","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"396","methodId":"44","dayIndex":16,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"397","methodId":"44","dayIndex":16,"speed":6.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"398","methodId":"44","dayIndex":16,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"399","methodId":"44","dayIndex":16,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-04","baseOn":0,"useGradient":0,"totalDistance":2.08,"totalTime":30,"totalCalorie":164.0,"steps":[{"id":"400","methodId":"45","dayIndex":17,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"401","methodId":"45","dayIndex":17,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"402","methodId":"45","dayIndex":17,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"403","methodId":"45","dayIndex":17,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"404","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"405","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"406","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"407","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"408","methodId":"45","dayIndex":17,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"409","methodId":"45","dayIndex":17,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"410","methodId":"45","dayIndex":17,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"411","methodId":"45","dayIndex":17,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-05","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-09-06","baseOn":0,"useGradient":0,"totalDistance":2.28,"totalTime":30,"totalCalorie":178.0,"steps":[{"id":"412","methodId":"47","dayIndex":19,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"413","methodId":"47","dayIndex":19,"speed":3.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"414","methodId":"47","dayIndex":19,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"415","methodId":"47","dayIndex":19,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"416","methodId":"47","dayIndex":19,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"417","methodId":"47","dayIndex":19,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"418","methodId":"47","dayIndex":19,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"419","methodId":"47","dayIndex":19,"speed":6.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"420","methodId":"47","dayIndex":19,"speed":6.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"421","methodId":"47","dayIndex":19,"speed":null,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"422","methodId":"47","dayIndex":19,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"423","methodId":"47","dayIndex":19,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-07","baseOn":0,"useGradient":0,"totalDistance":2.24,"totalTime":30,"totalCalorie":175.0,"steps":[{"id":"424","methodId":"48","dayIndex":20,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"425","methodId":"48","dayIndex":20,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"426","methodId":"48","dayIndex":20,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"427","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"428","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"429","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"430","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"431","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"432","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"433","methodId":"48","dayIndex":20,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"434","methodId":"48","dayIndex":20,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"435","methodId":"48","dayIndex":20,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-08","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-09-09","baseOn":0,"useGradient":0,"totalDistance":2.17,"totalTime":30,"totalCalorie":170.0,"steps":[{"id":"436","methodId":"50","dayIndex":22,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"437","methodId":"50","dayIndex":22,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"438","methodId":"50","dayIndex":22,"speed":3.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"439","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"440","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"441","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"442","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"443","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"444","methodId":"50","dayIndex":22,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"445","methodId":"50","dayIndex":22,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"446","methodId":"50","dayIndex":22,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"447","methodId":"50","dayIndex":22,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-10","baseOn":0,"useGradient":0,"totalDistance":2.31,"totalTime":30,"totalCalorie":181.0,"steps":[{"id":"448","methodId":"51","dayIndex":23,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"449","methodId":"51","dayIndex":23,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"450","methodId":"51","dayIndex":23,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"451","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"452","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"453","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"454","methodId":"51","dayIndex":23,"speed":6.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"455","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"456","methodId":"51","dayIndex":23,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"457","methodId":"51","dayIndex":23,"speed":4.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"458","methodId":"51","dayIndex":23,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"459","methodId":"51","dayIndex":23,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-11","baseOn":0,"useGradient":0,"totalDistance":2.33,"totalTime":30,"totalCalorie":182.0,"steps":[{"id":"460","methodId":"52","dayIndex":24,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"461","methodId":"52","dayIndex":24,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"462","methodId":"52","dayIndex":24,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"463","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"464","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"465","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"466","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"467","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"468","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"469","methodId":"52","dayIndex":24,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"470","methodId":"52","dayIndex":24,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"471","methodId":"52","dayIndex":24,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-12","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null},{"date":"2024-09-13","baseOn":0,"useGradient":0,"totalDistance":2.38,"totalTime":30,"totalCalorie":186.0,"steps":[{"id":"472","methodId":"54","dayIndex":26,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"473","methodId":"54","dayIndex":26,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"474","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"475","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"476","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"477","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"478","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"479","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"480","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"481","methodId":"54","dayIndex":26,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"482","methodId":"54","dayIndex":26,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"483","methodId":"54","dayIndex":26,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-14","baseOn":0,"useGradient":0,"totalDistance":2.31,"totalTime":30,"totalCalorie":181.0,"steps":[{"id":"484","methodId":"55","dayIndex":27,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"485","methodId":"55","dayIndex":27,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"486","methodId":"55","dayIndex":27,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"487","methodId":"55","dayIndex":27,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"488","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"489","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"490","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"491","methodId":"55","dayIndex":27,"speed":6.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"492","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"493","methodId":"55","dayIndex":27,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"494","methodId":"55","dayIndex":27,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"},{"id":"495","methodId":"55","dayIndex":27,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:57:48"}],"status":1,"name":"","nameEng":null,"type":1},{"date":"2024-09-15","baseOn":null,"useGradient":null,"totalDistance":null,"totalTime":null,"totalCalorie":null,"steps":null,"status":3,"name":null,"nameEng":null,"type":null}],"distance":45.600006,"time":600,"calorie":3567.0,"addUpDistance":0.0,"addUpTime":0,"addUpCalorie":0.0,"addDays":0,"coverUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"planId":"1","name":"减脂计划","nameEng":"eng name","days":28}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

用户运动计划Id

data.aim

Integer

运动目标,0:健身保养,1:减脂瘦身,2:全马备战

data.ability

Integer

当前能力,0:马拉松,1:半马,2:10公里,3:5公里,4:30-60分钟,5:20-30分钟,6:少于20分钟

data.beginDate

Date

开始日期

data.endDate

Date

结束日期

data.status

Integer

计划状态,0:进行中,1:部分完成,2:已完成,3:已取消

data.distance

Float

距离

data.time

Integer

时长

data.calorie

Float

卡路里

data.addUpDistance

Float

已跑距离

data.addUpTime

Integer

已跑时长

data.addUpCalorie

Float

已消耗卡路里

data.addDays

Integer

已完成天数

data.days

Integer

总训练天数

data.planId

String

计划ID

data.name

String

计划名

data.nameEng

String

计划名(英文)

data.detail

JSONObject

计划明细

4.13.4. 用户获得某天计划

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/plans/date?date=2024-08-19' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJeXJSb3k2M1lQYnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v3/plans/date?date=2024-08-19 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJeXJSb3k2M1lQYnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

date

日期,不能为空,格式必须是:yyyy-MM-dd

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2927

{"code":10000,"message":"success","data":{"id":"9","aim":0,"beginDate":"2024-08-19","endDate":"2024-09-15","ability":0,"status":0,"detail":[{"date":"2024-08-19","baseOn":0,"useGradient":0,"totalDistance":2.24,"totalTime":30,"totalCalorie":175.0,"steps":[{"id":"256","methodId":"29","dayIndex":1,"speed":2.0,"gradient":0,"beginTime":0,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"257","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":3,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"258","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":6,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"259","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":9,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"260","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":12,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"261","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":15,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"262","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":18,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"263","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":21,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"264","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":24,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"265","methodId":"29","dayIndex":1,"speed":5.0,"gradient":0,"beginTime":27,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"266","methodId":"29","dayIndex":1,"speed":4.0,"gradient":0,"beginTime":30,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"},{"id":"267","methodId":"29","dayIndex":1,"speed":2.0,"gradient":0,"beginTime":33,"duration":3,"beginDistance":0,"description":null,"createTime":"2021-10-13 16:47:18","updateTime":"2021-10-13 16:48:16"}],"status":1,"name":null,"nameEng":null,"type":null}],"distance":null,"time":null,"calorie":null,"addUpDistance":null,"addUpTime":null,"addUpCalorie":null,"addDays":null,"coverUrls":null,"planId":"1","name":"减脂计划","nameEng":"eng name","days":28}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

用户运动计划Id

data.aim

Integer

运动目标,0:健身保养,1:减脂瘦身,2:全马备战

data.ability

Integer

当前能力,0:马拉松,1:半马,2:10公里,3:5公里,4:30-60分钟,5:20-30分钟,6:少于20分钟

data.beginDate

Date

开始日期

data.endDate

Date

结束日期

data.status

Integer

计划状态,0:进行中,1:部分完成,2:已完成,3:已取消

data.distance

Float

距离

data.time

Integer

时长

data.calorie

Float

卡路里

data.addUpDistance

Float

已跑距离

data.addUpTime

Integer

已跑时长

data.addUpCalorie

Float

已消耗卡路里

data.days

Integer

总训练天数

data.planId

String

计划ID

data.name

String

计划名

data.nameEng

String

计划名(英文)

data.detail

JSONObject

计划明细

data.detail[].date

Date

日期

data.detail[].name

String

按天计划名

data.detail[].nameEng

String

按天计划名(英文)

data.detail[].type

Integer

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

data.detail[].status

Integer

状态,0:未完成,1:计划跑步,2:部分完成,3:休息,4:已完成

data.detail[].baseOn

Integer

分段依据,0:时间,1:距离

data.detail[].useGradient

Integer

是否使用坡度,0:不使用, 1:使用

data.detail[].totalDistance

Float

总距离

data.detail[].totalTime

Integer

总时间,单位:分钟

data.detail[].totalCalorie

Float

总热量,单位:kj

data.detail[].steps

JSONObject

具体步骤

data.detail[].steps[].speed

Float

速度,单位:公里/小时,,如果是单车,字段表示阻力

data.detail[].steps[].gradient

Integer

坡度

data.detail[].steps[].beginTime

Integer

开始时刻

data.detail[].steps[].beginDistance

Integer

开始距离

data.detail[].steps[].duration

Integer

持续时间

4.13.5. 用户修改某天计划状态

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/plans/change/date' -i -X PUT \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBYllqY2U0VXZOMHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d 'planUserId=1&date=2024-08-19&status=1'
http请求
PUT /api/v3/plans/change/date HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBYllqY2U0VXZOMHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
Content-Type: application/x-www-form-urlencoded

planUserId=1&date=2024-08-19&status=1
请求参数
Parameter Description

planUserId

用户计划ID,不能为空

date

日期,不能为空,格式必须是:yyyy-MM-dd

status

状态,0:未完成,1:计划跑步,2:部分完成,3:休息,4:已完成,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 54

{"code":30050,"message":"璁″垝涓嶅瓨鍦�","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.13.6. 用户修改整体计划状态

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/plans/change' -i -X PUT \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDVGl1QWVqUGxaaXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d 'planUserId=1&status=1'
http请求
PUT /api/v3/plans/change HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDVGl1QWVqUGxaaXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
Content-Type: application/x-www-form-urlencoded

planUserId=1&status=1
请求参数
Parameter Description

planUserId

用户计划ID,不能为空

status

状态,0:进行中,1:部分完成,2:已完成,3:已取消,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.13.7. 用户延迟计划

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/plans/delay' -i -X PUT \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNMXFNaHpPazEwTXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d 'planUserId=1&date=2024-08-19&days=1'
http请求
PUT /api/v3/plans/delay HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNMXFNaHpPazEwTXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
Content-Type: application/x-www-form-urlencoded

planUserId=1&date=2024-08-19&days=1
请求参数
Parameter Description

planUserId

用户计划ID,不能为空

date

开始延迟日期,不能为空

days

延迟天数,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.14. 课程模块

4.14.1. 课程列表

curl请求
$ curl 'https://iot.daconghealth.com/api/courses/list?pageNum=1&pageSize=5&type=1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNa1VPY29uQklZaXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/courses/list?pageNum=1&pageSize=5&type=1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNa1VPY29uQklZaXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

type

课程类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1059

{"code":10000,"message":"success","data":{"total":2,"list":[{"id":"1","name":"Jumpstart","nameEng":"eng name","type":1,"level":1,"duration":470,"calorie":0,"cover":"145","info":"Ease into rebounding with the Jumpstart program. This quick and easy plan is a great way to get comfortable ","infoEng":"eng info","sort":0,"remarks":"测试","createTime":1615535189000,"updateTime":1635400652000,"covers":[],"learnCount":3},{"id":"2","name":"Bounce Burner","nameEng":"eng name","type":1,"level":2,"duration":500,"calorie":0,"cover":"148","info":"本课程分为10节,以高频率运动为主,运动前请做好热身活动,下面开始跟着课程开始训练吧。","infoEng":"eng info","sort":0,"remarks":"测试","createTime":1615535222000,"updateTime":1635400653000,"covers":[],"learnCount":3}],"pageNum":1,"pageSize":5,"size":2,"startRow":1,"endRow":2,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].name

String

课程名字,255字以内

data.list[].nameEng

String

课程名字(英文),255字以内

data.list[].type

Integer

课程类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

data.list[].level

Integer

课程级别:1-基础,2-初级

data.list[].duration

Integer

课程时长,单位:秒

data.list[].calorie

Integer

课程卡路里,单位:卡

data.list[].info

String

课程简介,500字以内

data.list[].infoEng

String

课程简介(英文),500字以内

data.list[].covers

List

课程封面资源URL

data.list[].learnCount

Integer

有多少人学习课程

data.list[].remarks

String

描述/备注

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.14.2. 获取课程

curl请求
$ curl 'https://iot.daconghealth.com/api/courses/1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJbW83aHVONTFFYnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/courses/1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJbW83aHVONTFFYnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 31. /api/courses/{id}
Parameter Description

id

ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 400

{"code":10000,"message":"success","data":{"id":"1","name":"Jumpstart","nameEng":"eng name","type":1,"level":1,"duration":470,"calorie":0,"cover":"145","info":"Ease into rebounding with the Jumpstart program. This quick and easy plan is a great way to get comfortable ","infoEng":"eng info","sort":0,"remarks":"测试","createTime":1615535189000,"updateTime":1635400652000,"covers":[],"learnCount":3}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

数据ID

data.name

String

课程名字,255字以内

data.nameEng

String

课程名字(英文),255字以内

data.type

Integer

课程类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

data.level

Integer

课程级别:1-基础,2-初级

data.duration

Integer

课程时长,单位:秒

data.calorie

Integer

课程卡路里,单位:卡

data.info

String

课程简介,500字以内

data.infoEng

String

课程简介(英文),500字以内

data.covers

List

课程封面资源URL

data.learnCount

Integer

有多少人学习课程

data.remarks

String

描述/备注

4.14.3. 学过课程

curl请求
$ curl 'https://iot.daconghealth.com/api/courses/1/learn' -i -X POST \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPWDh5bnBLamVYNnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
POST /api/courses/1/learn HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPWDh5bnBLamVYNnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 32. /api/courses/{id}/learn
Parameter Description

id

课程ID,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.14.4. 课程详情

curl请求
$ curl 'https://iot.daconghealth.com/api/courses/1/step' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNR1dmcGprc09TMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/courses/1/step HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNR1dmcGprc09TMnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 33. /api/courses/{id}/step
Parameter Description

id

ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 797

{"code":10000,"message":"success","data":{"list":[{"id":"1","courseId":"1","step":1,"name":"Heal raise","nameEng":"eng name","duration":30,"previewUrl":"www.111.jpeg","videoUrl":"www.111.avi","videoUrlEng":"eng video url","remarks":null,"createTime":1616064373000,"updateTime":1635400676000},{"id":"2","courseId":"1","step":2,"name":"Heal raise jump","nameEng":"eng name","duration":30,"previewUrl":"www.111.jpeg","videoUrl":"www.111.avi","videoUrlEng":"eng video url","remarks":null,"createTime":1616064373000,"updateTime":1635400683000},{"id":"3","courseId":"1","step":3,"name":"Heal Tap Outs with Curls","nameEng":"eng name","duration":30,"previewUrl":"www.111.jpeg","videoUrl":"www.111.avi","videoUrlEng":"eng video url","remarks":null,"createTime":1616064373000,"updateTime":1635400683000}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].step

Integer

第几步

data.list[].name

String

步骤名

data.list[].nameEng

String

步骤名(英文)

data.list[].duration

Integer

时长,单位:秒

data.list[].previewUrl

String

预览图URL

data.list[].videoUrl

String

视频资源URL

data.list[].videoUrlEng

String

视频资源URL(英文)

4.14.5. 学习课程列表

curl请求
$ curl 'https://iot.daconghealth.com/api/courses/learn?pageNum=1&pageSize=5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBWk5vUFFBbXByU3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/courses/learn?pageNum=1&pageSize=5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBWk5vUFFBbXByU3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 700

{"code":10000,"message":"success","data":{"total":1,"list":[{"id":"2","name":"Bounce Burner","nameEng":"eng name","type":1,"level":2,"duration":500,"calorie":0,"cover":"148","info":"本课程分为10节,以高频率运动为主,运动前请做好热身活动,下面开始跟着课程开始训练吧。","infoEng":"eng info","sort":0,"remarks":"测试","createTime":1615535222000,"updateTime":1635400653000,"covers":[],"learnCount":3}],"pageNum":1,"pageSize":5,"size":1,"startRow":1,"endRow":1,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].name

String

课程名字

data.list[].nameEng

String

课程名字(英文),255字以内

data.list[].type

Integer

课程类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

data.list[].level

Integer

课程级别:1-基础,2-初级

data.list[].duration

Integer

课程时长,单位:秒

data.list[].calorie

Integer

课程卡路里,单位:卡

data.list[].info

String

课程简介

data.list[].infoEng

String

课程简介(英文),500字以内

data.list[].covers

List

课程封面资源URL

data.list[].learnCount

Integer

有多少人学习课程

data.list[].remarks

String

描述/备注

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.15. 勋章模块

勋章模块相关接口。

4.15.1. 勋章列表

curl请求
$ curl 'https://iot.daconghealth.com/api/medals?pageNum=1&pageSize=10' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJbnpLeTJYMTJ3bHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/medals?pageNum=1&pageSize=10 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJbnpLeTJYMTJ3bHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2274

{"code":10000,"message":"success","data":{"total":7,"list":[{"id":null,"userId":null,"medalId":"1","activityId":null,"medalType":2,"status":null,"createTime":1614916088000,"updateTime":null,"medalName":"5卡勋章","medalNameEng":"5卡勋章ENG","medalUrl":"http://oss.triplemaster.com/img/file1617097620355.png","has":true,"progress":null},{"id":null,"userId":null,"medalId":"2","activityId":null,"medalType":3,"status":null,"createTime":1614916104000,"updateTime":null,"medalName":"Level 1","medalNameEng":"Level 1 ENG","medalUrl":"http://beta.daconghealth.com/file/upload/file1616145982457.png","has":true,"progress":null},{"id":null,"userId":null,"medalId":"4","activityId":null,"medalType":1,"status":null,"createTime":null,"updateTime":null,"medalName":"燃脂达人","medalNameEng":"燃脂达人ENG","medalUrl":"http://oss.triplemaster.com/img/file1617097620421.png","has":false,"progress":null},{"id":null,"userId":null,"medalId":"5","activityId":null,"medalType":2,"status":null,"createTime":null,"updateTime":null,"medalName":"100卡勋章","medalNameEng":"100卡勋章ENG","medalUrl":"http://oss.triplemaster.com/img/file1617097620355.png","has":false,"progress":79},{"id":null,"userId":null,"medalId":"6","activityId":null,"medalType":2,"status":null,"createTime":null,"updateTime":null,"medalName":"100000卡勋章","medalNameEng":"100000卡勋章ENG","medalUrl":"http://oss.triplemaster.com/img/file1617097620355.png","has":false,"progress":null},{"id":null,"userId":null,"medalId":"7","activityId":null,"medalType":2,"status":null,"createTime":null,"updateTime":null,"medalName":"1000000卡勋章","medalNameEng":"1000000卡勋章ENG","medalUrl":"http://oss.triplemaster.com/img/file1617097620355.png","has":false,"progress":null},{"id":null,"userId":null,"medalId":"3","activityId":null,"medalType":3,"status":null,"createTime":null,"updateTime":null,"medalName":"Level 10","medalNameEng":"Level 10 ENG","medalUrl":"http://oss.triplemaster.com/img/file1617097620443.png","has":false,"progress":0}],"pageNum":1,"pageSize":10,"size":7,"startRow":1,"endRow":7,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].medalId

Integer

勋章ID

data.list[].medalType

Integer

勋章类型,1.其他勋章,暂未用;2.卡路里勋章

data.list[].medalName

String

勋章名称

data.list[].medalNameEng

String

勋章名称(英文)

data.list[].medalUrl

String

勋章图片url

data.list[].has

boolean

是否获取该勋章

data.list[].progress

Integer

未获取的卡路里勋章进度(目前只支持卡路里勋章)

data.list[].createTime

Date

创建时间

data.list[].remarks

String

描述/备注

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

4.15.2. 未查看勋章列表

curl请求
$ curl 'https://iot.daconghealth.com/api/medals/unread' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhCRFNKei9uN1R5eXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/medals/unread HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhCRFNKei9uN1R5eXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 342

{"code":10000,"message":"success","data":{"list":[{"id":"2","userId":"5","medalId":"2","activityId":null,"medalType":2,"status":0,"createTime":1614916104000,"updateTime":1634698119000,"medalName":"Level 1","medalNameEng":"Level 1 ENG","medalUrl":"http://beta.daconghealth.com/file/upload/file1616145982457.png","has":false,"progress":null}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].medalId

Integer

勋章ID

data.list[].medalType

Integer

勋章类型,1.其他勋章,暂未用;2.卡路里勋章

data.list[].medalName

String

勋章名称

data.list[].medalNameEng

String

勋章名称(英文)

data.list[].medalUrl

String

勋章图片url

4.15.3. 获取的勋章数量

curl请求
$ curl 'https://iot.daconghealth.com/api/medals/count' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJRzQ3TTZmQXFTank0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/medals/count HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhJRzQ3TTZmQXFTank0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 43

{"code":10000,"message":"success","data":2}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.16. APP配置模块

APP配置相关接口。

4.16.1. 苹果APP是否开启第三方登录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/config/apple/thirdLogin' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/common/config/apple/thirdLogin HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 46

{"code":10000,"message":"success","data":true}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.16.2. 苹果APP设置是否开启第三方登录

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/config/apple/thirdLogin/1' -i -X POST \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
POST /api/v3/common/config/apple/thirdLogin/1 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 34. /api/v3/common/config/apple/thirdLogin/{value}
Parameter Description

value

0-关闭,其他:开启

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.16.3. 小程序是否开启人脸模块

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/config/face?mp=xmore' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/common/config/face?mp=xmore HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path请求数
Parameter Description

mp

不同小程序标识,dc,xmore

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 47

{"code":10000,"message":"success","data":false}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.17. 短信模块

4.17.1. 发送验证码

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/sms/send/54E1AD3160EE' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/common/sms/send/54E1AD3160EE HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 35. /api/v3/common/sms/send/{mac}
Parameter Description

mac

设备的mac,去除冒号,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 50

{"code":10000,"message":"success","data":"745890"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

4.17.2. 验证码验证

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/sms/verify/54E1AD3160EE/123456' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v3/common/sms/verify/54E1AD3160EE/123456 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 36. /api/v3/common/sms/verify/{mac}/{code}
Parameter Description

mac

设备的mac,去除冒号,必填

code

验证码,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 54

{"code":20009,"message":"验证码错误","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5. 其他模块

5.1. 人脸认证模块

人脸认证模块相关的接口。

5.1.1. 人脸登录

curl请求
$ curl 'https://iot.daconghealth.com/api/face/login' -i -X POST \
    -H 'Content-Type: multipart/form-data;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -F 'file=@002.png;type=image/png' \
    -F 'mac=1111111'
请求参数
Parameter Description

mac

登录设备mac,必须

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 553

{"code":200,"message":"success","data":{"id":"5","nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","gender":1,"city":"绵阳","province":"四川","country":"中国","language":"zh_CN","age":34,"birthday":443376000000,"height":88,"weight":83,"heartRate":73,"grade":0,"token":"cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEZkhVbVRVUktRWmdabG9xN1BFSnlORWdKVFc3RStOdEE9PQ==","extend":"","mobile":null,"lockerInfo":null}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.1.2. 人脸登录v4

开启运营商用户授权的设备,新增返回code=20020,校验data内容1-未授权,2-已过期,3-其他异常;
储物柜新增字段lockerInfo,lockerInfo中字段type:1-已存物,获取存物box,2-未存物,分配存储box,3-未存物,没有合适柜子

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/face/login' -i -X POST \
    -H 'Content-Type: multipart/form-data;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -F 'file=@002.png;type=image/png' \
    -F 'mac=A682A1C5AE00'
请求参数
Parameter Description

mac

登录设备mac,必须

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 658

{"code":10000,"message":"success","data":{"id":"5","nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","gender":1,"city":"绵阳","province":"四川","country":"中国","language":"zh_CN","age":34,"birthday":443376000000,"height":88,"weight":83,"heartRate":73,"grade":0,"token":"cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhFUnZ5R3FuV0JNemdWckVFTWx0Q0JweUh1T2k5aENCSGc9PQ==","extend":"","mobile":null,"lockerInfo":{"type":2,"mac":"A682A1C5AE00","index":"01","name":"01","userId":"5","typeStr":"未存物,分配存储box"}}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code 返回message 返回其他字段

10000

成功

userInfo

20020

用户不能登录

1-未授权,2-已过期,3-其他异常

5.2. 第三方调用模块

5.2.1. 第三方微信公众号用户登录

curl请求
$ curl 'https://iot.daconghealth.com/api/access/login/1865715CD987/onqGbtw0qc_LOAC5ig_vKFIqlZho' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"country":"fc","unionId":"onqGbtw0qc_LOAC5ig_vKFIqlZho","gender":"0","province":"sc","avatarUrl":"http://thirdwx.qlogo.cn/mmopen/TPmXWKPJb1eia13bgmeZsQBa1vnYGUEn7AChFJxfc2DcZPSx1B15IC5cd2Of6KtQZcic1vibcn8HIZkBNia7JVvWaowSDvw7ZXom/132","city":"my","openId":"onqGbtw0qc_LOAC5ig_vKFIqlZho","nickname":"测试","description":"测试添加","language":"cn"}'
http请求
POST /api/access/login/1865715CD987/onqGbtw0qc_LOAC5ig_vKFIqlZho HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 353
Host: iot.daconghealth.com

{"country":"fc","unionId":"onqGbtw0qc_LOAC5ig_vKFIqlZho","gender":"0","province":"sc","avatarUrl":"http://thirdwx.qlogo.cn/mmopen/TPmXWKPJb1eia13bgmeZsQBa1vnYGUEn7AChFJxfc2DcZPSx1B15IC5cd2Of6KtQZcic1vibcn8HIZkBNia7JVvWaowSDvw7ZXom/132","city":"my","openId":"onqGbtw0qc_LOAC5ig_vKFIqlZho","nickname":"测试","description":"测试添加","language":"cn"}
path参数
Table 37. /api/access/login/{mac}/{openId}
Parameter Description

mac

终端MAC地址,不能为空

openId

微信OpenId,不能为空

请求字段说明
Path Type Description

unionId

String

微信公众号unionId

openId

String

微信公众号openId

nickname

String

昵称

avatarUrl

String

头像URL

gender

Integer

1:男性,2:女性,0:未知,可以为空

city

String

所在城市

province

String

所在省份

country

String

所在国家

language

String

语言

description

String

描述/备注,可以为空,不能大于50个字符

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 54

{"code":200,"message":"SUCCESS","data":"登录成功"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.2.2. 第三方APP登录

curl请求
$ curl 'https://iot.daconghealth.com/api/access/other/login' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"identify":"1","avatarUrl":"http://thirdwx.qlogo.cn/mmopen/TPmXWKPJb1eia13bgmeZsQBa1vnYGUEn7AChFJxfc2DcZPSx1B15IC5cd2Of6KtQZcic1vibcn8HIZkBNia7JVvWaowSDvw7ZXom/132","nickname":"测试用户","mac":"1865715CD987","token":"xxxxxxxxxxxx"}'
http请求
POST /api/access/other/login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 236
Host: iot.daconghealth.com

{"identify":"1","avatarUrl":"http://thirdwx.qlogo.cn/mmopen/TPmXWKPJb1eia13bgmeZsQBa1vnYGUEn7AChFJxfc2DcZPSx1B15IC5cd2Of6KtQZcic1vibcn8HIZkBNia7JVvWaowSDvw7ZXom/132","nickname":"测试用户","mac":"1865715CD987","token":"xxxxxxxxxxxx"}
请求字段说明
Path Type Description

mac

String

设备MAC地址,不能为空

identify

String

用户唯一标识,建议传各自系统的用户ID,不能为空

nickname

String

用户昵称,不能为空

avatarUrl

String

用户头像URL,不能为空

token

String

调用各自系统接口需要的token,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 54

{"code":200,"message":"SUCCESS","data":"登录成功"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.2.3. 添加用户

curl请求
$ curl 'https://iot.daconghealth.com/api/access/users' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"country":"fc","unionId":"_zxch@&@onqGbtw0qc_LOAC5ig_vKFIqlZho","gender":"0","province":"sc","avatarUrl":"http://thirdwx.qlogo.cn/mmopen/TPmXWKPJb1eia13bgmeZsQBa1vnYGUEn7AChFJxfc2DcZPSx1B15IC5cd2Of6KtQZcic1vibcn8HIZkBNia7JVvWaowSDvw7ZXom/132","city":"my","openId":"onqGbtw0qc_LOAC5ig_vKFIqlZho","nickname":"测试","description":"测试添加","language":"cn"}'
http请求
POST /api/access/users HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 361
Host: iot.daconghealth.com

{"country":"fc","unionId":"_zxch@&@onqGbtw0qc_LOAC5ig_vKFIqlZho","gender":"0","province":"sc","avatarUrl":"http://thirdwx.qlogo.cn/mmopen/TPmXWKPJb1eia13bgmeZsQBa1vnYGUEn7AChFJxfc2DcZPSx1B15IC5cd2Of6KtQZcic1vibcn8HIZkBNia7JVvWaowSDvw7ZXom/132","city":"my","openId":"onqGbtw0qc_LOAC5ig_vKFIqlZho","nickname":"测试","description":"测试添加","language":"cn"}
请求字段说明
Path Type Description

unionId

String

微信公众号unionId

openId

String

微信公众号openId

nickname

String

昵称

avatarUrl

String

头像URL

gender

Integer

1:男性,2:女性,0:未知,可以为空

city

String

所在城市

province

String

所在省份

country

String

所在国家

language

String

语言

description

String

描述/备注,可以为空,不能大于50个字符

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 42

{"code":200,"message":"success","data":""}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.2.4. 远程退出登录

大屏意外断电或退出时,可以使用小程序或远程调用该接口,通过长连接退出终端.

curl请求
$ curl 'https://iot.daconghealth.com/api/access/logoutBySocket/oMZTg1KsXzXw9NxWRsMZDK30rJp4' -i -X POST \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
POST /api/access/logoutBySocket/oMZTg1KsXzXw9NxWRsMZDK30rJp4 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 38. /api/access/logoutBySocket/{unionId}
Parameter Description

unionId

用户UnionId,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 54

{"code":200,"message":"success","data":"退出成功"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.2.5. 获取某段时间运动记录

curl请求
$ curl 'https://iot.daconghealth.com/api/access/records/intervalReport/oMZTg1I20jWlXygTmAhzW1qyTGis?beginTime=2018-05-10+11%3A00%3A00&endTime=2018-05-16+23%3A00%3A00' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/access/records/intervalReport/oMZTg1I20jWlXygTmAhzW1qyTGis?beginTime=2018-05-10+11%3A00%3A00&endTime=2018-05-16+23%3A00%3A00 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 39. /api/access/records/intervalReport/{unionId}
Parameter Description

unionId

用户UnionId,不能为空

请求参数
Parameter Description

beginTime

跑步开始时间,不能为空

endTime

跑步结束时间,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 44

{"code":200,"message":"success","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

运动报告数据

5.2.6. 获得设备列表

curl请求
$ curl 'https://iot.daconghealth.com/api/access/devices?pageNum=1&pageSize=5&keyWord=%E8%B7%91%E6%AD%A5' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/access/devices?pageNum=1&pageSize=5&keyWord=%E8%B7%91%E6%AD%A5 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

keyWord

设备名称,可以为空,用作模糊查询

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1023

{"code":200,"message":"success","data":{"total":5,"list":[{"longitude":104.705022,"latitude":31.471422,"name":"跑步机1号","mac":"54E1AD3160EE","address":"园艺山创新中心2期","using":true},{"longitude":104.705022,"latitude":31.471422,"name":"跑步机2号","mac":"54E1AD31B05F","address":"园艺山创新中心2期","using":false},{"longitude":104.705022,"latitude":31.471422,"name":"跑步机","mac":"1865715CDA31","address":"园艺山创新中心2期","using":false},{"longitude":104.705022,"latitude":31.471422,"name":"跑步机","mac":"1865715CD987","address":"园艺山创新中心2期","using":true},{"longitude":104.705022,"latitude":31.471422,"name":"真实跑步机504","mac":"1865714D268F","address":"园艺山创新中心2期","using":false}],"pageNum":1,"pageSize":5,"size":5,"startRow":1,"endRow":5,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].longitude

Double

经度

data.list[].latitude

Double

纬度

data.list[].name

String

设备名称

data.list[].mac

String

设备名称

data.list[].address

String

具体地址

data.list[].using

Boolean

是否使用中

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

5.3. 第三方设备绑定模块

第三方设备绑定模块相关的接口。

5.3.1. 绑定第三方设备

curl请求
$ curl 'https://iot.daconghealth.com/api/access/users/5/bind/1865715CDA31' -i -X POST \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
POST /api/access/users/5/bind/1865715CDA31 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 40. /api/access/users/{userId}/bind/{mac}
Parameter Description

userId

用户ID,不能为空

mac

第三方设备mac,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 56

{"code":10000,"message":"success","data":"绑定成功"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.3.2. 解绑第三方设备

curl请求
$ curl 'https://iot.daconghealth.com/api/access/users/5/unbind' -i -X POST \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
POST /api/access/users/5/unbind HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 41. /api/access/users/{userId}/unbind
Parameter Description

userId

用户ID,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 56

{"code":10000,"message":"success","data":"解绑成功"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.3.3. 第三方设备开锁

加密字段作为Authorization

curl请求
$ curl 'https://iot.daconghealth.com/api/bind/auth/1865715CDA31' -i -X POST \
    -H 'Authorization: ff4da736b5d6302997333d436d03485f.010203010203.1563865885'
http请求
POST /api/bind/auth/1865715CDA31 HTTP/1.1
Authorization: ff4da736b5d6302997333d436d03485f.010203010203.1563865885
Host: iot.daconghealth.com
path参数
Table 42. /api/bind/auth/{mac}
Parameter Description

mac

跑步机,不能为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 689

{"code":10000,"message":"success","data":{"XHareToken":"UHpFNnpVSzloeTkrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDWDVabHpIZXZiWE55QnVJTTN5TDJrRnZtM292aTVSWHc9PQ==","loginInfo":{"id":"1","nickname":"星火","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132","gender":null,"city":null,"province":null,"country":null,"language":null,"age":0,"birthday":null,"height":170,"weight":130,"heartRate":80,"grade":0,"token":"UHpFNnpVSzloeTkrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDWDVabHpIZXZiWE55QnVJTTN5TDJrRnZtM292aTVSWHc9PQ==","extend":null,"mobile":null,"lockerInfo":null}}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.XHareToken

String

token令牌

data.loginInfo

JSONObject

登录信息

5.4. 单车接口

保留的单车接口。

5.4.1. 上传单车运动记录

curl请求
$ curl 'https://iot.daconghealth.com/api/wxApp/bicycle/record' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOY1ZDaDJ1blNNTHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"duration":420,"avgRotationRate":10,"avgPower":10,"distance":100,"successRate":95,"record":"{}","calorie":50,"startTime":"2024-08-19 14:35:11","type":1,"mac":"1865715CD98B","programId":"1","remarks":"测试上传"}'
http请求
POST /api/wxApp/bicycle/record HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOY1ZDaDJ1blNNTHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 215
Host: iot.daconghealth.com

{"duration":420,"avgRotationRate":10,"avgPower":10,"distance":100,"successRate":95,"record":"{}","calorie":50,"startTime":"2024-08-19 14:35:11","type":1,"mac":"1865715CD98B","programId":"1","remarks":"测试上传"}
请求字段说明
Path Type Description

mac

String

MAC地址,不能为空

startTime

Date

开始时间

duration

Integer

运动时长,单位:秒

distance

Integer

运动距离,单位:米

calorie

Integer

热量,单位:kcal

avgPower

Integer

平均功率,单位:w

avgRotationRate

Integer

平均转速

type

Integer

骑行类型:101-自由骑行,102-距离倒计模式,103-时间倒计模式,104-卡路里倒计模式,105-实景模式,106-程序模式

programId

String

程序模式程序ID

successRate

Integer

达标率,与程序模式相关

record

String

运动记录明细数据

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.4.2. 查询运动总的统计数据

只保留单车数据

curl请求
$ curl 'https://iot.daconghealth.com/api/wxApp/sports/total' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLazJVQTBQOElIYnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/wxApp/sports/total HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLazJVQTBQOElIYnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 111

{"code":10000,"message":"success","data":{"bicycle":{"distance":566,"calorie":6,"duration":37,"remarks":null}}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.bicycle

JSONObject

单车运动数据

5.4.3. 查询运动今天的统计数据

只保留单车数据

curl请求
$ curl 'https://iot.daconghealth.com/api/wxApp/sports/today' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQemw3TWV6cGoydXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/wxApp/sports/today HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQemw3TWV6cGoydXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 157

{"code":10000,"message":"success","data":{"bicycle":null,"bicycleRank":{"type":null,"userId":null,"nickname":null,"avatarUrl":null,"value":null,"rankNo":0}}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.bicycle

JSONObject

单车运动数据

data.bicycleRank

JSONObject

单车运动排名

5.4.4. 查询运动排名记录

只保留查询单车排名

curl请求
$ curl 'https://iot.daconghealth.com/api/wxApp/sports/rank?pageNum=1&pageSize=5&type=3' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIcWFlTFlhTFN2V3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/wxApp/sports/rank?pageNum=1&pageSize=5&type=3 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIcWFlTFlhTFN2V3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

type

运动类型,3-单车,目前只保留传3,可以不传

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 766

{"code":10000,"message":"success","data":{"total":1256,"list":[{"type":3,"userId":"5157","nickname":null,"avatarUrl":null,"value":582138,"rankNo":1},{"type":3,"userId":"2022","nickname":null,"avatarUrl":null,"value":108972,"rankNo":2},{"type":3,"userId":"1884","nickname":null,"avatarUrl":null,"value":78408,"rankNo":3},{"type":3,"userId":"1900","nickname":null,"avatarUrl":null,"value":73853,"rankNo":4},{"type":3,"userId":"1859","nickname":null,"avatarUrl":null,"value":59535,"rankNo":5}],"pageNum":1,"pageSize":5,"size":5,"startRow":1,"endRow":5,"pages":252,"prePage":0,"nextPage":2,"isFirstPage":true,"isLastPage":false,"hasPreviousPage":false,"hasNextPage":true,"navigatePages":8,"navigatepageNums":[1,2,3,4,5,6,7,8],"navigateFirstPage":1,"navigateLastPage":8}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].type

Integer

终端类型(0-未知,1-跑步机,2-撸铁设备,3-单车,4-跳绳)

data.list[].userId

Integer

用户ID

data.list[].nickname

String

用户昵称

data.list[].avatarUrl

String

用户头像

data.list[].value

Integer

值,与type对应

data.list[].rankNo

Integer

排名

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

5.5. 储物柜模块

locker-表示储物柜,box-表示储物柜的柜子

5.5.1. 储物柜发送消息

开关门消息

topic:

    client/locker/{mac}/door

消息体:

{
    "mac":"mac",
    "index":"01",
    "door":"0-关闭,1-打开"
}
状态改变消息

topic:

    client/locker/{mac}/status

消息体:

{
    "mac":"mac",
    "index":"01,为空,更新全部box状态,不为空,更新指定box状态",
    "status":"状态,0-正常,1-禁用,2-故障",
    "remarks":"故障等备注"
}
取物等消息

topic:

    client/locker/{mac}/take

消息体:

临时取物:
{
    "mac":"mac",
    "index":"01,不能为空",
    "userId":"5,用户ID",
    "free":"1",
    "remarks":"备注"
}
退柜取物:
{
    "mac":"mac",
    "index":"01,不能为空",
    "userId":"5,用户ID",
    "free":"0",
    "remarks":"备注"
}
一键取物:
{
    "mac":"mac",
    "index":"为空",
    "free":"0",
    "remarks":"备注"
}
查询全部box消息

topic:

    client/locker/{mac}/query

消息体:

{
    "mac":"mac",
    "remarks":"备注"
}
上线消息

topic:

    client/locker/{mac}/online

消息体:

{
    "mac":"mac",
    "remarks":"备注"
}

5.5.2. 储物柜接收消息

扫码开锁消息

topic:

    server/locker/{mac}/open

消息体:

{
    "type":"1-已存物,获取存物box,2-未存物,分配存储box,3-未存物,没有合适柜子",
    "mac":"mac",
    "index":"01,box编号",
    "name":"柜门名字"
}
储物柜状态消息

locker或者box状态有变化的时候会发送此消息

topic:

    server/locker/{mac}/status

消息体:

{
    "mac":"mac",
    "status":"寄存柜状态,0-正常,1-禁用,2-故障",
    "num":"5,box数量",
    "freeNum":"5,可用数量"
}
储物柜查询返回消息

返回全部box的数据列表

topic:

    server/locker/{mac}/list

消息体:

[
    {
        "mac":"mac",
        "index":"01",
        "name":"01",
        "status":"box状态,0-正常,1-禁用,2-故障",
        "free":"box是否存物,0-空闲,1-存物",
        "door":"box柜门状态,0-关闭,1-打开",
        "remarks":"备注"
    }
]

5.6. 高德地图模块

高德地图Web服务端相关的接口。

5.6.1. IP定位

通过调用接口获取请求端的IP地址,再通过IP地址到高德查询所在的地理位置;
同一IP的定位信息缓存3天;
接口返字段参见高德地图Web服务端文档(点击打开文档

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/amap/position' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 267

{"code":10000,"message":"success","data":"{\"info\":\"USER_KEY_RECYCLED\",\"infocode\":\"10013\",\"status\":\"0\",\"sec_code_debug\":\"d41d8cd98f00b204e9800998ecf8427e\",\"key\":\"17ee8aea5881d4e161ebc24afdc4c480\",\"sec_code\":\"d41d8cd98f00b204e9800998ecf8427e\"}"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.6.2. 行政区域查询

通过调用接口查询行政区域数据;
同一请求参数的行政区域数据缓存30天;
接口参数和返字段参见高德地图Web服务端文档(点击打开文档

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/amap/district?subdistrict=1&keywords=%E5%9B%9B%E5%B7%9D' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
请求参数
Parameter Description

keywords

见高德地图API文档

subdistrict

见高德地图API文档

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 267

{"code":10000,"message":"success","data":"{\"info\":\"USER_KEY_RECYCLED\",\"infocode\":\"10013\",\"status\":\"0\",\"sec_code_debug\":\"d41d8cd98f00b204e9800998ecf8427e\",\"key\":\"17ee8aea5881d4e161ebc24afdc4c480\",\"sec_code\":\"d41d8cd98f00b204e9800998ecf8427e\"}"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.6.3. 天气查询

通过调用接口查询天气;
同一请求参数的天气数据缓存3小时;
接口参数和返字段参见高德地图Web服务端文档(点击打开文档

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/amap/weather?city=110101' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
请求参数
Parameter Description

city

城市编码,见高德地图API文档

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 267

{"code":10000,"message":"success","data":"{\"info\":\"USER_KEY_RECYCLED\",\"infocode\":\"10013\",\"status\":\"0\",\"sec_code_debug\":\"d41d8cd98f00b204e9800998ecf8427e\",\"key\":\"17ee8aea5881d4e161ebc24afdc4c480\",\"sec_code\":\"d41d8cd98f00b204e9800998ecf8427e\"}"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

5.6.4. 查询高德应用key

curl请求
$ curl 'https://iot.daconghealth.com/api/v3/common/amap/key?packageName=com.daconghealth.dc&sha1=B6%3AA1%3A68%3A4C%3A74%3AD7%3A89%3A9D%3AA8%3A95%3A4D%3AB8%3A95%3A78%3A21%3AF9%3A20%3AC6%3A6A%3A46' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
请求参数
Parameter Description

packageName

包名

sha1

发布版安全码SHA1

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 76

{"code":10000,"message":"success","data":"cd93ea4a0df14552a34990304d0ccbcf"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

6. 按运营商排序需求新增模块

6.1. 实时排名模块

实时排名模块相关的接口。

6.1.1. 获得排行榜

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/rank/list?pageNum=1&pageSize=9&userId=1&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDQk1MOHNvUEgrTHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/rank/list?pageNum=1&pageSize=9&userId=1&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDQk1MOHNvUEgrTHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

userId

用户ID,可以为空

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 538

{"code":200,"message":"success","data":{"total":1,"list":[{"ranking":2,"nickname":"星火","distance":20.0,"avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132","city":null,"province":null}],"pageNum":1,"pageSize":9,"size":1,"startRow":1,"endRow":1,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONArray

list

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

6.1.2. 获得用户在排行榜中页数

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/rank/pageNum?userId=2&pageSize=9&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOZmFvYjh6S3o5Tnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/rank/pageNum?userId=2&pageSize=9&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOZmFvYjh6S3o5Tnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

pageSize

每页条数,不能为空

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 41

{"code":200,"message":"success","data":1}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

Integer

所在页数

6.1.3. 获得用户排名

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/rank/rankingNo?userId=5&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLZnBYU2JGRXhNTnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/rank/rankingNo?userId=5&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLZnBYU2JGRXhNTnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 41

{"code":200,"message":"success","data":3}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

Integer

用户名次

6.1.4. 获得用户等级

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/rank/userGrade?userId=1&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDUkFNODhoVW9uUXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/rank/userGrade?userId=1&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhDUkFNODhoVW9uUXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户Id,不能为空

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 41

{"code":200,"message":"success","data":0}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

Integer

用户等级

6.1.5. 获得排行榜中临近的排名信息

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/rank/near?userId=1&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBaEdUR2w4UTh0eHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/rank/near?userId=1&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBaEdUR2w4UTh0eHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

userId

用户ID,不能为空

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 482

{"code":200,"message":"success","data":[{"ranking":1,"nickname":"noyesz","distance":100.0,"avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132","city":null,"province":null},{"ranking":2,"nickname":"星火","distance":20.0,"avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132","city":null,"province":null}]}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONOArray

响应数据

data[].nickname

String

昵称

data[].ranking

Date

排名

data[].distance

Float

距离

data[].avatarUrl

String

用户头像

data[].province

String

用户所在省份

data[].city

String

用户所在城市

6.2. 运动数据

所有运动数据查询相关接口。

6.2.1. 查询运动记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/sports/record?pageNum=1&pageSize=5&type=1&from=2020-07-01&to=2020-08-01&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPaGIxKzZRRlkxdHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/sports/record?pageNum=1&pageSize=5&type=1&from=2020-07-01&to=2020-08-01&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhPaGIxKzZRRlkxdHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

type

运动类型,1-跑步机,2-撸铁设备,3-单车,4-跳绳

from

开始日期,格式必须为:yyyy-MM-dd

to

截止日期,格式必须为:yyyy-MM-dd

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 320

{"code":10000,"message":"success","data":{"total":0,"list":[],"pageNum":1,"pageSize":5,"size":0,"startRow":0,"endRow":0,"pages":0,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[],"navigateFirstPage":0,"navigateLastPage":0}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

6.2.2. 查询运动排名记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/sports/rank?pageNum=1&pageSize=5&period=0&type=0&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGQUFmRDgvTGhxOXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/sports/rank?pageNum=1&pageSize=5&period=0&type=0&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGQUFmRDgvTGhxOXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

period

0-全部数据,1-按天数据,2-按周数据,3-按月数据,4-按年数据

type

运动类型,0-全部运动,1-跑步机,2-撸铁设备,3-单车,4-跳绳

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 736

{"code":10000,"message":"success","data":{"total":2,"list":[{"type":0,"userId":"5","nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","value":500,"rankNo":1},{"type":0,"userId":"1","nickname":"星火","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132","value":10,"rankNo":2}],"pageNum":1,"pageSize":5,"size":2,"startRow":1,"endRow":2,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

6.2.3. 查询用户的运动排名记录

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/sports/rank/user?period=1&type=1&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMRjRkRVJVSzh6c3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/sports/rank/user?period=1&type=1&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhMRjRkRVJVSzh6c3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

period

0-全部数据,1-按天数据,2-按周数据,3-按月数据,4-按年数据

type

运动类型,0-全部运动,1-跑步机,2-撸铁设备,3-单车,4-跳绳

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 46

{"code":10000,"message":"success","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

6.3. 活动模块[新版]

活动模块相关接口。

6.3.1. 根据ID查找

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/public/activity/1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGdmV1cERwTmgwNHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/public/activity/1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGdmV1cERwTmgwNHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 43. /api/v4/public/activity/{id}
Parameter Description

id

活动ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 936

{"code":10000,"message":"success","data":{"id":"1","name":"4月跑量大挑战","top":0,"type":"1","rankType":1,"status":1,"operatorIds":"4,5","operatorIdList":null,"startTime":"2023-04-01 10","endTime":"2024-04-30 23","signStartTime":"2023-04-01 10","signEndTime":"2024-04-30 10","adImg":"1","adHeaderImg":"1","adDetailImg":"1","wxCoverImg":"1","wxHeaderImg":"1","wxDetailImg":"1","maxUsers":0,"amountUsers":2,"remarks":"test","createTime":"2023-04-23 15:57:01","updateTime":"2023-05-22 16:30:09","adImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"adHeaderImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"adDetailImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"wxCoverImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"wxHeaderImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"wxDetailImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

数据ID

data.name

String

活动名字

data.top

Integer

是否推荐,1-推荐,0-未推荐

data.type

String

运动类型,多个用逗号隔开

data.rankType

Integer

活动排名类型,1-按距离排名,2-按卡路里排名

data.status

Integer

活动状态,0-未开始,1-进行中,2-已结束

data.operatorIds

String

参与活动的运营商id,多个用逗号隔开

data.startTime

Date

活动开始时间,精确到整点

data.endTime

Date

活动结束时间,精确到整点

data.signStartTime

Date

报名开始时间,精确到整点

data.signEndTime

Date

报名结束时间,精确到整点

data.adImg

String

大屏活动宣传图片id,,可多张,用逗号隔开

data.adImgUrls

List

大屏活动宣传图片url

data.adHeaderImg

String

大屏活动详情顶部栏图片id,可多张,用逗号隔开

data.adHeaderImgUrls

List

大屏活动详情顶部栏图片url

data.adDetailImg

String

大屏活动详情图片id,可多张,用逗号隔开

data.adDetailImgUrls

List

大屏活动详情图片url

data.wxCoverImg

String

小程序活动封面图片id,,可多张,用逗号隔开

data.wxCoverImgUrls

List

小程序活动封面图片url

data.wxHeaderImg

String

小程序活动详情顶部栏图片id,可多张,用逗号隔开

data.wxHeaderImgUrls

List

小程序活动详情顶部栏图片url

data.wxDetailImg

String

小程序活动详情图片id,可多张,用逗号隔开

data.wxDetailImgUrls

List

小程序活动详情图片url

data.maxUsers

Integer

活动最多参与人数,为0表示不限制

data.amountUsers

Integer

活动参与人数

data.remarks

String

描述/备注

data.createTime

Date

创建时间

data.updateTime

Date

更新时间

6.3.2. 大屏端查询活动列表

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/public/activity/list?mac=1865715CDA31' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/v4/public/activity/list?mac=1865715CDA31 HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
请求参数
Parameter Description

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 651

{"code":10000,"message":"success","data":{"list":[{"id":"1","name":"4月跑量大挑战","top":0,"type":"1","rankType":1,"status":1,"operatorIds":"4,5","startTime":"2023-04-01 10","endTime":"2024-04-30 23","signStartTime":"2023-04-01 10","signEndTime":"2024-04-30 10","adImg":"1","adImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"adHeaderImg":"1","adHeaderImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"adDetailImg":"1","adDetailImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"maxUsers":0,"amountUsers":2,"remarks":"test","createTime":"2023-04-23 15:57:01","updateTime":"2023-05-22 16:30:09"}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].name

String

活动名字

data.list[].top

Integer

是否推荐,1-推荐,0-未推荐

data.list[].type

Integer

运动类型,多个用逗号隔开

data.list[].rankType

Integer

活动排名类型,1-按距离排名,2-按卡路里排名

data.list[].status

Integer

活动状态,0-未开始,1-进行中,2-已结束

data.list[].operatorIds

String

参与活动的运营商id,多个用逗号隔开

data.list[].startTime

Date

活动开始时间,精确到整点

data.list[].endTime

Date

活动结束时间,精确到整点

data.list[].signStartTime

Date

报名开始时间,精确到整点

data.list[].signEndTime

Date

报名结束时间,精确到整点

data.list[].adImg

String

大屏活动宣传图片id,,可多张,用逗号隔开

data.list[].adImgUrls

List

大屏活动宣传图片url

data.list[].adHeaderImg

String

大屏活动详情顶部栏图片id,可多张,用逗号隔开

data.list[].adHeaderImgUrls

List

大屏活动详情顶部栏图片url

data.list[].adDetailImg

String

大屏活动详情图片id,可多张,用逗号隔开

data.list[].adDetailImgUrls

List

大屏活动详情图片url

data.list[].maxUsers

Integer

活动最多参与人数,为0表示不限制

data.list[].amountUsers

Integer

活动参与人数

data.list[].remarks

String

描述/备注

data.list[].createTime

Date

创建时间

data.list[].updateTime

Date

修改时间

6.3.3. 用户是否参加某活动

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/activity/isJoined/1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQVzBWY2NmNHJPU3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/activity/isJoined/1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhQVzBWY2NmNHJPU3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 44. /api/v4/activity/isJoined/{activityId}
Parameter Description

activityId

活动ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 46

{"code":10000,"message":"success","data":true}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

boolean

是否参加过

6.3.4. 用户报名活动

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/activity/join' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEWFNFTC9TMEpuS3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"userAddress":"联系地址","activityId":"1","userTel":"联系电话","userName":"用户名","remarks":"测试"}'
http请求
POST /api/v4/activity/join HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhEWFNFTC9TMEpuS3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 114
Host: iot.daconghealth.com

{"userAddress":"联系地址","activityId":"1","userTel":"联系电话","userName":"用户名","remarks":"测试"}
请求字段说明
Path Type Description

activityId

String

活动ID,不能为空

userName

String

名字,不能为空

userTel

String

联系电话,不能为空

userAddress

String

联系地址

remarks

String

备注

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 79

{"code":30020,"message":"未在活动报名时间内,不能参加","data":null}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code说明
返回code 返回message 返回其他字段

10000

报名成功

10004

参数有误

30020

未在活动报名时间内不能参加

30021

用户已报名该活动

30022

活动参与人数已满

6.3.5. 用户参加的活动列表

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/activity/joined?status=1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGeTN4ZTJxdjArMHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/activity/joined?status=1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGeTN4ZTJxdjArMHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

status

活动状态,0-未开始,1-进行中,2-已结束,可以为空

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 661

{"code":10000,"message":"success","data":{"list":[{"id":"1","name":"4月跑量大挑战","top":0,"type":"1","rankType":1,"status":1,"operatorIds":"4,5","startTime":"2023-04-01 10","endTime":"2024-04-30 23","signStartTime":"2023-04-01 10","signEndTime":"2024-04-30 10","wxCoverImg":"1","wxCoverImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"wxHeaderImg":"1","wxHeaderImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"wxDetailImg":"1","wxDetailImgUrls":["http://huipaotu.xbrowser.cn/lining/activity_bg1.jpg"],"maxUsers":0,"amountUsers":2,"remarks":"test","createTime":"2023-04-23 15:57:01","updateTime":"2023-05-22 16:30:09"}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].name

String

活动名字

data.list[].top

Integer

是否推荐,1-推荐,0-未推荐

data.list[].type

Integer

运动类型,多个用逗号隔开

data.list[].rankType

Integer

活动排名类型,1-按距离排名,2-按卡路里排名

data.list[].status

Integer

活动状态,0-未开始,1-进行中,2-已结束

data.list[].operatorIds

String

参与活动的运营商id,多个用逗号隔开

data.list[].startTime

Date

活动开始时间,精确到整点

data.list[].endTime

Date

活动结束时间,精确到整点

data.list[].signStartTime

Date

报名开始时间,精确到整点

data.list[].signEndTime

Date

报名结束时间,精确到整点

data.list[].wxCoverImg

String

小程序活动封面图片id,,可多张,用逗号隔开

data.list[].wxCoverImgUrls

List

小程序活动封面图片url

data.list[].wxHeaderImg

String

小程序活动详情顶部栏图片id,可多张,用逗号隔开

data.list[].wxHeaderImgUrls

List

小程序活动详情顶部栏图片url

data.list[].wxDetailImg

String

小程序活动详情图片id,可多张,用逗号隔开

data.list[].wxDetailImgUrls

List

小程序活动详情图片url

data.list[].maxUsers

Integer

活动最多参与人数,为0表示不限制

data.list[].amountUsers

Integer

活动参与人数

data.list[].remarks

String

描述/备注

data.list[].createTime

Date

创建时间

data.list[].updateTime

Date

修改时间

6.3.6. 查询活动参与的人员列表

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/activity/1/user/list?pageNum=1&pageSize=5' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBUmxTNjZ3ek14bnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/activity/1/user/list?pageNum=1&pageSize=5 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhBUmxTNjZ3ek14bnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 45. /api/v4/activity/{activityId}/user/list
Parameter Description

activityId

活动ID,必填

请求参数
Parameter Description

pageNum

页码,第一页页码为1,默认值为1

pageSize

页长,默认值为10

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 937

{"code":10000,"message":"success","data":{"total":2,"list":[{"id":"2","userId":"5","userName":"kk","userTel":"13566778898","userAddress":"创新中心","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","nickName":"PK","rankValue":500,"calorie":0,"rankNo":1,"remarks":null},{"id":"1","userId":"1","userName":"zk","userTel":"13566778899","userAddress":"创新中心","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132","nickName":"星火","rankValue":100,"calorie":0,"rankNo":2,"remarks":null}],"pageNum":1,"pageSize":5,"size":2,"startRow":1,"endRow":2,"pages":1,"prePage":0,"nextPage":0,"isFirstPage":true,"isLastPage":true,"hasPreviousPage":false,"hasNextPage":false,"navigatePages":8,"navigatepageNums":[1],"navigateFirstPage":1,"navigateLastPage":1}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

data.list[].id

Integer

数据ID

data.list[].userId

String

用户ID

data.list[].userName

String

名字

data.list[].userTel

String

联系电话

data.list[].userAddress

String

联系地址

data.list[].avatarUrl

String

用户头像

data.list[].nickName

String

用户昵称

data.list[].calorie

Integer

卡路里

data.list[].rankValue

Integer

排名值

data.list[].rankNo

Integer

排名

data.list[].remarks

String

描述/备注

data.pageNum

Integer

页码

data.pageSize

Integer

页长

data.size

Integer

查询总数

data.startRow

Integer

初始行数

data.endRow

Integer

结尾行数

data.total

Integer

总数

data.pages

Integer

总页数

data.prePage

Integer

前页页数

data.nextPage

Integer

后页页数

data.isFirstPage

Boolean

是否是第一页

data.isLastPage

Boolean

是否是最后一页

data.hasPreviousPage

Boolean

是否还有前页

data.hasNextPage

Boolean

是否还有后页

data.navigatePages

Integer

导航页码数

data.navigatepageNums

Integer[]

所有导航页号

data.navigateFirstPage

Integer

导航第一页

data.navigateLastPage

Integer

导航最后页

6.3.7. 查询自己参与参与活动的信息

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/activity/1/user' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNd1J5TWJ1b3JHM3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/activity/1/user HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhNd1J5TWJ1b3JHM3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 46. /api/v4/activity/{activityId}/user
Parameter Description

activityId

活动ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 349

{"code":10000,"message":"success","data":{"id":"2","userId":"5","userName":"kk","userTel":"13566778898","userAddress":"创新中心","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132","nickName":"PK","rankValue":500,"calorie":0,"rankNo":1,"remarks":null}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.id

String

数据ID

data.userId

String

用户ID

data.userName

String

名字

data.userTel

String

联系电话

data.userAddress

String

联系地址

data.avatarUrl

String

用户头像

data.nickName

String

用户昵称

data.calorie

Integer

卡路里

data.rankValue

Integer

排名值

data.rankNo

Integer

排名

data.remarks

String

描述/备注

6.3.8. 用户取消报名活动

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/activity/unJoin/1' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLd3hqWnpzU1hFd3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/activity/unJoin/1 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLd3hqWnpzU1hFd3k0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 47. /api/v4/activity/unJoin/{activityId}
Parameter Description

activityId

活动ID,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

6.4. 投屏模块

6.4.1. 投屏注册

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/common/cast/reg' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=' \
    -d '{"devId":"c0fe500aa775b5a0","mac":"4C24CE559304"}'
http请求
POST /api/v4/common/cast/reg HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Content-Length: 49
Host: iot.daconghealth.com

{"devId":"c0fe500aa775b5a0","mac":"4C24CE559304"}
请求字段说明
Path Type Description

mac

String

MAC地址

devId

String

注册用Dev-ID

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 60

{"code":10000,"message":"success","data":"1907df9b58496513"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

返回code说明
返回code 返回message 返回其他字段

10000

报名成功

30090

投屏注册接口调用返回错误

接口返回错误信息

7. 竞技模块

7.1. 竞技模块

竞技模块相关的接口。

7.1.1. 获得下一场竞技时间

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/athletics/next?type=1&roomType=1&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHWXNINU9ZOUlOWnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/athletics/next?type=1&roomType=1&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHWXNINU9ZOUlOWnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

type

运动类型,不能为空

roomType

房间类型,1-500m,2-1000m,3-2000m,不能为空

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 100

{"code":10000,"message":"success","data":{"next":"2024-08-19 14:45:00","now":"2024-08-19 14:35:23"}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.now

String

当前时间

data.next

String

下一场竞赛开始时间

7.1.2. 进入房间

进入房间后订阅下文对应主题消息,根据状态订阅不同主题

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/athletics/enter' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOUmVzYjZvOVBvMHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d 'type=1&roomType=1&mac=1865715CDA31'
http请求
POST /api/v4/athletics/enter HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhOUmVzYjZvOVBvMHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com

type=1&roomType=1&mac=1865715CDA31
请求参数
Parameter Description

type

运动类型,不能为空

roomType

房间类型,1-500m,2-1000m,3-2000m,不能为空

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 264

{"code":10000,"message":"success","data":{"userList":[{"userId":"5","nickname":"PK","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/xxImyjF3jpsSVxtNxCTnYziaNiby6bZA6tTBuic34wezt0XaiaibrBeD5vYvDe7fetMGsJM9FUgibenTWkicR9BZYLvpQ/132"}],"roomNo":"1-1-20240819144500-1"}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

code

Integer

响应状态码

data.roomNo

String

房间号

data.userList

List

房间参与人员列表

7.1.3. 离开房间

离开房间后,取消订阅所有主题

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/athletics/leave' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLMmlkQTE1ekN6RHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d 'roomNo=7-1-2000-111&mac=1865715CDA31'
http请求
POST /api/v4/athletics/leave HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLMmlkQTE1ekN6RHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com

roomNo=7-1-2000-111&mac=1865715CDA31
请求参数
Parameter Description

roomNo

房间号,不能为空

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 51

{"code":10000,"message":"success","data":"success"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

7.1.4. 竞技房间内排名

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/athletics/rank?roomNo=7-1-2000-111&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGQnJzTzRsZ0hHbnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/athletics/rank?roomNo=7-1-2000-111&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhGQnJzTzRsZ0hHbnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

roomNo

房间号,不能为空

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 936

{"code":10000,"message":"success","data":{"list":[{"id":"1","roomNo":"7-1-2000-111","userId":"1","status":0,"mac":null,"distance":0,"calorie":0,"duration":0,"number":0,"avgFrequency":0,"avgSpeed":0,"avgPower":0,"maxPower":0,"work":0,"remarks":null,"createTime":"2023-05-19 14:12:51","updateTime":"2023-05-19 14:12:51","nickname":"星火","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132","rankNo":1},{"id":"2","roomNo":"7-1-2000-111","userId":"2","status":0,"mac":null,"distance":0,"calorie":0,"duration":0,"number":0,"avgFrequency":0,"avgSpeed":0,"avgPower":0,"maxPower":0,"work":0,"remarks":null,"createTime":"2023-05-19 14:12:59","updateTime":"2023-05-19 14:12:59","nickname":"noyesz","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erjJQKmtNB5ohriawLmQuQq13ibVrAouSchPB4CCED9icyvr6TYoib849pj7klmQ0gRv5WWDo7lfU7sZQ/132","rankNo":2}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

7.1.5. 竞技赛的前N名

curl请求
$ curl 'https://iot.daconghealth.com/api/v4/athletics/top?type=1&roomType=1&count=10&mac=1865715CDA31' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIcUt2aElBWC8zSHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/v4/athletics/top?type=1&roomType=1&count=10&mac=1865715CDA31 HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhIcUt2aElBWC8zSHk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
请求参数
Parameter Description

type

运动类型,不能为空

roomType

房间类型,1-500m,2-1000m,3-2000m,不能为空

count

top数量

mac

设备mac地址

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 53

{"code":10000,"message":"success","data":{"list":[]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.list

JSONOArray

数据列表

7.2. 竞技房间MQTT消息

竞技房间MQTT消息介绍

7.2.1. 接收消息

1.进入房间,竞赛开始前,接收房间人员变化

调用上节进入房间接口后,订阅该主题

主题:

server/athletics/users/{roomNo}

消息体:

[{"avatarUrl":"xxxx","nickname":"PK","userId":"5"}]
2.在房间里,竞技开始前,接收竞技开始消息

调用上节进入房间接口后,订阅该主题

主题:

server/athletics/start/{roomNo}

消息体:

{"roomNo":"xxxx"}
3.竞技中,接收竞技参与人员排行榜

调用上节进入房间接口后(或者收到竞技开始消息后),订阅该主题

主题:

server/athletics/rank/{roomNo}

消息体:

[{"avatarUrl":"xxxx","avgFrequency":0,"avgPower":0,"avgSpeed":0,"calorie":0,"createTime":1684736068000,"distance":0,"duration":0,"id":"13","mac":"1123431","maxPower":0,"nickname":"PK","number":0,"rankNo":1,"roomNo":"1-1-20230522141500-1","status":1,"updateTime":1684736130000,"userId":"5","work":0}]
4.竞技结束后,接收竞技结束消息

调用上节进入房间接口后,订阅该主题

主题:

server/athletics/finish/{roomNo}

消息体:

{"roomNo":"xxxx"}

7.2.2. 发送消息

1.竞技中,发送实时运动数据

收到竞技开始消息后,每隔固定时间发送一次

主题:

client/athletics/{roomNo}/data

消息体:

{
	"userId": "5", // 用户ID
	"avgPower": 0, // 平均功率
	"avgSpeed": 0, // 平均速度
	"calorie": 0,  // 卡路里
	"distance": 0, // 距离
	"duration": 0, // 时长
	"maxPower": 0, // 最大功率
	"number": 0,   //频次
	"status": 1,   //状态,2-进行中,3-已完成
}

8. 共享跑步机模块

目前方案是针对军霞经开区共享跑步机定制

8.1. 跑步机共享接口

8.1.1. 获取二维码数据

跑步机传入设备MAC获取二维码数据;接口返回二维码文本(由APP生成二维码)和二维码有效时间(单位为秒)。

curl请求
$ curl 'https://iot.daconghealth.com/api/share/qrcode/8CFCA0117B5E' -i -X GET \
    -H 'Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc='
http请求
GET /api/share/qrcode/8CFCA0117B5E HTTP/1.1
Authorization: Basic:MTIzNDU2Nzg6ZXdxZWRld3QzdDQydGc=
Host: iot.daconghealth.com
path参数
Table 48. /api/share/qrcode/{mac}
Parameter Description

mac

设备的mac,去除冒号,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 161

{"code":10000,"message":"success","data":{"qr":"http://sharing.xmorefitness.com/qrcode/scan?mac=8CFCA0117B5E&timestamp=1724049312641","expire":300,"appid":null}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data.qr

String

生成二维码数据

data.expire

Integer

二维码有效时间,单位秒

8.1.2. 小程序查询状态

小程序扫码跑步机二维码后,调用此接口,查询设备是否在线,是否被共享,是否有未完成的共享,是否购买用户扫码;
; 如果未被共享返回设备对应套餐信息。

curl请求
$ curl 'https://iot.daconghealth.com/api/share/query/8CFCA0117B5E' -i -X GET \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHOEN4aUFORDdWVXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ=='
http请求
GET /api/share/query/8CFCA0117B5E HTTP/1.1
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhHOEN4aUFORDdWVXk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Host: iot.daconghealth.com
path参数
Table 49. /api/share/query/{mac}
Parameter Description

mac

设备的mac,去除冒号,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 548

{"code":10000,"message":"success","data":{"list":[{"id":"1","operatorId":"1","deviceType":1,"name":"30分钟套餐","detail":"30分钟方式跑","duration":30,"fee":500,"discount":100,"feeDiscount":0,"enable":1,"hot":0,"sort":1,"remarks":null,"createTime":1702957191000,"updateTime":1702957191000},{"id":"2","operatorId":"1","deviceType":1,"name":"60分钟套餐","detail":"60分钟放肆跑","duration":60,"fee":900,"discount":100,"feeDiscount":0,"enable":1,"hot":0,"sort":2,"remarks":null,"createTime":1702957224000,"updateTime":1702957224000}]}}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

data字段说明
返回code 返回message 返回其他字段

10000

成功

套餐列表

30080

设备已被共享

30081

设备不在线

30082

设备已解锁(当前用户有未完成的共享)

90002

设备不存在

8.1.3. 小程序下单跑步套餐

小程序选择套餐,预下单获取支付参数,然后小程序唤起微信进行微信支付。

curl请求
$ curl 'https://iot.daconghealth.com/api/share/order' -i -X POST \
    -H 'Content-Type: application/json;charset=UTF-8' \
    -H 'XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLc2Vyc0MyRENwVnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==' \
    -d '{"shareFeeId":"1","mac":"888888666666"}'
http请求
POST /api/share/order HTTP/1.1
Content-Type: application/json;charset=UTF-8
XHareToken: cGdSK0FvT3JId1IrcWtxL0ZYTFRjNUVqVzE3enowMk52YVloai91OHhtSWM2OGNMOE9jNXhLc2Vyc0MyRENwVnk0UCtSdTlFN1Z4bkhEUW93bGxZQkE9PQ==
Content-Length: 39
Host: iot.daconghealth.com

{"shareFeeId":"1","mac":"888888666666"}
请求字段说明
Path Type Description

mac

String

设备的mac,去除冒号,必填

shareFeeId

String

套餐id,必填

http响应
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 583

{"code":10000,"message":"success","data":"{\"package\":\"prepay_id=wx191435137138755c4b7b0693c2efc30001\",\"nonceStr\":\"1724049314258\",\"timeStamp\":\"1724049314\",\"paySign\":\"SE95ZlYzA/vUJahhZGKCSl9E9dQsGrCgYVTLyQUmPLYaOtWly8HXVjSyDhSRNkw1m0aFZjSlpR78IPuSTGNHXsVhFw3pMmNjFyL2gnrchT5Ov1adrNHJLDj7Diy06bX0KiOLvwsIqWViFeVwS4vOkwR81GThuJ+7+FHIsm5BfqNIvJu7qzqpM2f0phejXLDEFs0ttaugt+azwSfP2iA/NUUwZmtHoIawfYkYj1KlIHpUO45WUD+96shMKW6di3EV2/WWru40SGkcSsB0pelCn2pZwG///tEmOo4mN1c0m+8tDxvCyesfWAamwSPPPTJD9zcI0y2Gcr1WdjV5YXEahQ==\",\"appId\":\"wx612599211c5c4dce\",\"signType\":\"RSA\"}"}
响应字段说明
Path Type Description

code

Integer

响应状态码

message

String

响应消息

data

JSONObject

响应数据

8.2. 跑步机共享消息

8.2.1. 服务器发送消息

topic:

    server/share/{mac}/msg

消息体:

{
    "type":"1", //1-开锁,2-关锁
    "shareUserInfo":"共享用户数据"
}

8.2.2. 跑步机发送消息

topic:

    client/share/{mac}/msg

消息体:

{
    "type":"1", //1-开锁,2-时间到关锁,3-主动退出关锁
    "userId":"1" //用户ID
}