diff --git a/client/admin/api/maps.ts b/client/admin/api/maps.ts index 36e6e3a..6754041 100644 --- a/client/admin/api/maps.ts +++ b/client/admin/api/maps.ts @@ -1,5 +1,4 @@ import axios from 'axios'; -import { API_BASE_URL } from './index.ts'; import type { LoginLocation, LoginLocationDetail, } from '../../share/types.ts'; @@ -30,7 +29,7 @@ export const MapAPI = { userId?: number }): Promise => { try { - const response = await axios.get(`${API_BASE_URL}/map/markers`, { params }); + const response = await axios.get(`/map/markers`, { params }); return response.data; } catch (error) { throw error; @@ -40,7 +39,7 @@ export const MapAPI = { // 获取登录位置详情 getLocationDetail: async (locationId: number): Promise => { try { - const response = await axios.get(`${API_BASE_URL}/map/location/${locationId}`); + const response = await axios.get(`/map/location/${locationId}`); return response.data; } catch (error) { throw error; @@ -54,7 +53,7 @@ export const MapAPI = { location_name?: string; }): Promise => { try { - const response = await axios.put(`${API_BASE_URL}/map/location/${locationId}`, data); + const response = await axios.put(`/map/location/${locationId}`, data); return response.data; } catch (error) { throw error;