浏览代码

优化一下室内定位请求接口

wenningning 1 周之前
父节点
当前提交
f35c9a154d
共有 1 个文件被更改,包括 3 次插入11 次删除
  1. 3 11
      src/api/ncs_device.js

+ 3 - 11
src/api/ncs_device.js

@@ -295,17 +295,9 @@ export function getDeviceList(frameId, type) {
 export function getDevicePositionList(frameId, types) {
   return request({
     url: `/ncs/device/getDeviceListByTypes/${frameId}`,
-    method: 'get',
-    params: { types },
-    paramsSerializer: params => {
-      // 确保数组参数正确序列化
-      return Object.keys(params).map(key => {
-        if (Array.isArray(params[key])) {
-          return params[key].map(val => `${key}=${val}`).join('&');
-        }
-        return `${key}=${params[key]}`;
-      }).join('&');
-    },
+    method: 'post',
+    headers: { 'Content-Type': 'application/json' },
+    data: types,
     loading: false
   })
 }