POST https://example.com/api.php?mod=member&act=login
见通用请求头
无
属性 | 类型 | 示例值 | 说明 |
---|---|---|---|
username | string | Chris | 用户名 |
password | string | 12345 | 密码 |
savedate | float | 1 | 登录有效天数 |
示例:
{ "username": "Chris", "password": "123456", "savedate": 1 }
见通用响应头
无
示例:
{ "code": 200, "message": "操作成功", "data": { "user": { "ID": "1", "Level": "1", "Status": "0", "Name": "zhouzishu", "Email": "null@null.com", "HomePage": "", "CreateTime": "1595241015", "PostTime": "1595241015", "UpdateTime": "0", "Alias": "", "Intro": "", "Articles": "0", "Pages": "1", "Comments": "2", "Uploads": "1", "Template": "index", "Metas": {}, "Url": "https://example.com/?auth=1", "Avatar": "https://example.com/zb_users/avatar/0.png", "StaticName": "zhouzishu" }, "token": "emhvdXppc2h1fHx8ZDA3MTU4YWQxZjIyOGVkZTAyMGU0NWVmMTY0YTYyYzYzZWU4Y2Y1ZjU3MWZlNTQ0Mjc4M2FmM2U3YWQyNTU4ZTE1OTcyOTk5ODA=" }, "error": null }
data 内容:
键 | 类型 | 示例值 | 说明 |
---|---|---|---|
user | array | {“username”:“Chris”,…} | 用户信息 |
token | string | emhvdXppc2h1fHx8ZD… | 鉴权 token,用于认证 |
见通用响应头
无
见通用响应体