menu.ts 706 B

1234567891011121314151617181920212223242526272829303132
  1. import { defHttp } from '/@/utils/http/axios';
  2. import {
  3. getMenuListByIdParams,
  4. getAllMenuListResultModel,
  5. getMenuListByIdParamsResultModel,
  6. } from './model/menuModel';
  7. enum Api {
  8. GetMenuListById = '/getMenuListById/',
  9. GETAllMenuList = '/getAllMenuList',
  10. }
  11. /**
  12. * @description: Get user menu based on id
  13. */
  14. export function getMenuListById(params: getMenuListByIdParams) {
  15. return defHttp.request<getMenuListByIdParamsResultModel>({
  16. url: Api.GetMenuListById,
  17. method: 'POST',
  18. params,
  19. });
  20. }
  21. /**
  22. * @description: Get all based on id
  23. */
  24. export function getAllMenuList() {
  25. return defHttp.request<getAllMenuListResultModel>({
  26. url: Api.GETAllMenuList,
  27. method: 'GET',
  28. });
  29. }