# 登录

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /user/login:
    post:
      summary: 登录
      deprecated: false
      description: ''
      tags:
        - 用户
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                username:
                  description: 账号
                  example: ozline
                  type: string
                password:
                  description: 密码
                  example: '123456'
                  type: string
                code:
                  description: ' 验证码/MFA Code'
                  example: ''
                  type: string
              required:
                - username
                - password
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  base: &ref_0
                    $ref: '#/components/schemas/%E5%93%8D%E5%BA%94%E7%8A%B6%E6%80%81'
                  data:
                    type: object
                    x-apifox-refs:
                      01HM16RCBCCQY5888VPA5GWEWZ:
                        $ref: '#/components/schemas/%E7%94%A8%E6%88%B7'
                        x-apifox-overrides:
                          password: null
                    x-apifox-orders:
                      - 01HM16RCBCCQY5888VPA5GWEWZ
                    properties:
                      id:
                        type: string
                        title: 用户 ID
                        description: 用户唯一标识符
                        x-apifox-mock: '@increment'
                      username:
                        type: string
                        title: 用户名
                        x-apifox-mock: '@name'
                      avatar_url:
                        type: string
                        title: 头像
                        description: 图片链接，可以是本地也可以是云存储
                        x-apifox-mock: '@image'
                      created_at:
                        type: string
                        title: 创建时间
                        x-apifox-mock: '@datetime'
                      updated_at:
                        type: string
                        title: 更新时间
                        x-apifox-mock: '@datetime'
                      deleted_at:
                        type: string
                        title: 删除时间
                        x-apifox-mock: '@datetime'
                    required:
                      - id
                      - username
                      - avatar_url
                      - created_at
                      - updated_at
                      - deleted_at
                    x-apifox-ignore-properties:
                      - id
                      - username
                      - avatar_url
                      - created_at
                      - updated_at
                      - deleted_at
                x-apifox-orders:
                  - base
                  - data
                required:
                  - base
                  - data
                x-apifox-ignore-properties: []
              example:
                base:
                  code: 10000
                  msg: success
                data:
                  id: '483675103821824000'
                  username: west2-online
                  avatar_url: https://west2.online/avatar-example.jpeg
                  created_at: '1970-01-01 08:00:00'
                  updated_at: '1970-01-01 08:00:00'
                  deleted_at: '1970-01-01 08:00:00'
          headers: {}
          x-apifox-name: 成功
        x-200:失败:
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  base: *ref_0
                x-apifox-orders:
                  - base
                required:
                  - base
                x-apifox-ignore-properties: []
              example:
                base:
                  code: -1
                  msg: 密码错误
          headers: {}
          x-apifox-name: 失败
      security: []
      x-apifox-folder: 用户
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/3905938/apis/api-141535769-run
components:
  schemas:
    用户:
      type: object
      properties:
        id:
          type: string
          title: 用户 ID
          description: 用户唯一标识符
          x-apifox-mock: '@increment'
        username:
          type: string
          title: 用户名
          x-apifox-mock: '@name'
        password:
          type: string
          title: 密码
          description: 需要进行加密（bcrypt）
          x-apifox-mock: '@word'
        avatar_url:
          type: string
          title: 头像
          description: 图片链接，可以是本地也可以是云存储
          x-apifox-mock: '@image'
        created_at:
          type: string
          title: 创建时间
          x-apifox-mock: '@datetime'
        updated_at:
          type: string
          title: 更新时间
          x-apifox-mock: '@datetime'
        deleted_at:
          type: string
          title: 删除时间
          x-apifox-mock: '@datetime'
      x-apifox-orders:
        - id
        - username
        - password
        - avatar_url
        - 01HM14S7N3KBVF33DX8RVKQ2AN
      required:
        - id
        - username
        - password
        - avatar_url
        - created_at
        - updated_at
        - deleted_at
      x-apifox-refs:
        01HM14S7N3KBVF33DX8RVKQ2AN:
          $ref: '#/components/schemas/%E6%97%B6%E9%97%B4%E6%88%B3'
          x-apifox-overrides: {}
      x-apifox-ignore-properties:
        - created_at
        - updated_at
        - deleted_at
      x-apifox-folder: ''
    时间戳:
      type: object
      properties:
        created_at:
          type: string
          title: 创建时间
          x-apifox-mock: '@datetime'
        updated_at:
          type: string
          title: 更新时间
          x-apifox-mock: '@datetime'
        deleted_at:
          type: string
          title: 删除时间
          x-apifox-mock: '@datetime'
      x-apifox-orders:
        - created_at
        - updated_at
        - deleted_at
      required:
        - created_at
        - updated_at
        - deleted_at
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    响应状态:
      type: object
      properties:
        code:
          type: integer
        msg:
          type: string
      x-apifox-orders:
        - code
        - msg
      required:
        - code
        - msg
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes: {}
servers:
  - url: http://localhost:10001
    description: 开发环境
  - url: localhost:8888
    description: 测试环境
  - url: https://14efdb6874148af54dd6c98f749a9412-app.1024paas.com/douyin
    description: 正式环境
security: []

```
