perf: 优化动态路由

This commit is contained in:
kailong321200875
2023-08-27 09:03:39 +08:00
parent 1452a1afc7
commit 879358821d
14 changed files with 118 additions and 98 deletions

View File

@@ -1070,12 +1070,41 @@ export default [
url: '/role/list',
method: 'get',
timeout,
response: ({ query }) => {
const { roleName } = query
response: () => {
return {
data: {
code: code,
data: roleName === 'admin' ? adminList : testList
data: adminList
}
}
}
},
{
url: '/role/table',
method: 'get',
timeout,
response: () => {
return {
data: {
code: code,
data: {
list: List,
total: 4
}
}
}
}
},
// 列表接口
{
url: '/role/list2',
method: 'get',
timeout,
response: () => {
return {
data: {
code: code,
data: testList
}
}
}