import request from 'umi-request';

export async function queryRule(params?: Object) {
  return request('/api/article/article-list-by-condition', {
    method: 'POST',
    data: params,
  });
}

export async function updateRule(params: Object) {
  return request('/api/article/save-article', {
    method: 'POST',
    data: params,
  });
}

export async function removeRule(params: Object) {
  return request('/api/article/del-article-list', {
    method: 'POST',
    data: params,
  });
}

export async function getArticleDetail(params: Object) {
  return request('/api/article/article-detail-by-id', {
    method: 'POST',
    data: params,
  });
}