riku
2024-09-02 02349238af964e19a46da93e20466a48d755a453
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { $http } from './index';
 
/**
 * 走航设备相关接口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);
  },
 
  putNewDevice(device) {
    return $http.post(`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);
  }
};