import type { IExecuteCommand } from '@/api/types/centerControl'
import { http } from '@/http/http'

/**
 * 设备是否在线
 */
export function checkSnOrBikeCodeAPI(query: { ecuSn: string, bikeCode: string }) {
  return http.get<any>('/operations/ebikeEcuInfo/online', query)
}

/**
 * 中控执行命令
 */
export function executeCommandAPI(query: IExecuteCommand) {
  return http.get<any>('/operations/ebikeEcuInfo/executeCommand', query, {}, {
    hideErrorToast: true,
  })
}
