import request from '@/utils/request'

// 查询供应商路线列表
export function listRoute(query) {
  return request({
    url: '/tuya/supplierroute/list',
    method: 'get',
    params: query
  })
}

// 查询供应商路线详细
export function getRoute(id) {
  return request({
    url: '/tuya/supplierroute/' + id,
    method: 'get'
  })
}

// 新增供应商路线
export function addRoute(data) {
  return request({
    url: '/tuya/supplierroute',
    method: 'post',
    data: data
  })
}

// 修改供应商路线
export function updateRoute(data) {
  return request({
    url: '/tuya/supplierroute',
    method: 'put',
    data: data
  })
}

// 删除供应商路线
export function delRoute(id) {
  return request({
    url: '/tuya/supplierroute/' + id,
    method: 'delete'
  })
}
//修改热门标识
export function  changeHotForm (id, hotForm){
  const data = {
    id,
    hotForm
  }
  return request({
    url: '/tuya/supplierroute/changeHotForm',
    method: 'put',
    data: data
  })
}
