From 4fbaad54ff138187aa1ca0b879bcbc042d1a01e7 Mon Sep 17 00:00:00 2001 From: yourname Date: Tue, 13 May 2025 14:30:51 +0000 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=BD=BF=E7=94=A8index.ts?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=85=A8=E5=B1=80axios=E9=85=8D=E7=BD=AE=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=BA=86=E6=89=80=E6=9C=89=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E7=9A=84API=5FBASE=5FURL=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/admin/api/maps.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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;