用户管理 API
用户注册
POST /reader3/register请求体:
json
{
"username": "用户名",
"password": "密码"
}用户登录
POST /reader3/login请求体:
json
{
"username": "用户名",
"password": "密码"
}响应:
json
{
"success": true,
"data": {
"token": "jwt-token-string",
"username": "用户名"
},
"errorMsg": null
}获取用户信息
GET /reader3/getUserInfoHeader:
Authorization: Bearer <token>修改密码
POST /reader3/changePassword请求体:
json
{
"oldPassword": "旧密码",
"newPassword": "新密码"
}获取用户配置
GET /reader3/getUserConfig响应:
json
{
"success": true,
"data": {
"theme": "light",
"fontSize": 16,
"lineHeight": 1.5,
"readConfig": { ... }
},
"errorMsg": null
}保存用户配置
POST /reader3/saveUserConfig请求体:
json
{
"theme": "dark",
"fontSize": 18,
"lineHeight": 1.8
}