feat(用户管理): 实现用户注册审核功能

添加用户注册审核流程,包括以下变更:
- 用户注册后状态为 pending 待审核
- 管理员可批准或拒绝注册申请
- 待审核用户无法登录系统
- 用户管理页面添加审核操作和状态筛选
- 添加数据库迁移脚本支持 pending 状态
- 更新前后端相关接口和页面逻辑
This commit is contained in:
zhang1106
2026-02-05 15:12:31 +08:00
parent 719812f012
commit ebd4b5faa9
9 changed files with 404 additions and 205 deletions
+3 -1
View File
@@ -95,7 +95,9 @@ export const userAPI = {
headers: { 'Content-Type': 'multipart/form-data' }
});
},
deleteAvatar: (userId) => api.delete(`/users/${userId}/avatar`)
deleteAvatar: (userId) => api.delete(`/users/${userId}/avatar`),
approve: (userId) => api.put(`/users/${userId}/approve`),
reject: (userId) => api.put(`/users/${userId}/reject`)
};
export const roleAPI = {