hz/cloud-platform/cctp-platform/README.MD

112 lines
1.9 KiB
Markdown
Raw Blame History

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.

# 公共平台服务
服务名称commons-platform
端口: 8111
# Swagger UI
访问地址http://localhost:8111/swagger-ui.html
## 登录模块
### 获取登录验证码
`GET /common-platform/v1/security/account/{login_no}`
应答数据:
没有验证码:
```json
{
"success": true,
"code": "000000",
"message": "接口调用成功",
"timestamp": 1600162858305,
"data": {
"username": "admin",
"hasVerifyCode": false,
"pwdErrNum": 1,
"verifyCodeId": null,
"verifyCodeImg": null
}
}
```
有验证码:
```json
{
"success": true,
"code": "000000",
"message": "接口调用成功",
"timestamp": 1600162858305,
"data": {
"username": "admin",
"hasVerifyCode": true,
"pwdErrNum": 1,
"verifyCodeId": "32位唯一ID",
"verifyCodeImg": "BASE64格式的验证码图片"
}
}
```
### 用户登录
`POST /cctp-platform/v1/security/login`
请求数据:
```json
{
"username":"admin",
"password":"123456",
"imgId":"a00001",
"imgValue":"2345"
}
```
应答数据:
```json
{
"success": true,
"code": "000000",
"message": "接口调用成功",
"timestamp": 1600163040551,
"data": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJ1MDAxIiwic3ViIjoiYWRtaW4iLCJpc3MiOiJjY3RwLWF1dGgiLCJpYXQiOjE2MDAxNjMwNDAsImF1ZCI6IkNDVFAiLCJleHAiOjE2MDAyMDYyNDB9.8ENGEz-_pheHPZWRg1w9VFRY4ourDkOHONaLdM6Y47c"
}
```
## 菜单模块
### 获取顶部导航
`GET /cctp-platform/v1/navigate/findMenusByUser`
### 获取菜单
`GET /cctp-platform/v1/navigate/findMenusByUser/${menuId}`
### 获取项目下的菜单
`GET /cctp-platform/v1/navigate/findProjectMenus/{menuId}/{projectId}`
### 菜单管理--列表
`POST /cctp-platform/v1/menus/queryByPage`
```json
{}
```
```json
{
"parentId": "m_04"
}
```
### 菜单管理--新增
`POST /cctp-platform/v1/menus/add`
```json
{
"menu_name": "菜单名称",
"parentId": "m_04",
"idx": 9
}
```