提交 96a0e9db 作者: 方治民

feat(api): swagger v3 pont 适配

上级 e7499b6e
{ {
"originType": "SwaggerV2", "originType": "SwaggerV3",
"originUrl": "http://127.0.0.1:8081/api/v2/api-docs", "originUrl": "http://127.0.0.1:8081/api/v3/api-docs",
"templateType": "fetch", "templateType": "fetch",
"templatePath": "./pont-template", "templatePath": "./pont-template",
"transformPath": "./pont-transform", "transformPath": "./pont-transform",
"outDir": "./src/api/services", "outDir": "./src/api/services",
"surrounding": "typeScript", "surrounding": "typeScript",
"usingOperationId": true,
"mocks": { "mocks": {
"enable": true, "enable": true,
"basePath": "", "basePath": "",
......
import * as Pont from 'pont-engine' // import * as Pont from 'pont-engine'
import { Interface, BaseClass, Property, CodeGenerator } from 'pont-engine' import { Interface, BaseClass, Property, CodeGenerator } from 'pont-engine'
// 接口 API 前缀 // 接口 API 前缀
// 通常与项目的 env 配置中的 VITE_GLOB_API_URL_PREFIX 相同 // 通常与项目的 env 配置中的 VITE_GLOB_API_URL_PREFIX 相同
const API_URL_PREFIX = '/api' const API_URL_PREFIX = '/api'
export class FileStructures extends Pont.FileStructures {
getModsDeclaration(originCode: string): string {
return originCode
}
}
export default class BasicGenerator extends CodeGenerator { export default class BasicGenerator extends CodeGenerator {
checkJsonParam(inter: Interface, paramsCode: string): boolean { checkJsonParam(inter: Interface, paramsCode: string): boolean {
const prettier = require('prettier') const prettier = require('prettier')
...@@ -21,6 +15,7 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -21,6 +15,7 @@ export default class BasicGenerator extends CodeGenerator {
// 认为没有返回值的接口表示下载(通常是) // 认为没有返回值的接口表示下载(通常是)
isDownload(inter: Interface): boolean { isDownload(inter: Interface): boolean {
console.log(inter.name, inter.responseType)
return inter.responseType === 'any' return inter.responseType === 'any'
} }
...@@ -88,7 +83,8 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -88,7 +83,8 @@ export default class BasicGenerator extends CodeGenerator {
const method = inter.method.toUpperCase() const method = inter.method.toUpperCase()
const paramsCode = inter.getParamsCode('Params', this.surrounding) const paramsCode = inter.getParamsCode('Params', this.surrounding)
const requestParams = this.getParams(inter, paramsCode) const requestParams = this.getParams(inter, paramsCode)
const undef = inter.response.getInitialValue() === 'undefined' const initValue = inter.response.getInitialValue(true)
const undef = initValue === 'undefined' || initValue === `''`
const isBody = this.checkJsonParam(inter, paramsCode) const isBody = this.checkJsonParam(inter, paramsCode)
// TODO // TODO
...@@ -105,7 +101,7 @@ export default class BasicGenerator extends CodeGenerator { ...@@ -105,7 +101,7 @@ export default class BasicGenerator extends CodeGenerator {
${isBody ? '' : `export ${paramsCode}`} ${isBody ? '' : `export ${paramsCode}`}
${undef ? '' : `export const init = ${inter.response.getInitialValue(true)};`} ${undef ? '' : `export const init = ${initValue};`}
export function request(${requestParams}) { export function request(${requestParams}) {
return defHttp.request({ return defHttp.request({
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -29,77 +29,477 @@ declare namespace defs { ...@@ -29,77 +29,477 @@ declare namespace defs {
/** 重定向 */ /** 重定向 */
redirect?: string redirect?: string
/** 唯一标识 */
uid?: string
}
export class PageParam {
/** 当前页数 */
pageNo?: number
/** 分页条数 */
pageSize?: number
/** 排序字段 */
sortField?: string
/** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC'
}
export class PageVoPermissionVo {
/** 数据 */
data?: Array<defs.PermissionVo>
/** 数据最新时间 */
latest?: string
/** 数据总数 */
total?: number
}
export class PageVoRoleVo {
/** 数据 */
data?: Array<defs.RoleVo>
/** 数据最新时间 */
latest?: string
/** 数据总数 */
total?: number
}
export class PageVoString {
/** 数据 */
data?: Array<string>
/** 数据最新时间 */
latest?: string
/** 数据总数 */
total?: number
}
export class PageVoUserVo {
/** 数据 */
data?: Array<defs.UserVo>
/** 数据最新时间 */
latest?: string
/** 数据总数 */
total?: number
}
export class PermissionVo {
/** children */
children?: Array<defs.PermissionVo>
/** component */
component?: string
/** enable */
enable?: boolean
/** hidden */
hidden?: boolean
/** icon */
icon?: string
/** id */
id?: string
/** meta */
meta?: ObjectMap<any, object>
/** name */
name?: string
/** path */
path?: string
/** pid */
pid?: string
/** serial */
serial?: number
/** type */
type?: 'DIR' | 'MENU' | 'BUTTON'
/** uid */
uid?: string
}
export class ResultArrayListMenuVo {
/** 内容 */
body?: Array<defs.MenuVo>
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultArrayListPermissionVo {
/** 内容 */
body?: Array<defs.PermissionVo>
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultArrayListRoleVo {
/** 内容 */
body?: Array<defs.RoleVo>
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultArrayListString {
/** 内容 */
body?: Array<string>
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultBoolean {
/** 内容 */
body?: boolean
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultLoginVo {
/** body */
body?: defs.LoginVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoPermissionVo {
/** body */
body?: defs.PageVoPermissionVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoRoleVo {
/** body */
body?: defs.PageVoRoleVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoString {
/** body */
body?: defs.PageVoString
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
}
export class ResultPageVoUserVo {
/** body */
body?: defs.PageVoUserVo
/** 业务标识码 */
code?: number
/** 详细信息 */
details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
} }
export class PageParam { export class ResultPermissionVo {
/** 当前页数 */ /** body */
pageNo?: number body?: defs.PermissionVo
/** 分页条数 */ /** 业务标识码 */
pageSize?: number code?: number
/** 排序字段 */ /** 详细信息 */
sortField?: string details?: string
/** 排序方向(ASC|DESC) */ /** 异常信息 */
sortOrder?: 'ASC' | 'DESC' error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
} }
export class PageVo<T0 = any> { export class ResultRoleVo {
/** 数据 */ /** body */
data?: Array<T0> body?: defs.RoleVo
/** 数据最新时间 */ /** 业务标识码 */
latest?: string code?: number
/** 数据总数 */ /** 详细信息 */
total?: number details?: string
/** 异常信息 */
error?: string
/** 消息 */
message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
} }
export class PermissionVo { export class ResultString {
/** 子权限 */ /** 内容 */
children?: Array<defs.PermissionVo> body?: string
/** 组件 */ /** 业务标识码 */
component?: string code?: number
/** 是否启用 */ /** 详细信息 */
enable?: boolean details?: string
/** 是否隐藏 */ /** 异常信息 */
hidden?: boolean error?: string
/** 图标 */ /** 消息 */
icon?: string message?: string
/** 主键 */ /** 状态码 */
id?: string status?: number
/** 元数据 */ /** 耗时 */
meta?: ObjectMap<any, object> times?: string
/** 名称 */ /** 响应时间 */
name?: string timestamp?: string
}
/** 路径 */ export class ResultUserExtensionVo {
path?: string /** body */
body?: defs.UserExtensionVo
/** 父级ID */ /** 业务标识码 */
pid?: string code?: number
/** 序号 */ /** 详细信息 */
serial?: number details?: string
/** 权限类型 */ /** 异常信息 */
type?: 'DIR' | 'MENU' | 'BUTTON' error?: string
/** 标识 */ /** 消息 */
uid?: string message?: string
/** 状态码 */
status?: number
/** 耗时 */
times?: string
/** 响应时间 */
timestamp?: string
} }
export class Result<T0 = any> { export class ResultUserInfo {
/** 内容 */ /** body */
body?: T0 body?: defs.UserInfo
/** 业务标识码 */ /** 业务标识码 */
code?: number code?: number
...@@ -142,7 +542,10 @@ declare namespace defs { ...@@ -142,7 +542,10 @@ declare namespace defs {
age?: number age?: number
/** 性别 */ /** 性别 */
gender?: number gender?: any
/** 简介 */
introduction?: string
} }
export class UserInfo { export class UserInfo {
...@@ -210,14 +613,14 @@ declare namespace defs { ...@@ -210,14 +613,14 @@ declare namespace defs {
} }
} }
namespace API { declare namespace API {
/** /**
* 身份认证 * 身份认证
*/ */
export namespace auth { export namespace auth {
/** /**
* 登录 * 登录
* /api/auth/login * /auth/login
*/ */
export namespace login { export namespace login {
export class Params { export class Params {
...@@ -227,7 +630,7 @@ namespace API { ...@@ -227,7 +630,7 @@ namespace API {
password: string password: string
} }
export type Response = defs.LoginVo export type Response = defs.ResultLoginVo
export const init: Response export const init: Response
...@@ -240,12 +643,12 @@ namespace API { ...@@ -240,12 +643,12 @@ namespace API {
/** /**
* 登出 * 登出
* /api/auth/logout * /auth/logout
*/ */
export namespace logout { export namespace logout {
export class Params {} export class Params {}
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -258,29 +661,50 @@ namespace API { ...@@ -258,29 +661,50 @@ namespace API {
/** /**
* 注册 * 注册
* /api/auth/register * /auth/register
*/ */
export namespace register { export namespace register {
export class Params { export class Params {
/** 用户名 */
username: string
/** 密码 */
password: string
/** 真实姓名 */
realName: string
/** 手机号 */
mobile: string
/** 头像 */ /** 头像 */
avatar?: string avatar?: string
/** 邮箱 */ /** 邮箱 */
email?: string email?: string
/** 是否启用 */
enable?: boolean
/** 简介 */ /** 简介 */
introduction?: string introduction?: string
/** 手机号 */ /** 是否启用 */
mobile: string enable?: boolean
}
export type Response = defs.ResultString
export const init: Response
export function request(
params: Params,
config?: http.RequestConfig<Params>,
options?: http.RequestOptions,
): Promise<Response>
}
/**
* 安全验证
* /auth/safe
*/
export namespace safe {
export class Params {
/** 密码 */ /** 密码 */
password: string password: string
/** 真实姓名 */
realName: string
/** 用户名 */
username: string
} }
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -292,13 +716,13 @@ namespace API { ...@@ -292,13 +716,13 @@ namespace API {
} }
/** /**
* 检查登录状态 * 检查登录
* /api/auth/valid * /auth/valid
*/ */
export namespace valid { export namespace valid {
export class Params {} export class Params {}
export type Response = boolean export type Response = defs.ResultBoolean
export const init: Response export const init: Response
...@@ -316,12 +740,12 @@ namespace API { ...@@ -316,12 +740,12 @@ namespace API {
export namespace example { export namespace example {
/** /**
* Hello World * Hello World
* /api/example/ * /example/
*/ */
export namespace hello { export namespace hello {
export class Params {} export class Params {}
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -334,12 +758,12 @@ namespace API { ...@@ -334,12 +758,12 @@ namespace API {
/** /**
* 文件下载 * 文件下载
* /api/example/download * /example/download
*/ */
export namespace download { export namespace download {
export class Params {} export class Params {}
export type Response = any export type Response = string
export const init: Response export const init: Response
...@@ -352,12 +776,12 @@ namespace API { ...@@ -352,12 +776,12 @@ namespace API {
/** /**
* 测试失败 * 测试失败
* /api/example/fail * /example/fail
*/ */
export namespace fail { export namespace fail {
export class Params {} export class Params {}
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -370,12 +794,12 @@ namespace API { ...@@ -370,12 +794,12 @@ namespace API {
/** /**
* 查询用户属性 * 查询用户属性
* /api/example/findUserExtensionInfo * /example/findUserExtensionInfo
*/ */
export namespace findUserExtensionInfo { export namespace findUserExtensionInfo {
export class Params {} export class Params {}
export type Response = defs.UserExtensionVo export type Response = defs.ResultUserExtensionVo
export const init: Response export const init: Response
...@@ -388,12 +812,12 @@ namespace API { ...@@ -388,12 +812,12 @@ namespace API {
/** /**
* JSON 传参 * JSON 传参
* /api/example/json * /example/json
*/ */
export namespace json { export namespace json {
export class Params {} export class Params {}
export type Response = defs.PageVo<string> export type Response = defs.ResultPageVoString
export const init: Response export const init: Response
...@@ -406,21 +830,21 @@ namespace API { ...@@ -406,21 +830,21 @@ namespace API {
/** /**
* 分页条件查询 * 分页条件查询
* /api/example/page * /example/page
*/ */
export namespace page { export namespace page {
export class Params { export class Params {
/** 当前页数 */ /** pageSize */
pageNo: number
/** 分页条数 */
pageSize: number pageSize: number
/** pageNo */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export type Response = defs.PageVo<string> export type Response = defs.ResultPageVoString
export const init: Response export const init: Response
...@@ -438,7 +862,7 @@ namespace API { ...@@ -438,7 +862,7 @@ namespace API {
export namespace file { export namespace file {
/** /**
* 文件下载 * 文件下载
* /api/common/file/download * /common/file/download
*/ */
export namespace download { export namespace download {
export class Params { export class Params {
...@@ -448,7 +872,7 @@ namespace API { ...@@ -448,7 +872,7 @@ namespace API {
object: string object: string
} }
export type Response = any export type Response = string
export const init: Response export const init: Response
...@@ -461,40 +885,36 @@ namespace API { ...@@ -461,40 +885,36 @@ namespace API {
/** /**
* 文件上传 * 文件上传
* /api/common/file/upload * /common/file/upload
*/ */
export namespace upload { export namespace upload {
export class Params {} export class Params {}
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
export function request( export function request(
params: Params, body: object,
form: FormData, config?: http.RequestConfig<object>,
config?: http.RequestConfig<Params | FormData>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
} }
/** /**
* Base64 图片上传 * Base64 图片上传
* /api/common/file/uploadBase64Image * /common/file/uploadBase64Image
*/ */
export namespace uploadBase64Image { export namespace uploadBase64Image {
export class Params { export class Params {}
/** Base64 图片信息 */
base64Image: string
}
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
export function request( export function request(
params: Params, body: string,
config?: http.RequestConfig<Params>, config?: http.RequestConfig<string>,
options?: http.RequestOptions, options?: http.RequestOptions,
): Promise<Response> ): Promise<Response>
} }
...@@ -506,37 +926,39 @@ namespace API { ...@@ -506,37 +926,39 @@ namespace API {
export namespace permission { export namespace permission {
/** /**
* 新增 * 新增
* /api/sys/permission/add * /sys/permission/add
*/ */
export namespace add { export namespace add {
export class Params { export class Params {
/** 组件 */ /** id */
component?: string id: string
/** 是否启用 */ /** 权限类型 */
enable?: boolean type: 'DIR' | 'MENU' | 'BUTTON'
/** 是否隐藏 */ /** 序号 */
hidden?: boolean serial?: number
/** 图标 */ /** 标识 */
icon?: string uid: string
/** 元数据 */
meta?: string
/** 名称 */ /** 名称 */
name: string name: string
/** 路径 */ /** 路径 */
path?: string path?: string
/** 父级ID */
pid?: string
/** 重定向 */ /** 重定向 */
redirect?: string redirect?: string
/** 序号 */ /** 组件 */
serial?: number component?: string
/** 权限类型 */ /** 图标 */
type: 'DIR' | 'MENU' | 'BUTTON' icon?: string
/** 标识 */ /** 是否隐藏 */
uid: string hidden?: boolean
/** 是否启用 */
enable?: boolean
/** 父级ID */
pid?: string
/** 元数据 */
meta?: string
} }
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -549,7 +971,7 @@ namespace API { ...@@ -549,7 +971,7 @@ namespace API {
/** /**
* 删除 * 删除
* /api/sys/permission/deleted * /sys/permission/deleted
*/ */
export namespace deleted { export namespace deleted {
export class Params { export class Params {
...@@ -557,7 +979,7 @@ namespace API { ...@@ -557,7 +979,7 @@ namespace API {
id: string id: string
} }
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -570,7 +992,7 @@ namespace API { ...@@ -570,7 +992,7 @@ namespace API {
/** /**
* 查询 * 查询
* /api/sys/permission/find * /sys/permission/find
*/ */
export namespace find { export namespace find {
export class Params { export class Params {
...@@ -578,7 +1000,7 @@ namespace API { ...@@ -578,7 +1000,7 @@ namespace API {
id: string id: string
} }
export type Response = defs.PermissionVo export type Response = defs.ResultPermissionVo
export const init: Response export const init: Response
...@@ -591,39 +1013,39 @@ namespace API { ...@@ -591,39 +1013,39 @@ namespace API {
/** /**
* 修改 * 修改
* /api/sys/permission/modify * /sys/permission/modify
*/ */
export namespace modify { export namespace modify {
export class Params { export class Params {
/** 组件 */
component?: string
/** 是否启用 */
enable?: boolean
/** 是否隐藏 */
hidden?: boolean
/** 图标 */
icon?: string
/** id */ /** id */
id: string id: string
/** 元数据 */ /** 权限类型 */
meta?: string type: 'DIR' | 'MENU' | 'BUTTON'
/** 序号 */
serial?: number
/** 标识 */
uid: string
/** 名称 */ /** 名称 */
name: string name: string
/** 路径 */ /** 路径 */
path?: string path?: string
/** 父级ID */
pid?: string
/** 重定向 */ /** 重定向 */
redirect?: string redirect?: string
/** 序号 */ /** 组件 */
serial?: number component?: string
/** 权限类型 */ /** 图标 */
type: 'DIR' | 'MENU' | 'BUTTON' icon?: string
/** 标识 */ /** 是否隐藏 */
uid: string hidden?: boolean
/** 是否启用 */
enable?: boolean
/** 父级ID */
pid?: string
/** 元数据 */
meta?: string
} }
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -636,21 +1058,21 @@ namespace API { ...@@ -636,21 +1058,21 @@ namespace API {
/** /**
* 分页查询 * 分页查询
* /api/sys/permission/page * /sys/permission/page
*/ */
export namespace page { export namespace page {
export class Params { export class Params {
/** 当前页数 */ /** pageSize */
pageNo: number
/** 分页条数 */
pageSize: number pageSize: number
/** pageNo */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export type Response = defs.PageVo<defs.PermissionVo> export type Response = defs.ResultPageVoPermissionVo
export const init: Response export const init: Response
...@@ -663,15 +1085,15 @@ namespace API { ...@@ -663,15 +1085,15 @@ namespace API {
/** /**
* 树结构查询 * 树结构查询
* /api/sys/permission/tree * /sys/permission/tree
*/ */
export namespace tree { export namespace tree {
export class Params { export class Params {
/** pid */ /** pid */
pid?: string pid: string
} }
export type Response = Array<defs.PermissionVo> export type Response = defs.ResultArrayListPermissionVo
export const init: Response export const init: Response
...@@ -689,17 +1111,19 @@ namespace API { ...@@ -689,17 +1111,19 @@ namespace API {
export namespace role { export namespace role {
/** /**
* 新增 * 新增
* /api/sys/role/add * /sys/role/add
*/ */
export namespace add { export namespace add {
export class Params { export class Params {
/** 名称 */ /** id */
name: string id: string
/** 标识 */ /** 标识 */
uid: string uid: string
/** 名称 */
name: string
} }
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -712,7 +1136,7 @@ namespace API { ...@@ -712,7 +1136,7 @@ namespace API {
/** /**
* 分配权限 * 分配权限
* /api/sys/role/assign * /sys/role/assign
*/ */
export namespace assign { export namespace assign {
export class Params { export class Params {
...@@ -722,7 +1146,7 @@ namespace API { ...@@ -722,7 +1146,7 @@ namespace API {
ids: string ids: string
} }
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -735,7 +1159,7 @@ namespace API { ...@@ -735,7 +1159,7 @@ namespace API {
/** /**
* 删除 * 删除
* /api/sys/role/deleted * /sys/role/deleted
*/ */
export namespace deleted { export namespace deleted {
export class Params { export class Params {
...@@ -743,7 +1167,7 @@ namespace API { ...@@ -743,7 +1167,7 @@ namespace API {
ids: string ids: string
} }
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -756,7 +1180,7 @@ namespace API { ...@@ -756,7 +1180,7 @@ namespace API {
/** /**
* 查询 * 查询
* /api/sys/role/find * /sys/role/find
*/ */
export namespace find { export namespace find {
export class Params { export class Params {
...@@ -764,7 +1188,7 @@ namespace API { ...@@ -764,7 +1188,7 @@ namespace API {
id: string id: string
} }
export type Response = defs.RoleVo export type Response = defs.ResultRoleVo
export const init: Response export const init: Response
...@@ -777,19 +1201,19 @@ namespace API { ...@@ -777,19 +1201,19 @@ namespace API {
/** /**
* 修改 * 修改
* /api/sys/role/modify * /sys/role/modify
*/ */
export namespace modify { export namespace modify {
export class Params { export class Params {
/** id */ /** id */
id: string id: string
/** 名称 */
name: string
/** 标识 */ /** 标识 */
uid: string uid: string
/** 名称 */
name: string
} }
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -802,21 +1226,21 @@ namespace API { ...@@ -802,21 +1226,21 @@ namespace API {
/** /**
* 分页查询 * 分页查询
* /api/sys/role/page * /sys/role/page
*/ */
export namespace page { export namespace page {
export class Params { export class Params {
/** 当前页数 */ /** pageSize */
pageNo: number
/** 分页条数 */
pageSize: number pageSize: number
/** pageNo */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export type Response = defs.PageVo<defs.RoleVo> export type Response = defs.ResultPageVoRoleVo
export const init: Response export const init: Response
...@@ -829,12 +1253,12 @@ namespace API { ...@@ -829,12 +1253,12 @@ namespace API {
/** /**
* 选项查询 * 选项查询
* /api/sys/role/selector * /sys/role/selector
*/ */
export namespace selector { export namespace selector {
export class Params {} export class Params {}
export type Response = Array<defs.RoleVo> export type Response = defs.ResultArrayListRoleVo
export const init: Response export const init: Response
...@@ -852,7 +1276,7 @@ namespace API { ...@@ -852,7 +1276,7 @@ namespace API {
export namespace user { export namespace user {
/** /**
* 分配角色 * 分配角色
* /api/sys/user/assign * /sys/user/assign
*/ */
export namespace assign { export namespace assign {
export class Params { export class Params {
...@@ -862,7 +1286,7 @@ namespace API { ...@@ -862,7 +1286,7 @@ namespace API {
ids: string ids: string
} }
export type Response = string export type Response = defs.ResultString
export const init: Response export const init: Response
...@@ -875,21 +1299,21 @@ namespace API { ...@@ -875,21 +1299,21 @@ namespace API {
/** /**
* 分页查询 * 分页查询
* /api/sys/user/page * /sys/user/page
*/ */
export namespace page { export namespace page {
export class Params { export class Params {
/** 当前页数 */ /** pageSize */
pageNo: number
/** 分页条数 */
pageSize: number pageSize: number
/** pageNo */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export type Response = defs.PageVo<defs.UserVo> export type Response = defs.ResultPageVoUserVo
export const init: Response export const init: Response
...@@ -907,12 +1331,12 @@ namespace API { ...@@ -907,12 +1331,12 @@ namespace API {
export namespace userView { export namespace userView {
/** /**
* 获取用户菜单 * 获取用户菜单
* /api/user/getMenuList * /user/getMenuList
*/ */
export namespace getMenuList { export namespace getMenuList {
export class Params {} export class Params {}
export type Response = Array<defs.MenuVo> export type Response = defs.ResultArrayListMenuVo
export const init: Response export const init: Response
...@@ -925,12 +1349,12 @@ namespace API { ...@@ -925,12 +1349,12 @@ namespace API {
/** /**
* 获取用户权限 * 获取用户权限
* /api/user/getPermCode * /user/getPermCode
*/ */
export namespace getPermCode { export namespace getPermCode {
export class Params {} export class Params {}
export type Response = Array<string> export type Response = defs.ResultArrayListString
export const init: Response export const init: Response
...@@ -943,12 +1367,12 @@ namespace API { ...@@ -943,12 +1367,12 @@ namespace API {
/** /**
* 获取登录用户信息 * 获取登录用户信息
* /api/user/getUserInfo * /user/getUserInfo
*/ */
export namespace getUserInfo { export namespace getUserInfo {
export class Params {} export class Params {}
export type Response = defs.UserInfo export type Response = defs.ResultUserInfo
export const init: Response export const init: Response
......
...@@ -24,6 +24,9 @@ export class MenuVo { ...@@ -24,6 +24,9 @@ export class MenuVo {
/** 重定向 */ /** 重定向 */
redirect = '' redirect = ''
/** 唯一标识 */
uid = ''
} }
export class PageParam { export class PageParam {
...@@ -40,7 +43,40 @@ export class PageParam { ...@@ -40,7 +43,40 @@ export class PageParam {
sortOrder = 'ASC' sortOrder = 'ASC'
} }
export class PageVo { export class PageVoPermissionVo {
/** 数据 */
data = []
/** 数据最新时间 */
latest = ''
/** 数据总数 */
total = undefined
}
export class PageVoRoleVo {
/** 数据 */
data = []
/** 数据最新时间 */
latest = ''
/** 数据总数 */
total = undefined
}
export class PageVoString {
/** 数据 */
data = []
/** 数据最新时间 */
latest = ''
/** 数据总数 */
total = undefined
}
export class PageVoUserVo {
/** 数据 */ /** 数据 */
data = [] data = []
...@@ -52,48 +88,178 @@ export class PageVo { ...@@ -52,48 +88,178 @@ export class PageVo {
} }
export class PermissionVo { export class PermissionVo {
/** 子权限 */ /** children */
children = [] children = []
/** 组件 */ /** component */
component = '' component = ''
/** 是否启用 */ /** enable */
enable = false enable = false
/** 是否隐藏 */ /** hidden */
hidden = false hidden = false
/** 图标 */ /** icon */
icon = '' icon = ''
/** 主键 */ /** id */
id = '' id = ''
/** 元数据 */ /** meta */
meta = undefined meta = undefined
/** 名称 */ /** name */
name = '' name = ''
/** 路径 */ /** path */
path = '' path = ''
/** 父级ID */ /** pid */
pid = '' pid = ''
/** 序号 */ /** serial */
serial = undefined serial = undefined
/** 权限类型 */ /** type */
type = 'DIR' type = 'DIR'
/** 标识 */ /** uid */
uid = '' uid = ''
} }
export class Result { export class ResultArrayListMenuVo {
/** 内容 */
body = []
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultArrayListPermissionVo {
/** 内容 */
body = []
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultArrayListRoleVo {
/** 内容 */
body = []
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultArrayListString {
/** 内容 */
body = []
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultBoolean {
/** 内容 */ /** 内容 */
body = false
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultLoginVo {
/** body */
body = new LoginVo() body = new LoginVo()
/** 业务标识码 */ /** 业务标识码 */
...@@ -118,6 +284,240 @@ export class Result { ...@@ -118,6 +284,240 @@ export class Result {
timestamp = '' timestamp = ''
} }
export class ResultPageVoPermissionVo {
/** body */
body = new PageVoPermissionVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPageVoRoleVo {
/** body */
body = new PageVoRoleVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPageVoString {
/** body */
body = new PageVoString()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPageVoUserVo {
/** body */
body = new PageVoUserVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultPermissionVo {
/** body */
body = new PermissionVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultRoleVo {
/** body */
body = new RoleVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultString {
/** 内容 */
body = ''
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultUserExtensionVo {
/** body */
body = new UserExtensionVo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class ResultUserInfo {
/** body */
body = new UserInfo()
/** 业务标识码 */
code = undefined
/** 详细信息 */
details = ''
/** 异常信息 */
error = ''
/** 消息 */
message = ''
/** 状态码 */
status = undefined
/** 耗时 */
times = ''
/** 响应时间 */
timestamp = ''
}
export class RoleVo { export class RoleVo {
/** 主键 */ /** 主键 */
id = '' id = ''
...@@ -138,6 +538,9 @@ export class UserExtensionVo { ...@@ -138,6 +538,9 @@ export class UserExtensionVo {
/** 性别 */ /** 性别 */
gender = undefined gender = undefined
/** 简介 */
introduction = ''
} }
export class UserInfo { export class UserInfo {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import * as login from './login' import * as login from './login'
import * as logout from './logout' import * as logout from './logout'
import * as register from './register' import * as register from './register'
import * as safe from './safe'
import * as valid from './valid' import * as valid from './valid'
export { login, logout, register, valid } export { login, logout, register, safe, valid }
...@@ -12,7 +12,7 @@ export class Params { ...@@ -12,7 +12,7 @@ export class Params {
password: string password: string
} }
export const init = new defs.Result() export const init = new defs.ResultLoginVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -6,25 +6,25 @@ import * as defs from '../../baseClass' ...@@ -6,25 +6,25 @@ import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 用户名 */
username: string
/** 密码 */
password: string
/** 真实姓名 */
realName: string
/** 手机号 */
mobile: string
/** 头像 */ /** 头像 */
avatar?: string avatar?: string
/** 邮箱 */ /** 邮箱 */
email?: string email?: string
/** 是否启用 */
enable?: boolean
/** 简介 */ /** 简介 */
introduction?: string introduction?: string
/** 手机号 */ /** 是否启用 */
mobile: string enable?: boolean
/** 密码 */
password: string
/** 真实姓名 */
realName: string
/** 用户名 */
username: string
} }
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
/**
* @desc 安全验证
*/
import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'
export class Params {
/** 密码 */
password: string
}
export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request(
{
url: '/auth/safe',
method: 'GET',
params,
...config,
},
options,
)
}
/** /**
* @desc 检查登录状态 * @desc 检查登录
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.ResultBoolean()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.ResultUserExtensionVo()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export const init = new defs.Result() export const init = new defs.ResultPageVoString()
export function request( export function request(
body: defs.PageParam, body: defs.PageParam,
......
...@@ -6,17 +6,17 @@ import * as defs from '../../baseClass' ...@@ -6,17 +6,17 @@ import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */ /** pageSize */
pageNo: number
/** 分页条数 */
pageSize: number pageSize: number
/** pageNo */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export const init = new defs.Result() export const init = new defs.ResultPageVoString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -5,22 +5,15 @@ ...@@ -5,22 +5,15 @@
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params {} export const init = new defs.ResultString()
export const init = new defs.Result() export function request(body: object, config?: http.RequestConfig<object>, options?: http.RequestOptions) {
export function request(
params: Params,
form: FormData,
config?: http.RequestConfig<Params | FormData>,
options?: http.RequestOptions,
) {
return defHttp.request( return defHttp.request(
{ {
url: '/common/file/upload', url: '/common/file/upload',
method: 'POST', method: 'POST',
data: form || params, data: body,
headers: { 'Content-Type': 'multipart/form-data;charset=UTF-8' }, headers: { 'Content-Type': 'application/json' },
...config, ...config,
}, },
......
...@@ -5,19 +5,15 @@ ...@@ -5,19 +5,15 @@
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export const init = new defs.ResultString()
/** Base64 图片信息 */
base64Image: string
}
export const init = new defs.Result()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(body: string, config?: http.RequestConfig<string>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
{ {
url: '/common/file/uploadBase64Image', url: '/common/file/uploadBase64Image',
method: 'POST', method: 'POST',
data: params, data: body,
headers: { 'Content-Type': 'application/json' },
...config, ...config,
}, },
......
...@@ -6,33 +6,35 @@ import * as defs from '../../baseClass' ...@@ -6,33 +6,35 @@ import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 组件 */ /** id */
component?: string id: string
/** 是否启用 */ /** 权限类型 */
enable?: boolean type: 'DIR' | 'MENU' | 'BUTTON'
/** 是否隐藏 */ /** 序号 */
hidden?: boolean serial?: number
/** 图标 */ /** 标识 */
icon?: string uid: string
/** 元数据 */
meta?: string
/** 名称 */ /** 名称 */
name: string name: string
/** 路径 */ /** 路径 */
path?: string path?: string
/** 父级ID */
pid?: string
/** 重定向 */ /** 重定向 */
redirect?: string redirect?: string
/** 序号 */ /** 组件 */
serial?: number component?: string
/** 权限类型 */ /** 图标 */
type: 'DIR' | 'MENU' | 'BUTTON' icon?: string
/** 标识 */ /** 是否隐藏 */
uid: string hidden?: boolean
/** 是否启用 */
enable?: boolean
/** 父级ID */
pid?: string
/** 元数据 */
meta?: string
} }
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -10,7 +10,7 @@ export class Params { ...@@ -10,7 +10,7 @@ export class Params {
id: string id: string
} }
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -10,7 +10,7 @@ export class Params { ...@@ -10,7 +10,7 @@ export class Params {
id: string id: string
} }
export const init = new defs.Result() export const init = new defs.ResultPermissionVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -6,35 +6,35 @@ import * as defs from '../../baseClass' ...@@ -6,35 +6,35 @@ import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 组件 */
component?: string
/** 是否启用 */
enable?: boolean
/** 是否隐藏 */
hidden?: boolean
/** 图标 */
icon?: string
/** id */ /** id */
id: string id: string
/** 元数据 */ /** 权限类型 */
meta?: string type: 'DIR' | 'MENU' | 'BUTTON'
/** 序号 */
serial?: number
/** 标识 */
uid: string
/** 名称 */ /** 名称 */
name: string name: string
/** 路径 */ /** 路径 */
path?: string path?: string
/** 父级ID */
pid?: string
/** 重定向 */ /** 重定向 */
redirect?: string redirect?: string
/** 序号 */ /** 组件 */
serial?: number component?: string
/** 权限类型 */ /** 图标 */
type: 'DIR' | 'MENU' | 'BUTTON' icon?: string
/** 标识 */ /** 是否隐藏 */
uid: string hidden?: boolean
/** 是否启用 */
enable?: boolean
/** 父级ID */
pid?: string
/** 元数据 */
meta?: string
} }
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -6,17 +6,17 @@ import * as defs from '../../baseClass' ...@@ -6,17 +6,17 @@ import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */ /** pageSize */
pageNo: number
/** 分页条数 */
pageSize: number pageSize: number
/** pageNo */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export const init = new defs.Result() export const init = new defs.ResultPageVoPermissionVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -7,10 +7,10 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,10 +7,10 @@ import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** pid */ /** pid */
pid?: string pid: string
} }
export const init = new defs.Result() export const init = new defs.ResultArrayListPermissionVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -6,13 +6,15 @@ import * as defs from '../../baseClass' ...@@ -6,13 +6,15 @@ import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 名称 */ /** id */
name: string id: string
/** 标识 */ /** 标识 */
uid: string uid: string
/** 名称 */
name: string
} }
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -12,7 +12,7 @@ export class Params { ...@@ -12,7 +12,7 @@ export class Params {
ids: string ids: string
} }
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -10,7 +10,7 @@ export class Params { ...@@ -10,7 +10,7 @@ export class Params {
ids: string ids: string
} }
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -10,7 +10,7 @@ export class Params { ...@@ -10,7 +10,7 @@ export class Params {
id: string id: string
} }
export const init = new defs.Result() export const init = new defs.ResultRoleVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -8,13 +8,13 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -8,13 +8,13 @@ import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** id */ /** id */
id: string id: string
/** 名称 */
name: string
/** 标识 */ /** 标识 */
uid: string uid: string
/** 名称 */
name: string
} }
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -6,17 +6,17 @@ import * as defs from '../../baseClass' ...@@ -6,17 +6,17 @@ import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */ /** pageSize */
pageNo: number
/** 分页条数 */
pageSize: number pageSize: number
/** pageNo */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export const init = new defs.Result() export const init = new defs.ResultPageVoRoleVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.ResultArrayListRoleVo()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -12,7 +12,7 @@ export class Params { ...@@ -12,7 +12,7 @@ export class Params {
ids: string ids: string
} }
export const init = new defs.Result() export const init = new defs.ResultString()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -6,17 +6,17 @@ import * as defs from '../../baseClass' ...@@ -6,17 +6,17 @@ import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { defHttp } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */ /** pageSize */
pageNo: number
/** 分页条数 */
pageSize: number pageSize: number
/** pageNo */
pageNo: number
/** 排序字段 */ /** 排序字段 */
sortField?: string sortField?: string
/** 排序方向(ASC|DESC) */ /** 排序方向(ASC|DESC) */
sortOrder?: 'ASC' | 'DESC' sortOrder?: string
} }
export const init = new defs.Result() export const init = new defs.ResultPageVoUserVo()
export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.ResultArrayListMenuVo()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.ResultArrayListString()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios' ...@@ -7,7 +7,7 @@ import { defHttp } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.ResultUserInfo()
export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) { export function request(params?: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
return defHttp.request( return defHttp.request(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论