| | |
| | | * 走航设备相关接口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); |
| | | } |
| | | }; |