diff --git a/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js b/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js index 7f77d03..381fd12 100644 --- a/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js +++ b/ruoyi-ui/src/api/realTimeMonitoring/vehicleMonitoring.js @@ -4,7 +4,7 @@ import request from '@/utils/request' export function getCarGpsList(query) { return request({ url: '/basecar/car/getCarGpsList', - method: 'post', + method: 'get', params: query }) } diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index ddc5fcb..5678897 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -47,6 +47,15 @@ service.interceptors.request.use(config => { config.params = {}; config.url = url; } + if (config.method === 'post') { + config.data = typeof config.data === 'object' ? JSON.stringify({ + ...config.data, + lang + }) : JSON.stringify({ + ...JSON.parse(config.data || '{}'), + lang + }); + } if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) { const requestObj = { url: config.url, diff --git a/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue index 6137cfb..a9199dc 100644 --- a/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue +++ b/ruoyi-ui/src/views/realTimeMonitoring/vehicleMonitoring/index.vue @@ -1,153 +1,52 @@