- 新增模板管理模块,包含模板列表和详情页面 - 重构用户认证逻辑,支持用户ID存储和API调用 - 新增排行榜API接口和类型定义 - 更新环境配置,添加开发环境配置 - 优化表格操作钩子,增强类型安全性 - 新增文件上传工具类和验证工具函数 - 更新路由配置,支持模板详情页面导航 - 修复登录表单默认值问题
56 lines
1.2 KiB
TypeScript
56 lines
1.2 KiB
TypeScript
import { request } from '../request'
|
|
|
|
/** get role list */
|
|
export function fetchGetRoleList(params?: Api.SystemManage.RoleSearchParams) {
|
|
return request<Api.SystemManage.RoleList>({
|
|
url: '/systemManage/getRoleList',
|
|
method: 'get',
|
|
params,
|
|
})
|
|
}
|
|
|
|
/**
|
|
* get all roles
|
|
*
|
|
* these roles are all enabled
|
|
*/
|
|
export function fetchGetAllRoles() {
|
|
return request<Api.SystemManage.AllRole[]>({
|
|
url: '/systemManage/getAllRoles',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
/** get user list */
|
|
export function fetchGetUserList(params?: Api.SystemManage.UserSearchParams) {
|
|
return request<Api.SystemManage.UserList>({
|
|
url: '/admin/v1/class/pagelist',
|
|
method: 'post',
|
|
params,
|
|
})
|
|
}
|
|
|
|
/** get menu list */
|
|
export function fetchGetMenuList() {
|
|
return request<Api.SystemManage.MenuList>({
|
|
url: '/systemManage/getMenuList/v2',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
/** get all pages */
|
|
export function fetchGetAllPages() {
|
|
return request<string[]>({
|
|
url: '/systemManage/getAllPages',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|
|
/** get menu tree */
|
|
export function fetchGetMenuTree() {
|
|
return request<Api.SystemManage.MenuTree[]>({
|
|
url: '/systemManage/getMenuTree',
|
|
method: 'get',
|
|
})
|
|
}
|