import request from '@/utils/request'

// 智能搜索酒款
export function commonSearch(params) {
  return request({
    url: '/barmgr/platform/commonSearch',
    method: 'get',
    params: params
  })
}

// 按风格显示酒款列表
export function getBeerListByStyle(params) {
  return request({
    url: '/barmgr/platform/getBeerListByStyle',
    method: 'get',
    params: params
  })
}

// 全部品牌方列表
export function getAllBreweries(params) {
  return request({
    url: '/barmgr/platform/getAllBreweries',
    method: 'get',
    params: params
  })
}

// 获取酒款详细信息
export function getBeerInfo(beerId) {
  return request({
    url: '/barmgr/platform/beer/' + beerId,
    method: 'get'
  })
}

// 获取品牌方详细信息
export function getBreweryInfo(breweryId) {
  return request({
    url: '/barmgr/platform/brewery/' + breweryId,
    method: 'get'
  })
}

// 根据品牌方ID获取酒款列表
export function getBeersByBreweryId(breweryId, params) {
  return request({
    url: '/barmgr/platform/brewery/' + breweryId + '/beers',
    method: 'get',
    params: params
  })
}