diff --git a/src/api/carlocation.js b/src/api/carlocation.js index 626ff539..4692ea7c 100644 --- a/src/api/carlocation.js +++ b/src/api/carlocation.js @@ -11,10 +11,67 @@ export function vehicleStat() { // 获取车辆信息 export function getVehicleStat(query) { var params = new URLSearchParams() - params.append('snCode', query) // 你要传给后台的参数值 key/value + if (query !== '' && query !== null && query !== undefined) { + params.append('snCode', query) // 你要传给后台的参数值 key/value + } return request({ url: '/vehicle/getVehicleStat', method: 'post', data: params }) } + +// 获取客户信息 +export function customerInfo(query) { + var params = new URLSearchParams() + if (query !== '' && query !== null && query !== undefined) { + params.append('customerId', query) // 你要传给后台的参数值 key/value + } + return request({ + url: '/customer/customerInfo', + method: 'post', + data: params + }) +} + +// 获取车辆详细信息 +export function rideCount(query, query2) { + var params = new URLSearchParams() + if (query !== '' && query !== null && query !== undefined) { + params.append('customerId', query) // 你要传给后台的参数值 key/value + } + if (query2 !== '' && query2 !== null && query2 !== undefined) { + params.append('snCode', query2) // 你要传给后台的参数值 key/value + } + return request({ + url: '/vehicle/rideCount', + method: 'post', + data: params + }) +} + +// 锁定车辆 +export function userLockCar(query) { + var params = new URLSearchParams() + if (query !== '' && query !== null && query !== undefined) { + params.append('deviceId', query) // 你要传给后台的参数值 key/value + } + return request({ + url: '/remoteControl/userLockCar', + method: 'post', + data: params + }) +} + +// 车辆开锁 +export function userUnLockCar(query) { + var params = new URLSearchParams() + if (query !== '' && query !== null && query !== undefined) { + params.append('deviceId', query) // 你要传给后台的参数值 key/value + } + return request({ + url: '/remoteControl/userUnLockCar', + method: 'post', + data: params + }) +} diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 10faa7c2..8fd0c9dc 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -9,7 +9,7 @@ const app = { }, topmenu: 1, device: 'desktop', - language: Cookies.get('language') || 'en', + language: Cookies.get('language') || 'zh', size: Cookies.get('size') || 'medium' }, mutations: { diff --git a/src/views/carlocation/index.vue b/src/views/carlocation/index.vue index fdbdf96f..69b4c6fe 100644 --- a/src/views/carlocation/index.vue +++ b/src/views/carlocation/index.vue @@ -5,20 +5,32 @@
-
+
+ {{ item.snCode }} +
+
+ + +
+
+ {{ item.snCode }} +
+
+
+ +
+
{{ item.snCode }}
- 在线 - 离线
-
+