You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
haoliang-net/docs/02-功能清单/管理后台/01-登录/00-登录-索引.md

44 lines
1.4 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 登录 索引
> 版本v1.0
> 最后更新2026-04-25
---
## 模块概述
管理后台登录页单角色adminToken认证机制。未登录或Token过期自动跳转。
## 页面清单
| 页面编号 | 页面名称 | 路由 | 功能概述 |
|---------|---------|------|---------|
| 01-01 | 登录页面 | /login | 用户名+密码登录Token认证记住我 |
## 页面功能详情
### 01-01 登录页面
**路由**`/login`
**功能概述**管理后台唯一入口用户名密码登录Token存localStorage支持"记住我"延长有效期
**功能列表**
| 功能编号 | 功能名称 | 触发条件 | 交互行为 | 涉及API |
|---------|---------|---------|---------|---------|
| F01 | 登录 | 点击登录按钮 | 校验->调API->存Token->跳转仪表盘 | POST /api/admin/login |
| F02 | Token过期跳转 | API返回40101 | 清除Token->跳转登录页(带redirect) | - |
| F03 | 登录失败 | API返回错误 | 显示错误提示->清空密码框 | - |
**安全规范**Token有效期默认8小时记住我7天统一错误提示防信息泄露后端IP锁定防暴力破解
**路由跳转**
- 登录成功 -> 仪表盘(/dashboard) 或 redirect参数指定的页面
## 子目录/文件
| 编号 | 名称 | 类型 | 索引 |
|------|------|------|------|
| 01-01 | 登录页面 | 页面文件 | [01-01-登录页面.md](./01-01-登录页面.md) |
---