import { useRequest } from '@/use/useHttp'

/**
 * 获取热门搜索
 */
export const GetHotSearchApi = () => {
  return useRequest({
    url: '/v1/mall/hotSearch/list',
    method: 'get',
  })
}

/**
 * 获取历史搜索
 */
export const GetSearchHistoryApi = () => {
  return useRequest({
    url: '/v1/mall/searchHistory/list',
    method: 'get',
  })
}

/**
 * 添加搜索关键字
 */
export const AddSearchHistoryApi = () => {
  return useRequest({
    url: '/v1/mall/searchHistory',
    method: 'post',
  })
}
