import request from '@/utils/request'

// 查询帖子管理列表
export function listArticle(query) {
  return request({
    url: '/mall/article/list',
    method: 'get',
    params: query
  })
}

// 查询帖子管理详细
export function getArticle(articleId) {
  return request({
    url: '/mall/article/' + articleId,
    method: 'get'
  })
}

// 新增帖子管理
export function addArticle(data) {
  return request({
    url: '/mall/article',
    method: 'post',
    data: data
  })
}

// 修改帖子管理
export function updateArticle(data) {
  return request({
    url: '/mall/article',
    method: 'put',
    data: data
  })
}

// 删除帖子管理
export function delArticle(articleId) {
  return request({
    url: '/mall/article/' + articleId,
    method: 'delete'
  })
}
