import request from '@/utils/request'

// 查询搜索记录列表
export function listInfo(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.searchRecordsInfo',
      _mt: 'list',
      ...query
    }
  })
}

// 查询搜索记录详细
export function getInfo(id) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.searchRecordsInfo',
      _mt: 'get',
      id: id
    }
  })
}

// 新增搜索记录
export function addInfo(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.searchRecordsInfo',
      _mt: 'add',
      searchRecordsInfo: data
    }
  })
}

// 修改搜索记录
export function updateInfo(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.searchRecordsInfo',
      _mt: 'update',
      searchRecordsInfo: data
    }
  })
}

// 删除搜索记录
export function delInfo(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.searchRecordsInfo',
      _mt: 'delete',
      id: id
    }
  })
}

// 导出搜索记录
export function exportInfo(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.searchRecordsInfo',
      _mt: 'export',
      ...query
    }
  })
}
