import request from '@/utils/request'

// 分页查询产品文章列表
export function pageListArticle(query) {
  return request({
    url: '/article/article/pageList',
    method: 'get',
    params: query
  })
}

// 查询产品文章列表
export function listArticle(query) {
  return request({
    url: '/article/article/list',
    method: 'get',
    params: query
  })
}

// 查询产品文章详细
export function getArticle(id) {
  return request({
    url: '/article/article/' + id,
    method: 'get'
  })
}

// 新增产品文章
export function addArticle(data) {
  return request({
    url: '/article/article',
    method: 'post',
    data: data
  })
}


// 修改产品文章
export function changeStatusByArticle(data) {
  return request({
    url: '/article/article/changeStatus',
    method: 'put',
    data: data
  })
}

// 修改产品文章
export function updateArticle(data) {
  return request({
    url: '/article/article',
    method: 'put',
    data: data
  })
}

// 删除产品文章
export function delArticle(id) {
  return request({
    url: '/article/article/' + id,
    method: 'delete'
  })
}

// 导出产品文章
export function exportArticle(query) {
  return request({
    url: '/article/article/' + 'export',
    method: 'post',
    params: query
  })
}
