1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| import request from '@/utils/request'
|
| // 创建分类
| export function createCategory(data) {
| return request({
| url: '/infra/category/create',
| method: 'post',
| data: data
| })
| }
|
| // 更新分类
| export function updateCategory(data) {
| return request({
| url: '/infra/category/update',
| method: 'put',
| data: data
| })
| }
|
| // 删除分类
| export function deleteCategory(id) {
| return request({
| url: '/infra/category/delete?id=' + id,
| method: 'delete'
| })
| }
|
| // 获得分类
| export function getCategory(id) {
| return request({
| url: '/infra/category/get?id=' + id,
| method: 'get'
| })
| }
|
| // 获得分类列表
| export function getCategoryList(params) {
| return request({
| url: '/infra/category/list',
| method: 'get',
| params
| })
| }
| // 导出分类 Excel
| export function exportCategoryExcel(params) {
| return request({
| url: '/infra/category/export-excel',
| method: 'get',
| params,
| responseType: 'blob'
| })
| }
|
|