import request from '@/utils/request'

export function fetchKeywordList(params) {
  return request({
    url: '/keyword/keyword/list',
    method: 'get',
    params
  })
}

export function joinKeywordLibrary(params) {
  return request({
    url: '/keyword/join/label',
    method: 'get',
    params
  })
}

export function fetchKeywordRecommendList(params) {
  return request({
    url: '/keyword/recommend/list',
    method: 'get',
    params
  })
}

export function ignoreKeyword(params) {
  return request({
    url: '/keyword/ignore/label',
    method: 'get',
    params
  })
}

export function addKeyword(params) {
  return request({
    url: '/keyword/insert/label',
    method: 'get',
    params
  })
}

export function deleteKeyword(params) {
  return request({
    url: '/keyword/delete/label',
    method: 'get',
    params
  })
}

export function importKeywordXlsx(data) {
  return request({
    url: '/keyword/import/label',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
