import request from '@/utils/request'

export function getArticleList(params) { return request({ url: '/slgc/cms-article/list', method: 'get', params }) }
export function getArticleDetail(aid) { return request({ url: '/slgc/cms-article/' + aid, method: 'get' }) }
export function addArticle(data) { return request({ url: '/slgc/cms-article', method: 'post', data }) }
export function updateArticle(data) { return request({ url: '/slgc/cms-article', method: 'put', data }) }
export function delArticle(aids) { return request({ url: '/slgc/cms-article/' + aids, method: 'delete' }) }
export function batchAddArticle(data) { return request({ url: '/slgc/cms-article/batch', method: 'post', data }) }
export function batchUpdateArticle(data) { return request({ url: '/slgc/cms-article/batch', method: 'put', data }) }

export function getCateList(params) { return request({ url: '/slgc/cms-cate/list', method: 'get', params }) }
export function getCateTree() { return request({ url: '/slgc/cms-cate/tree', method: 'get' }) }
export function getCate(id) { return request({ url: '/slgc/cms-cate/' + id, method: 'get' }) }
export function addCate(data) { return request({ url: '/slgc/cms-cate', method: 'post', data }) }
export function updateCate(data) { return request({ url: '/slgc/cms-cate', method: 'put', data }) }
export function delCate(cateIds) { return request({ url: '/slgc/cms-cate/' + cateIds, method: 'delete' }) }
