B 端用户
基本说明
b 端用户登录,是指后台用户登录 web 管理系统中
登录逻辑:
- 用户输入账号密码。
- 密码进行 md5 加密,传输过程中看到的只有密文,后端存储使用 md5(md5(pwd)+slat)。
- 后端接受到前端传递的参数,调用存储函数,执行登录。
- 获取用户的角色权限,按钮权限。
- 存储用户信息,此处使用 TokenSession 以及 redis 持久化。
- 返回 token。
b 端登录
接口地址
- 说明:使用本接口获取 token 信息,类型为 B 端,设备默认为 PC
- 地址:
/b/doLogin
- 方法:
POST
请求头
序号 | 类型 | 值 | 说明 |
---|---|---|---|
1 | Content-Type | application/json | JSON 格式 |
请求体
序号 | 键值 | 类型 | 说明 |
---|---|---|---|
1 | account | String | 登录账号,用户名 |
2 | password | String | 登录密码 |
3 | device | String | 登录设备,默认为 PC |
4 | loginCode | Object | 登录码,用于组织切换时使用 |
b 端登出
接口地址
- 说明:退出登录
- 地址:
/b/doLogout
- 方法:
POST
请求头
序号 | 类型 | 值 | 说明 |
---|---|---|---|
1 | Content-Type | application/x-www-form-urlencoded | 表单默认的提交数据的格式 |
请求体
序号 | 键值 | 类型 | 说明 |
---|---|---|---|
1 | access_token | String | 登录凭证 |