**请求URL** - GET `user/info` **参数** |参数名|必选|类型|说明| |:---- |:---|:----- |----- | | id | 否 | int | 如果不传则获取用户自己的数据,传了则查看其它用户数据 | 2021-05-20 新增返回 是否填过体重 fill_weight 2021-03-22 新增返回 用户活跃天数 active_day **返回示例** // 用户自己数据 ``` { "result":1, "code":0, "msg":"成功", "data":{ "id":1, "name":"测试用户1", "avatar": "", "sport_target_id":null, "top_subject_id":null, "level":1, "score":5760, "is_ban":0, "province_id":440000, "city_id":440100, "district_id":440106, "created_at":"2020-07-21 11:50:39", "gender":0, "age":null, "province":"广东省", "city":"广州市", "district":"天河区", "weight": 65, "fill_weight": true, // 是否填写过体重信息 "active_day": 7 // 用户活跃天数(已使用趣动智能鞋运动多少天) "exer_record_sum": { "id": 1, "user_id": 1, "consume": 12389, "consume_game": 1476, "consume_jog": 10913, "duration": 126199, "duration_game": 47731, "duration_jog": 78468, "step": 420261, "step_game": 77673, "step_jog": 311796, "step_daily": 30792, "distance": 207992, "distance_game": 38798, "distance_jog": 155898, "distance_daily": 13296, "times": 260, "times_game": 230, "times_jog": 30, "crouch": 10993, "jump": 11280, "jump_rate": 5, "crouch_rate": 5, "step_rate": 185.2, "step_rate_game": 97.6, "step_rate_jog": 238.4 }, "achievements_show":[ { "id":1, "name":"成就1", "logo":"", "reward_exp": 5, "reward_score": 1, "condition_count": 1000, "series_id":1, "created_at": "2020-07-21 14:09:36" } ], "follow_status": "friends", // friends互关 fans被他关注 followed关注他 none没关系 "blocked_from_me": true, //受访用户是否被我屏蔽 "level_info": { "level": 3, "logo": "" }, } } ``` // 他人数据 ``` { "result":1, "code":0, "msg":"成功", "data":{ "id":5, "name":"测试用户5", "sport_target_id":null, "top_subject_id":null, "level":3, "score":120, "is_ban":0, "province_id":440000, "city_id":440100, "district_id":440106, "created_at":"2020-08-31 09:52:50", "gender":0, "age":null, "avatar":"", "province":"广东省", "city":"广州市", "district":"天河区", "achievements_show":[ { "id":1, "name":"成就1", "logo":"", "reward_exp": 5, "reward_score": 1, "condition_count": 1000, "series_id":1, "created_at": "2020-07-21 14:09:36" } ], "follow_status": "friends", // friends互关 fans被他关注 followed关注他 none没关系 "blocked_from_me": true, //受访用户是否被我屏蔽 "level_info": { "level": 3, "logo": "" }, } } ``` ## 更新信息 **请求URL** - POST `user/updateInfo` **参数** |参数名|必选|类型|说明| |:---- |:---|:----- |----- | | name | 是 | str | 用户名 | gender | 是 | int | 性别,0未知 1男 2女 | age | 否 | int | 年龄 | province_id | 否 | int | 省 | city_id | 否 | int | 市 | district_id | 否 | int | 区 | weight | 否 | float | 体重 kg | ignore_name_card | 否 | int | 是否忽略改名卡 1忽略,不传或者0不忽略 **返回示例** ## 上传头像 **请求URL:** - POST `user/setAvatar` **参数:** |参数名|必选|类型|说明| |:---- |:---|:----- |----- | | file | 是 | file | 头像图片 返回 ``` { ... "data": "url/of/avatar", } ``` ## 查看绑定信息 **请求URL** - GET `user/bindInfo` **返回示例** ``` { "result": 1, "code": 0, "msg": "成功", "data": { "password": true, // true 为设置了密码 false 无密码 "phone": "138****8001", // 手机号,空字符串 为 未绑定手机 "weixin": false, // true 为绑定了微信,false 未绑定 "qq": false // true 为绑定了QQ,false 未绑定 "apple": false // true 为绑定了苹果,false 未绑定 } } ``` ## 绑定手机 **请求URL** - POST `user/bindPhone` **参数** |参数名|必选|类型|说明| |:---- |:---|:----- |----- | | phone | 是 | str | 手机 | captcha | 是 | str | 验证码 **返回示例** ## 绑定微信 **请求URL** - GET `user/bindWx` **参数** |参数名|必选|类型|说明| |:---- |:---|:----- |----- | | code | 是 | str | | ## 绑定评估 **请求URL** - GET `user/bindApple` **参数** |参数名|必选|类型|说明| |:---- |:---|:----- |----- | | apple_id | 是 | str | | | identity_token | 是 | str | | | ## 绑定QQ **请求URL** - GET `user/bindQQ` **参数** |参数名|必选|类型|说明| |:---- |:---|:----- |----- | | openid | 是 | str | | | unionid | 否 | sr | | | ## 改名卡数量 **请求URL** - GET `user/countNameCard` **返回示例** ``` { "result": 1, "code": 0, "msg": "成功", "data": 2 } ```