Skip to content
关注公众号,获取新课通知

修改头像

接口URL

https://sqapi2.dishawang.com/api/v1/user/changeavatar

请求方式

POST

Content-Type

form-data

请求Header参数

参数名示例值参数类型是否必填参数描述
token36040cbcde65e482739afca7a5465ab750c1c5d5String用户token

请求Body参数

参数名示例值参数类型是否必填参数描述
avatar["C:\Users\86134\Pictures\5ae9553fa15ce5c53cb74c9e47c74a8d.jpeg"]String头像(图片文件)

成功响应示例

json
{
  "code": 1,
  "msg": "ok",
  "data": {
    "name": "zcsadafs",
    "id": 7,
    "username": "zcsadafs",
    "avatar": "http://127.0.0.1:8000/storage/avatar/65a8e427b4c19.jpeg",
    "password": true,
    "phone": "176****6323",
    "email": "123@163.com",
    "status": 1,
    "age": 0,
    "sex": 2,
    "qg": 0,
    "job": null,
    "path": null,
    "birthday": null,
    "desc": null,
    "wx_openid": null,
    "wx_unionid": null,
    "create_time": null,
    "update_time": "2024-01-18 16:41:11",
    "fans_count": 32,
    "follows_count": 18,
    "articles_count": 32,
    "comments_count": 84
  }
}