提交 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.
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论