Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
e5d52ef5
提交
e5d52ef5
authored
4月 17, 2022
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 更新 API 自动生成可选参数
上级
9b9d1dda
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
214 行增加
和
34 行删除
+214
-34
api-lock.json
src/api/services/api-lock.json
+98
-10
api.d.ts
src/api/services/api.d.ts
+51
-11
baseClass.ts
src/api/services/baseClass.ts
+3
-3
logout.ts
src/api/services/mods/auth/logout.ts
+1
-1
fail.ts
src/api/services/mods/hello/fail.ts
+1
-1
hello.ts
src/api/services/mods/hello/hello.ts
+1
-1
index.ts
src/api/services/mods/hello/index.ts
+2
-1
test.ts
src/api/services/mods/hello/test.ts
+23
-0
upload.ts
src/api/services/mods/minio/upload.ts
+1
-1
add.ts
src/api/services/mods/permission/add.ts
+2
-0
modify.ts
src/api/services/mods/permission/modify.ts
+2
-0
selector.ts
src/api/services/mods/role/selector.ts
+1
-1
getMenuList.ts
src/api/services/mods/user/getMenuList.ts
+2
-2
getPermCode.ts
src/api/services/mods/user/getPermCode.ts
+23
-0
getUserInfo.ts
src/api/services/mods/user/getUserInfo.ts
+1
-1
index.ts
src/api/services/mods/user/index.ts
+2
-1
没有找到文件。
src/api/services/api-lock.json
浏览文件 @
e5d52ef5
...
@@ -397,6 +397,32 @@
...
@@ -397,6 +397,32 @@
}
}
}
}
]
]
},
{
"description"
:
"测试 MyBatis Plus 查询"
,
"name"
:
"test"
,
"method"
:
"get"
,
"path"
:
"/api/hello/test"
,
"response"
:
{
"typeArgs"
:
[
{
"typeArgs"
:
[],
"typeName"
:
"string"
,
"isDefsType"
:
false
,
"templateIndex"
:
-1
,
"compileTemplateKeyword"
:
"#/definitions/"
,
"enum"
:
[],
"typeProperties"
:
[]
}
],
"typeName"
:
"Result"
,
"isDefsType"
:
true
,
"templateIndex"
:
-1
,
"compileTemplateKeyword"
:
"#/definitions/"
,
"enum"
:
[],
"typeProperties"
:
[]
},
"parameters"
:
[]
}
}
],
],
"name"
:
"hello"
"name"
:
"hello"
...
@@ -605,6 +631,21 @@
...
@@ -605,6 +631,21 @@
},
},
{
{
"in"
:
"query"
,
"in"
:
"query"
,
"description"
:
"重定向"
,
"name"
:
"redirect"
,
"required"
:
false
,
"dataType"
:
{
"typeArgs"
:
[],
"typeName"
:
"string"
,
"isDefsType"
:
false
,
"templateIndex"
:
-1
,
"compileTemplateKeyword"
:
"#/definitions/"
,
"enum"
:
[],
"typeProperties"
:
[]
}
},
{
"in"
:
"query"
,
"description"
:
"序号"
,
"description"
:
"序号"
,
"name"
:
"serial"
,
"name"
:
"serial"
,
"required"
:
false
,
"required"
:
false
,
...
@@ -906,6 +947,21 @@
...
@@ -906,6 +947,21 @@
},
},
{
{
"in"
:
"query"
,
"in"
:
"query"
,
"description"
:
"重定向"
,
"name"
:
"redirect"
,
"required"
:
false
,
"dataType"
:
{
"typeArgs"
:
[],
"typeName"
:
"string"
,
"isDefsType"
:
false
,
"templateIndex"
:
-1
,
"compileTemplateKeyword"
:
"#/definitions/"
,
"enum"
:
[],
"typeProperties"
:
[]
}
},
{
"in"
:
"query"
,
"description"
:
"序号"
,
"description"
:
"序号"
,
"name"
:
"serial"
,
"name"
:
"serial"
,
"required"
:
false
,
"required"
:
false
,
...
@@ -1541,7 +1597,7 @@
...
@@ -1541,7 +1597,7 @@
"description"
:
""
,
"description"
:
""
,
"interfaces"
:
[
"interfaces"
:
[
{
{
"description"
:
"获取用户
权限
"
,
"description"
:
"获取用户
菜单
"
,
"name"
:
"getMenuList"
,
"name"
:
"getMenuList"
,
"method"
:
"get"
,
"method"
:
"get"
,
"path"
:
"/api/user/getMenuList"
,
"path"
:
"/api/user/getMenuList"
,
...
@@ -1577,6 +1633,42 @@
...
@@ -1577,6 +1633,42 @@
"parameters"
:
[]
"parameters"
:
[]
},
},
{
{
"description"
:
"获取用户权限"
,
"name"
:
"getPermCode"
,
"method"
:
"get"
,
"path"
:
"/api/user/getPermCode"
,
"response"
:
{
"typeArgs"
:
[
{
"typeArgs"
:
[
{
"typeArgs"
:
[],
"typeName"
:
"string"
,
"isDefsType"
:
false
,
"templateIndex"
:
-1
,
"compileTemplateKeyword"
:
"#/definitions/"
,
"enum"
:
[],
"typeProperties"
:
[]
}
],
"typeName"
:
"Array"
,
"isDefsType"
:
false
,
"templateIndex"
:
-1
,
"compileTemplateKeyword"
:
"#/definitions/"
,
"enum"
:
[],
"typeProperties"
:
[]
}
],
"typeName"
:
"Result"
,
"isDefsType"
:
true
,
"templateIndex"
:
-1
,
"compileTemplateKeyword"
:
"#/definitions/"
,
"enum"
:
[],
"typeProperties"
:
[]
},
"parameters"
:
[]
},
{
"description"
:
"获取登录用户信息"
,
"description"
:
"获取登录用户信息"
,
"name"
:
"getUserInfo"
,
"name"
:
"getUserInfo"
,
"method"
:
"get"
,
"method"
:
"get"
,
...
@@ -1886,7 +1978,7 @@
...
@@ -1886,7 +1978,7 @@
"typeProperties"
:
[]
"typeProperties"
:
[]
},
},
"name"
:
"name"
,
"name"
:
"name"
,
"description"
:
"
标识
"
,
"description"
:
"
名称
"
,
"required"
:
false
"required"
:
false
},
},
{
{
...
@@ -1906,19 +1998,15 @@
...
@@ -1906,19 +1998,15 @@
{
{
"dataType"
:
{
"dataType"
:
{
"typeArgs"
:
[],
"typeArgs"
:
[],
"typeName"
:
""
,
"typeName"
:
"
string
"
,
"isDefsType"
:
false
,
"isDefsType"
:
false
,
"templateIndex"
:
-1
,
"templateIndex"
:
-1
,
"compileTemplateKeyword"
:
"#/definitions/"
,
"compileTemplateKeyword"
:
"#/definitions/"
,
"enum"
:
[
"enum"
:
[],
"'DIR'"
,
"'MENU'"
,
"'BUTTON'"
],
"typeProperties"
:
[]
"typeProperties"
:
[]
},
},
"name"
:
"
type
"
,
"name"
:
"
redirect
"
,
"description"
:
"
权限类型
"
,
"description"
:
"
重定向
"
,
"required"
:
false
"required"
:
false
}
}
],
],
...
...
src/api/services/api.d.ts
浏览文件 @
e5d52ef5
...
@@ -21,14 +21,14 @@ declare namespace defs {
...
@@ -21,14 +21,14 @@ declare namespace defs {
/** 元数据 */
/** 元数据 */
meta
?:
ObjectMap
<
any
,
object
>
meta
?:
ObjectMap
<
any
,
object
>
/**
标识
*/
/**
名称
*/
name
?:
string
name
?:
string
/** 路径 */
/** 路径 */
path
?:
string
path
?:
string
/**
权限类型
*/
/**
重定向
*/
type
?:
'DIR'
|
'MENU'
|
'BUTTON'
redirect
?:
string
}
}
export
class
PageVo
<
T0
=
any
>
{
export
class
PageVo
<
T0
=
any
>
{
...
@@ -225,7 +225,7 @@ declare namespace API {
...
@@ -225,7 +225,7 @@ declare namespace API {
export
const
init
:
Response
export
const
init
:
Response
export
function
request
(
export
function
request
(
params
:
Params
,
params
?
:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
,
options
?:
http
.
RequestOptions
,
):
Promise
<
Response
>
):
Promise
<
Response
>
...
@@ -283,7 +283,7 @@ declare namespace API {
...
@@ -283,7 +283,7 @@ declare namespace API {
export
const
init
:
Response
export
const
init
:
Response
export
function
request
(
export
function
request
(
params
:
Params
,
params
?
:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
,
options
?:
http
.
RequestOptions
,
):
Promise
<
Response
>
):
Promise
<
Response
>
...
@@ -301,7 +301,7 @@ declare namespace API {
...
@@ -301,7 +301,7 @@ declare namespace API {
export
const
init
:
Response
export
const
init
:
Response
export
function
request
(
export
function
request
(
params
:
Params
,
params
?
:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
,
options
?:
http
.
RequestOptions
,
):
Promise
<
Response
>
):
Promise
<
Response
>
...
@@ -333,6 +333,24 @@ declare namespace API {
...
@@ -333,6 +333,24 @@ declare namespace API {
options
?:
http
.
RequestOptions
,
options
?:
http
.
RequestOptions
,
):
Promise
<
Response
>
):
Promise
<
Response
>
}
}
/**
* 测试 MyBatis Plus 查询
* /api/hello/test
*/
export
namespace
test
{
export
class
Params
{}
export
type
Response
=
string
export
const
init
:
Response
export
function
request
(
params
?:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
,
):
Promise
<
Response
>
}
}
}
/**
/**
...
@@ -351,7 +369,7 @@ declare namespace API {
...
@@ -351,7 +369,7 @@ declare namespace API {
export
const
init
:
Response
export
const
init
:
Response
export
function
request
(
export
function
request
(
params
:
Params
,
params
?
:
Params
,
form
:
FormData
,
form
:
FormData
,
config
?:
http
.
RequestConfig
<
Params
|
FormData
>
,
config
?:
http
.
RequestConfig
<
Params
|
FormData
>
,
options
?:
http
.
RequestOptions
,
options
?:
http
.
RequestOptions
,
...
@@ -385,6 +403,8 @@ declare namespace API {
...
@@ -385,6 +403,8 @@ declare namespace API {
path
?:
string
path
?:
string
/** 父级ID */
/** 父级ID */
pid
?:
number
pid
?:
number
/** 重定向 */
redirect
?:
string
/** 序号 */
/** 序号 */
serial
?:
number
serial
?:
number
/** 权限类型 */
/** 权限类型 */
...
@@ -470,6 +490,8 @@ declare namespace API {
...
@@ -470,6 +490,8 @@ declare namespace API {
path
?:
string
path
?:
string
/** 父级ID */
/** 父级ID */
pid
?:
number
pid
?:
number
/** 重定向 */
redirect
?:
string
/** 序号 */
/** 序号 */
serial
?:
number
serial
?:
number
/** 权限类型 */
/** 权限类型 */
...
@@ -694,7 +716,7 @@ declare namespace API {
...
@@ -694,7 +716,7 @@ declare namespace API {
export
const
init
:
Response
export
const
init
:
Response
export
function
request
(
export
function
request
(
params
:
Params
,
params
?
:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
,
options
?:
http
.
RequestOptions
,
):
Promise
<
Response
>
):
Promise
<
Response
>
...
@@ -706,7 +728,7 @@ declare namespace API {
...
@@ -706,7 +728,7 @@ declare namespace API {
*/
*/
export
namespace
user
{
export
namespace
user
{
/**
/**
* 获取用户
权限
* 获取用户
菜单
* /api/user/getMenuList
* /api/user/getMenuList
*/
*/
export
namespace
getMenuList
{
export
namespace
getMenuList
{
...
@@ -717,7 +739,25 @@ declare namespace API {
...
@@ -717,7 +739,25 @@ declare namespace API {
export
const
init
:
Response
export
const
init
:
Response
export
function
request
(
export
function
request
(
params
:
Params
,
params
?:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
,
):
Promise
<
Response
>
}
/**
* 获取用户权限
* /api/user/getPermCode
*/
export
namespace
getPermCode
{
export
class
Params
{}
export
type
Response
=
Array
<
string
>
export
const
init
:
Response
export
function
request
(
params
?:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
,
options
?:
http
.
RequestOptions
,
):
Promise
<
Response
>
):
Promise
<
Response
>
...
@@ -735,7 +775,7 @@ declare namespace API {
...
@@ -735,7 +775,7 @@ declare namespace API {
export
const
init
:
Response
export
const
init
:
Response
export
function
request
(
export
function
request
(
params
:
Params
,
params
?
:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
,
options
?:
http
.
RequestOptions
,
):
Promise
<
Response
>
):
Promise
<
Response
>
...
...
src/api/services/baseClass.ts
浏览文件 @
e5d52ef5
...
@@ -16,14 +16,14 @@ export class MenuVo {
...
@@ -16,14 +16,14 @@ export class MenuVo {
/** 元数据 */
/** 元数据 */
meta
=
undefined
meta
=
undefined
/**
标识
*/
/**
名称
*/
name
=
''
name
=
''
/** 路径 */
/** 路径 */
path
=
''
path
=
''
/**
权限类型
*/
/**
重定向
*/
type
=
'DIR
'
redirect
=
'
'
}
}
export
class
PageVo
{
export
class
PageVo
{
...
...
src/api/services/mods/auth/logout.ts
浏览文件 @
e5d52ef5
...
@@ -9,7 +9,7 @@ export class Params {}
...
@@ -9,7 +9,7 @@ export class Params {}
export
const
init
=
new
defs
.
Result
()
export
const
init
=
new
defs
.
Result
()
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
(
{
{
url
:
'/auth/logout'
,
url
:
'/auth/logout'
,
...
...
src/api/services/mods/hello/fail.ts
浏览文件 @
e5d52ef5
...
@@ -9,7 +9,7 @@ export class Params {}
...
@@ -9,7 +9,7 @@ export class Params {}
export
const
init
=
new
defs
.
Result
()
export
const
init
=
new
defs
.
Result
()
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
(
{
{
url
:
'/hello/fail'
,
url
:
'/hello/fail'
,
...
...
src/api/services/mods/hello/hello.ts
浏览文件 @
e5d52ef5
...
@@ -9,7 +9,7 @@ export class Params {}
...
@@ -9,7 +9,7 @@ export class Params {}
export
const
init
=
new
defs
.
Result
()
export
const
init
=
new
defs
.
Result
()
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
(
{
{
url
:
'/hello/'
,
url
:
'/hello/'
,
...
...
src/api/services/mods/hello/index.ts
浏览文件 @
e5d52ef5
...
@@ -4,5 +4,6 @@
...
@@ -4,5 +4,6 @@
import
*
as
hello
from
'./hello'
import
*
as
hello
from
'./hello'
import
*
as
fail
from
'./fail'
import
*
as
fail
from
'./fail'
import
*
as
page
from
'./page'
import
*
as
page
from
'./page'
import
*
as
test
from
'./test'
export
{
hello
,
fail
,
page
}
export
{
hello
,
fail
,
page
,
test
}
src/api/services/mods/hello/test.ts
0 → 100644
浏览文件 @
e5d52ef5
/**
* @desc 测试 MyBatis Plus 查询
*/
import
*
as
defs
from
'../../baseClass'
import
{
defHttp
}
from
'/@/utils/http/axios'
export
class
Params
{}
export
const
init
=
new
defs
.
Result
()
export
function
request
(
params
?:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
)
{
return
defHttp
.
request
(
{
url
:
'/hello/test'
,
method
:
'GET'
,
params
,
...
config
,
},
options
,
)
}
src/api/services/mods/minio/upload.ts
浏览文件 @
e5d52ef5
...
@@ -10,7 +10,7 @@ export class Params {}
...
@@ -10,7 +10,7 @@ export class Params {}
export
const
init
=
new
defs
.
Result
()
export
const
init
=
new
defs
.
Result
()
export
function
request
(
export
function
request
(
params
:
Params
,
params
?
:
Params
,
form
:
FormData
,
form
:
FormData
,
config
?:
http
.
RequestConfig
<
Params
|
FormData
>
,
config
?:
http
.
RequestConfig
<
Params
|
FormData
>
,
options
?:
http
.
RequestOptions
,
options
?:
http
.
RequestOptions
,
...
...
src/api/services/mods/permission/add.ts
浏览文件 @
e5d52ef5
...
@@ -22,6 +22,8 @@ export class Params {
...
@@ -22,6 +22,8 @@ export class Params {
path
?:
string
path
?:
string
/** 父级ID */
/** 父级ID */
pid
?:
number
pid
?:
number
/** 重定向 */
redirect
?:
string
/** 序号 */
/** 序号 */
serial
?:
number
serial
?:
number
/** 权限类型 */
/** 权限类型 */
...
...
src/api/services/mods/permission/modify.ts
浏览文件 @
e5d52ef5
...
@@ -24,6 +24,8 @@ export class Params {
...
@@ -24,6 +24,8 @@ export class Params {
path
?:
string
path
?:
string
/** 父级ID */
/** 父级ID */
pid
?:
number
pid
?:
number
/** 重定向 */
redirect
?:
string
/** 序号 */
/** 序号 */
serial
?:
number
serial
?:
number
/** 权限类型 */
/** 权限类型 */
...
...
src/api/services/mods/role/selector.ts
浏览文件 @
e5d52ef5
...
@@ -9,7 +9,7 @@ export class Params {}
...
@@ -9,7 +9,7 @@ export class Params {}
export
const
init
=
new
defs
.
Result
()
export
const
init
=
new
defs
.
Result
()
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
(
{
{
url
:
'/manage/role/selector'
,
url
:
'/manage/role/selector'
,
...
...
src/api/services/mods/user/getMenuList.ts
浏览文件 @
e5d52ef5
/**
/**
* @desc 获取用户
权限
* @desc 获取用户
菜单
*/
*/
import
*
as
defs
from
'../../baseClass'
import
*
as
defs
from
'../../baseClass'
...
@@ -9,7 +9,7 @@ export class Params {}
...
@@ -9,7 +9,7 @@ export class Params {}
export
const
init
=
new
defs
.
Result
()
export
const
init
=
new
defs
.
Result
()
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
(
{
{
url
:
'/user/getMenuList'
,
url
:
'/user/getMenuList'
,
...
...
src/api/services/mods/user/getPermCode.ts
0 → 100644
浏览文件 @
e5d52ef5
/**
* @desc 获取用户权限
*/
import
*
as
defs
from
'../../baseClass'
import
{
defHttp
}
from
'/@/utils/http/axios'
export
class
Params
{}
export
const
init
=
new
defs
.
Result
()
export
function
request
(
params
?:
Params
,
config
?:
http
.
RequestConfig
<
Params
>
,
options
?:
http
.
RequestOptions
)
{
return
defHttp
.
request
(
{
url
:
'/user/getPermCode'
,
method
:
'GET'
,
params
,
...
config
,
},
options
,
)
}
src/api/services/mods/user/getUserInfo.ts
浏览文件 @
e5d52ef5
...
@@ -9,7 +9,7 @@ export class Params {}
...
@@ -9,7 +9,7 @@ export class Params {}
export
const
init
=
new
defs
.
Result
()
export
const
init
=
new
defs
.
Result
()
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
(
{
{
url
:
'/user/getUserInfo'
,
url
:
'/user/getUserInfo'
,
...
...
src/api/services/mods/user/index.ts
浏览文件 @
e5d52ef5
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
* @description
* @description
*/
*/
import
*
as
getMenuList
from
'./getMenuList'
import
*
as
getMenuList
from
'./getMenuList'
import
*
as
getPermCode
from
'./getPermCode'
import
*
as
getUserInfo
from
'./getUserInfo'
import
*
as
getUserInfo
from
'./getUserInfo'
import
*
as
assign
from
'./assign'
import
*
as
assign
from
'./assign'
import
*
as
page
from
'./page'
import
*
as
page
from
'./page'
export
{
getMenuList
,
getUserInfo
,
assign
,
page
}
export
{
getMenuList
,
get
PermCode
,
get
UserInfo
,
assign
,
page
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论