mapLocal.ts 804 B

12345678910111213141516171819202122
  1. /**
  2. * Copyright (c) 2013-Now https://jeesite.com All rights reserved.
  3. * No deletion without permission, or be held responsible to law.
  4. * @author ThinkGem
  5. */
  6. import { defHttp } from '@jeesite/core/utils/http/axios';
  7. import { useGlobSetting } from '@jeesite/core/hooks/setting';
  8. import { Result } from '@jeesite/types/axios';
  9. const { adminPath } = useGlobSetting();
  10. export const getMapLocalApi = () =>
  11. defHttp.get<Result>(
  12. { url: adminPath + '/sys/getMaplocal', timeout: 10 * 1000 },
  13. { errorMessageMode: 'none', isTransformResponse: false, skipErrorMessage: true },
  14. );
  15. export const setMapLocalApi = (path: string) =>
  16. defHttp.get<Result>(
  17. { url: adminPath + '/sys/mapLocal', params: { path }, timeout: 10 * 1000 },
  18. { errorMessageMode: 'none', isTransformResponse: false },
  19. );