作者 tangxuhui

新增登录模块

version: v1
kind: Schema
metadata:
name: dictionary
description: 字典
attributes:
- name: dictionaryId
description: 字典编号 主键
type:
primitive: int
- name: dictCode
description: 字典编码
type:
primitive: string
- name: dictName
description: 字典名称
type:
primitive: string
- name: enableStatus
description: 启用状态(启用:1 禁用:2)
type:
primitive: int
- name: desc
description: 备注信息
type:
primitive: string
- name: dictItems
description: 字典值列表
type:
array: dictionaryItem
... ...
version: v1
kind: Schema
metadata:
name: dictionaryItem
description: 字典明细项
attributes:
- name: itemCode
description: 项编码
type:
primitive: string
- name: itemLabel
description: 项标签
type:
primitive: string
- name: itemValue
description:
type:
primitive: string
- name: enableStatus
description: 启用状态(启用:1 禁用:2)
type:
primitive: string
- name: sort
description: 显示序号
type:
primitive: int
... ...
version: v1
kind: HttpApi
metadata:
service: loginAccess
path: /auth
endpoints:
- method: loginByAccount
route:
post: /by-account
- method: loginBySmsCode
route:
post: /by-smscode
- method: loginByScanQrcode
route:
get: /by-qrcode
- method: getQrcodeForLogin
route:
get: /get-qrcode
- method: loginInfoByAuthCode
route:
get: /profile
... ...
version: v1
kind: Method
metadata:
name: getQrcodeForLogin
type: query
description: 获取扫码登录用的二维码信息
result:
- name: authCode
description: 登录认证的凭证
type:
primitive: string
- name: imgBase64
description: base64形式的二维码图片
type:
primitive: string
- name: loginAccess
type:
schema: loginAccess
required: true
... ...
version: v1
kind: Method
metadata:
name: loginByAccount
type: query
description: 使用手机号和密码登录系统
payload:
- name: account
description: 账号
type:
primitive: string
- name: passwd
description: 密码
type:
primitive: string
result:
- name: authcode
description: 登录认证的凭证
type:
primitive: string
- name: loginAccess
type:
schema: loginAccess
required: true
... ...
version: v1
kind: Method
metadata:
name: loginByScanQrcode
type: query
description: 询问扫二维码方式登录的状态
payload:
- name: authCode
description: 登录认证的凭证
type:
primitive: string
result:
- name: accessToken
description: 真正的登录凭证
type:
primitive: string
- name: isLogin
description: 是否可以登录
type:
primitive: string
- name: loginAccess
type:
schema: loginAccess
required: true
... ...
version: v1
kind: Method
metadata:
name: loginBySmsCode
type: query
description: 使用手机号和短信验证码登录系统
payload:
- name: phone
description: 手机号
type:
primitive: string
- name: smsCode
description: 短信验证码
type:
primitive: string
result:
- name: authcode
description: 登录认证的凭证
type:
primitive: string
- name: loginAccess
type:
schema: loginAccess
required: true
... ...
version: v1
kind: Method
metadata:
name: loginInfoByAuthCode
type: query
description: 获取具体的进入系统的凭证
payload:
- name: authCode
description: 登录认证的凭证
type:
primitive: string
- name: companyId
description: 公司id
type:
primitive: string
- name: organizationId
description: 组织id
type:
primitive: string
result:
- name: accessToken
description: 登录系统的凭证
type:
primitive: string
- name: loginAccess
type:
schema: loginAccess
required: true
... ...
version: v1
kind: Service
metadata:
name: loginAccess
description: 登录访问
... ...