import request from '@/utils/request'

export function getLawCateList(params) { return request({ url: '/slgc/cms-cate/list', method: 'get', params }) }
export function getLawCateTree() { return request({ url: '/slgc/cms-cate/tree', method: 'get' }) }
export function getLawCate(id) { return request({ url: '/slgc/cms-cate/' + id, method: 'get' }) }
export function addLawCate(data) { return request({ url: '/slgc/cms-cate', method: 'post', data }) }
export function updateLawCate(data) { return request({ url: '/slgc/cms-cate', method: 'put', data }) }
export function delLawCate(cateIds) { return request({ url: '/slgc/cms-cate/' + cateIds, method: 'delete' }) }
export function getLawList(params) { return request({ url: '/slgc/cms-article/list', method: 'get', params }) }
export function getLawDetail(aid) { return request({ url: '/slgc/cms-article/' + aid, method: 'get' }) }
export function saveLaw(data) { return data.aid ? request({ url: '/slgc/cms-article', method: 'put', data }) : request({ url: '/slgc/cms-article', method: 'post', data }) }
export function delLaw(aids) { return request({ url: '/slgc/cms-article/' + aids, method: 'delete' }) }
