import request from '@/utils/request'

// 文章列表
export function fetchList(query) {
  return request({
    url: '/setCenter/Article/list',
    method: 'get',
    params: query
  })
}

// 文章的编辑、保存
export function editArticle(data) {
  return request({
    url: '/setCenter/Article/edit',
    method: 'post',
    data: data
  })
}

export function fetchPv(pv) {
  return request({
    url: '/vue-element-admin/article/pv',
    method: 'get',
    params: { pv }
  })
}

export function createArticle(data) {
  return request({
    url: '/vue-element-admin/article/create',
    method: 'post',
    data
  })
}

export function updateArticle(data) {
  return request({
    url: '/vue-element-admin/article/update',
    method: 'post',
    data
  })
}
