go-platform/docs/接口文件.md
2026-03-31 17:28:07 +08:00

27 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 接口文件
> 约定:每新增一个对外接口,都需要在本文件登记(端/方法/路径/描述/鉴权/入出参简述)。
### platform平台端
| 方法 | 路径 | 描述 |
|---|---|---|
| `POST` | `/platform/login` | 平台登录 |
| `POST` | `/platform/sendLoginCode` | 发送登录验证码 |
| `POST` | `/platform/loginBySms` | 手机号验证码登录 |
| `POST` | `/platform/logout` | 平台退出登录 |
| `GET` | `/platform/login/getGeetest3Infos` | 获取极验3.0配置 |
| `GET` | `/platform/login/getGeetest4Infos` | 获取极验4.0配置 |
| `GET` | `/platform/login/getOpenVerify` | 判断是否开启登录验证 |
| `POST` | `/platform/resetPassword` | 忘记密码重置 |
| `POST` | `/platform/sendResetCode` | 发送找回密码验证码 |
#### `/platform/login` 详情
- 入参JSON body`{ "username": string, "password": string }`
- 出参JSON`{ "success": boolean, "token": string }`
- 说明:当前使用占位登录逻辑,仅校验非空并返回平台用户 JWT后续接真实用户/租户表
> 其余 `/platform/*` 登录相关接口(发送验证码、极验、重置密码等)目前仅返回 `501 Not Implemented`,后续按实际需求逐步补全。