提交 | 用户 | 时间
|
1c14d6
|
1 |
import request from '@/config/axios' |
L |
2 |
|
|
3 |
export interface HttpApiVO { |
|
4 |
id: string |
|
5 |
name: string, |
|
6 |
code: string, |
|
7 |
url: string, |
|
8 |
method: string, |
|
9 |
collectType: string, |
|
10 |
param: string, |
|
11 |
descp: string, |
cfaf8b
|
12 |
isAuth: number, |
潘 |
13 |
authUrl: string, |
1c14d6
|
14 |
status: number |
L |
15 |
} |
|
16 |
|
|
17 |
export interface HttpApiPageReqVO extends PageParam { |
|
18 |
name?: string, |
|
19 |
code?: string |
|
20 |
} |
|
21 |
|
|
22 |
// 查询HttpApi列表 |
|
23 |
export const getHttpApiPage = (params: HttpApiPageReqVO) => { |
|
24 |
return request.get({ url: '/data/channel/http/api/page', params }) |
|
25 |
} |
|
26 |
|
|
27 |
// 查询HttpApi详情 |
|
28 |
export const getHttpApi = (id: number) => { |
|
29 |
return request.get({ url: `/data/channel/http/api/info/${id}`}) |
|
30 |
} |
|
31 |
|
|
32 |
// 新增HttpApi |
|
33 |
export const createHttpApi = (data: HttpApiVO) => { |
6d9c08
|
34 |
return request.post({ url: '/data/channel/http/api/create', data }) |
1c14d6
|
35 |
} |
L |
36 |
|
|
37 |
// 修改HttpApi |
|
38 |
export const updateHttpApi = (data: HttpApiVO) => { |
|
39 |
return request.put({ url: '/data/channel/http/api/update', data }) |
|
40 |
} |
|
41 |
|
|
42 |
// 删除HttpApi |
|
43 |
export const deleteHttpApi = (id: number) => { |
|
44 |
return request.delete({ url: '/data/channel/http/api/delete?id=' + id }) |
|
45 |
} |