This commit is contained in:
sjl
2024-11-18 09:02:57 +08:00
parent a8eaccc53e
commit 5cdbee88b4
54 changed files with 375 additions and 836 deletions

View File

@@ -0,0 +1,32 @@
import type { Login } from '@/api/user/interface/user'
import { ADMIN as rePrefix } from '@/api/system/config/serviceName'
import http from '@/api'
import type { Dict } from '@/api/interface'
/**
* @name 登录模块
*/
// 用户登录
export const loginApi = (params: Login.ReqLoginForm) => {
return http.post<Login.ResLogin>(`${rePrefix}/login`, params, { loading: false })
// return http.post<Login.ResLogin>(`/Register1`, params, { loading: false })
}
// 获取菜单列表
export const getAuthMenuListApi = () => {
return http.get<Menu.MenuOptions[]>(`${rePrefix}/menu/list`, {}, { loading: false })
// return http.post<Menu.MenuOptions[]>(`/Register2`, {}, { loading: false })
}
// 获取按钮权限
export const getAuthButtonListApi = () => {
return http.get<Login.ResAuthButtons>(`${rePrefix}/auth/buttons`, {}, { loading: false })
// return http.post<Login.ResAuthButtons>(`/Register3`, {}, { loading: false })
}
// 用户退出登录
export const logoutApi = () => {
return http.post(`${rePrefix}/logout`)
}
//获取下拉框列表
export const getDictList = () =>{
return http.get<Dict>('/dictData/dictDataCache')
}