riku
2025-07-16 c23ac06446a9a1edc41cc13723e5d0b8eabdfd63
src/api/deviceApi.js
@@ -4,18 +4,17 @@
 * 走航设备相关接口API
 */
export default {
  fethchDevice({ type, page, pageSize }) {
    let params = `page=${page}&perPage=${pageSize}`;
    params += type ? `&type=${type}` : '';
    return $http.get(`air/device/type?${params}`).then((res) => res.data);
  fethchDevice({ type }) {
    let params = type ? `?&type=${type}` : '';
    return $http.get(`air/device/type${params}`).then((res) => res.data);
  },
  putNewDevice(device) {
    return $http.post(`air/device/create`, device).then((res) => res.data);
    return $http.put(`air/device/create`, device).then((res) => res.data);
  },
  deleteDevice(deviceCode) {
    let params = `deviceCode=${deviceCode}`;
    return $http.post(`air/device/delete?${params}`).then((res) => res.data);
    return $http.delete(`air/device/delete?${params}`).then((res) => res.data);
  }
};