50 lines
896 B
Plaintext
50 lines
896 B
Plaintext
import { http } from '@/utils/http/axios';
|
|
|
|
/**
|
|
* @description: 列表
|
|
*/
|
|
export function getCategoryList(params?) {
|
|
return http.request({
|
|
url: '/category/list',
|
|
method: 'GET',
|
|
params,
|
|
});
|
|
}
|
|
/**
|
|
* @description: 根据ID获取详情
|
|
*/
|
|
export function getCategoryDetail(categoryId) {
|
|
return http.request({
|
|
url: '/category/detail/'+categoryId,
|
|
method: 'get',
|
|
});
|
|
}
|
|
/**
|
|
* @description: 添加
|
|
*/
|
|
export function categoryAdd(data:any) {
|
|
return http.request({
|
|
url: '/category/add',
|
|
method: 'POST',
|
|
data,
|
|
});
|
|
}
|
|
/**
|
|
* @description: 更新
|
|
*/
|
|
export function categoryUpdate(data:any) {
|
|
return http.request({
|
|
url: '/category/update',
|
|
method: 'PUT',
|
|
data
|
|
});
|
|
}
|
|
/**
|
|
* @description: 删除部门
|
|
*/
|
|
export function categoryDelete(categoryId) {
|
|
return http.request({
|
|
url: '/category/delete/'+categoryId,
|
|
method: 'DELETE',
|
|
});
|
|
} |