import request from '@/utils/request'

/**
 * 代理商获取设备列表
 */
export function agentListDevice(params) {
  return request({
    url: "/agent/device/list",
    method: 'get',
    params
  })
}

/**
 * 代理商解绑设备商户
 * @param deviceId 设备ID
 */
export function agentUnbindDeviceMch(deviceId) {
  return request({
    url: "/agent/device/unbindMch",
    method: 'put',
    params: {
      deviceId
    }
  })
}

/**
 * 代理商更新设备信息
 * @param data
 * @returns {AxiosPromise}
 */
export function agentUpdateDevice(data) {
  return request({
    url: "/agent/device",
    method: "put",
    data
  })
}
