提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface FileClientConfig { |
|
4 |
basePath: string |
|
5 |
host?: string |
|
6 |
port?: number |
|
7 |
username?: string |
|
8 |
password?: string |
|
9 |
mode?: string |
|
10 |
endpoint?: string |
|
11 |
bucket?: string |
|
12 |
accessKey?: string |
|
13 |
accessSecret?: string |
|
14 |
domain: string |
|
15 |
} |
|
16 |
|
|
17 |
export interface FileConfigVO { |
|
18 |
id: number |
|
19 |
name: string |
|
20 |
storage?: number |
|
21 |
master: boolean |
|
22 |
visible: boolean |
|
23 |
config: FileClientConfig |
|
24 |
remark: string |
|
25 |
createTime: Date |
|
26 |
} |
|
27 |
|
|
28 |
// 查询文件配置列表 |
|
29 |
export const getFileConfigPage = (params: PageParam) => { |
|
30 |
return request.get({ url: '/infra/file-config/page', params }) |
|
31 |
} |
|
32 |
|
|
33 |
// 查询文件配置详情 |
|
34 |
export const getFileConfig = (id: number) => { |
|
35 |
return request.get({ url: '/infra/file-config/get?id=' + id }) |
|
36 |
} |
|
37 |
|
|
38 |
// 更新文件配置为主配置 |
|
39 |
export const updateFileConfigMaster = (id: number) => { |
|
40 |
return request.put({ url: '/infra/file-config/update-master?id=' + id }) |
|
41 |
} |
|
42 |
|
|
43 |
// 新增文件配置 |
|
44 |
export const createFileConfig = (data: FileConfigVO) => { |
|
45 |
return request.post({ url: '/infra/file-config/create', data }) |
|
46 |
} |
|
47 |
|
|
48 |
// 修改文件配置 |
|
49 |
export const updateFileConfig = (data: FileConfigVO) => { |
|
50 |
return request.put({ url: '/infra/file-config/update', data }) |
|
51 |
} |
|
52 |
|
|
53 |
// 删除文件配置 |
|
54 |
export const deleteFileConfig = (id: number) => { |
|
55 |
return request.delete({ url: '/infra/file-config/delete?id=' + id }) |
|
56 |
} |
|
57 |
|
|
58 |
// 测试文件配置 |
|
59 |
export const testFileConfig = (id: number) => { |
|
60 |
return request.get({ url: '/infra/file-config/test?id=' + id }) |
|
61 |
} |