user.ts 819 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { request } from 'umi';
  2. export async function query() {
  3. return request<API.CurrentUser[]>('/api/users');
  4. }
  5. export async function queryCurrent() {
  6. return request<API.CurrentUser>('/api/admin/adminInfo',{
  7. method: 'get',
  8. });
  9. }
  10. // 获得当前用户能看到的页面
  11. export async function selectNavList() {
  12. return request<API.CurrentUser>('/api/admin/selectMenuList',{
  13. method: 'get',
  14. params:{
  15. navId: '17066bfb-e2d7-443d-97e1-f71f1f84c6f0',
  16. }
  17. });
  18. }
  19. export async function queryNotices(): Promise<any> {
  20. return request<{ data: API.NoticeIconData[] }>('/api/notices');
  21. }
  22. // 获取角色列表
  23. export async function getRolesList(){
  24. return request('/api/roles');
  25. }
  26. // 部门
  27. export async function getSelectSuperId() {
  28. return request('/api/admin/organization/selectSuperId');
  29. }