vitesse-yitisheng-web/docs/api1.md

3.5 KiB

title language_tabs toc_footers includes search code_clipboard highlight_theme headingLevel generator
艺考招生管理系统 API
shell
Shell
http
HTTP
javascript
JavaScript
ruby
Ruby
python
Python
php
PHP
java
Java
go
Go
true true darkula 2 @tarslib/widdershins v4.0.30

艺考招生管理系统 API

提供用户认证、院校专业、历年招生、计算专业的管理接口

Base URLs:

Authentication

认证

GET 获取当前登录用户信息

GET /auth/info

返回示例

200 Response

{"code":0,"data":null,"message":"string"}

返回结果

状态码 状态码含义 说明 数据模型
200 OK OK common.Response

POST 用户登录

POST /auth/login

Body 请求参数

{
  "username": "18639433190",
  "password": "123456"
}

请求参数

名称 位置 类型 必选 说明
body body controller.LoginRequest none

返回示例

200 Response

{
  "code": 200,
  "message": "success",
  "data": {
    "token": "140a1289-1a0a-4c14-82f6-ba1feb36351a",
    "user": {
      "id": "1779515858733772802",
      "username": "dyT3c2tV",
      "realname": "用户-dyT3c2tV",
      "avatar": "",
      "phone": "18639433190",
      "email": "",
      "token": "140a1289-1a0a-4c14-82f6-ba1feb36351a"
    }
  }
}

返回结果

状态码 状态码含义 说明 数据模型
200 OK OK Inline

返回数据结构

状态码 200

名称 类型 必选 约束 中文名 说明
» code integer true none 状态码 none
» message string true none 状态描述 none
» data object true none none
»» token string true none 登录TOKEN none
»» user object true none none
»»» id string true none 用户ID none
»»» username string true none 用户名 none
»»» realname string true none none
»»» avatar string true none 头像 none
»»» phone string true none 手机号 none
»»» email string true none none
»»» token string true none none

POST 用户登出

POST /auth/logout

返回示例

200 Response

{"code":200,"message":"success","data":null}

返回结果

状态码 状态码含义 说明 数据模型
200 OK OK common.Response

数据模型

common.Response

{
  "code": 0,
  "data": null,
  "message": "string"
}

属性

名称 类型 必选 约束 中文名 说明
code integer false none none
data any false none none
message string false none none

controller.LoginRequest

{
  "password": "string",
  "username": "string"
}

属性

名称 类型 必选 约束 中文名 说明
password string true none none
username string true none none