feat(map): add event-driven GPS update
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user