第一次
This commit is contained in:
80
src/services/files/index.ts
Normal file
80
src/services/files/index.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
import { request } from '@umijs/max';
|
||||
|
||||
|
||||
// 分类
|
||||
export function categoryAdd(params?: any, options?: { [key: string]: any }) {
|
||||
return request(`/admin/files/category/add`, {
|
||||
method: 'POST',
|
||||
data:params,
|
||||
...(options || {})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function categoryList(params?: any, options?: { [key: string]: any }) {
|
||||
return request(`/admin/files/category/list`, {
|
||||
method: 'POST',
|
||||
data:params,
|
||||
...(options || {})
|
||||
});
|
||||
}
|
||||
|
||||
export function categoryDelete(params?: any, options?: { [key: string]: any }) {
|
||||
return request(`/admin/files/category/deleteBatchByIds`, {
|
||||
method: 'POST',
|
||||
data:params,
|
||||
...(options || {})
|
||||
});
|
||||
}
|
||||
|
||||
export function roleUpdate(params?: any, options?: { [key: string]: any }) {
|
||||
return request(`/admin/sys/role/update`, {
|
||||
method: 'POST',
|
||||
data:params,
|
||||
...(options || {})
|
||||
});
|
||||
}
|
||||
|
||||
// 文件
|
||||
export function filesPage(params?: any, options?: { [key: string]: any }) {
|
||||
return request(`/admin/files/page`, {
|
||||
method: 'POST',
|
||||
data:params,
|
||||
...(options || {})
|
||||
});
|
||||
}
|
||||
|
||||
export function filesAdd(params?: any, options?: { [key: string]: any }) {
|
||||
return request(`/admin/files/add`, {
|
||||
method: 'POST',
|
||||
data:params,
|
||||
...(options || {})
|
||||
});
|
||||
}
|
||||
|
||||
export function filesDelete(params?: any, options?: { [key: string]: any }) {
|
||||
return request(`/admin/files/deleteBatchByIds`, {
|
||||
method: 'POST',
|
||||
data:params,
|
||||
...(options || {})
|
||||
});
|
||||
}
|
||||
|
||||
export function filesMove(params?: any, options?: { [key: string]: any }) {
|
||||
return request(`/admin/files/moveFile`, {
|
||||
method: 'POST',
|
||||
data:params,
|
||||
...(options || {})
|
||||
});
|
||||
}
|
||||
|
||||
// OSS
|
||||
export function getOssUploadParams(params?: any, options?: { [key: string]: any }) {
|
||||
return request(`/admin/files/getOssUploadParams`, {
|
||||
method: 'GET',
|
||||
data:params,
|
||||
...(options || {})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user