feat(map): add event-driven GPS update

This commit is contained in:
Lê Tuấn Anh
2025-11-20 09:05:07 +07:00
parent eed98f7c29
commit dea435a4ec
11 changed files with 333 additions and 159 deletions

View File

@@ -1,5 +1,4 @@
import { ROUTE_LOGIN } from '@/constants';
import { apiConfig } from '@/services/ApiConfigService';
import { getToken, removeToken } from '@/utils/localStorageUtils';
import { history, RequestConfig } from '@umijs/max';
import { message } from 'antd';
@@ -85,18 +84,9 @@ export const handleRequestConfig: RequestConfig = {
// Request interceptors
requestInterceptors: [
(url: string, options: any) => {
console.log('URL Request:', url, options);
// Nếu URL không phải absolute URL, thêm base URL
let finalUrl = url;
if (!url.startsWith('http')) {
const baseUrl = apiConfig.getApiBaseUrl();
finalUrl = `${baseUrl}${url}`;
}
const token = getToken();
return {
url: finalUrl,
url,
options: {
...options,
headers: {