You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.6 KiB
78 lines
1.6 KiB
|
4 months ago
|
import request from '@/utils/request';
|
||
|
|
import { AxiosPromise } from 'axios';
|
||
|
|
import { matterPage,createDir,matterTreeList} from './type';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 获取空间目录文件
|
||
|
|
*/
|
||
|
|
export function getSpaceMatterList( uid:string,data?: matterPage): AxiosPromise<matterTreeList> {
|
||
|
|
return request({
|
||
|
|
url: '/hxpan/api/space/page',
|
||
|
|
method: 'post',
|
||
|
|
headers: {
|
||
|
|
'Identifier':uid,
|
||
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||
|
|
},
|
||
|
|
data: data
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 新建目录
|
||
|
|
*/
|
||
|
|
export function doCreateSpaceDir(uid:string,data?: createDir){
|
||
|
|
return request({
|
||
|
|
url: '/hxpan/api/space/directory',
|
||
|
|
method: 'post',
|
||
|
|
headers: {
|
||
|
|
'Identifier':uid,
|
||
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||
|
|
},
|
||
|
|
data: data
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 空间权限控制管理
|
||
|
|
*/
|
||
|
|
export function doAccessManage(uid:string,data?: any){
|
||
|
|
return request({
|
||
|
|
url: '/hxpan/api/space/access',
|
||
|
|
method: 'post',
|
||
|
|
headers: {
|
||
|
|
'Identifier':uid,
|
||
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||
|
|
},
|
||
|
|
data: data
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 删除空间
|
||
|
|
*/
|
||
|
|
export function doDelSpace(uid:string,data?: any){
|
||
|
|
return request({
|
||
|
|
url: '/hxpan/api/space/delete',
|
||
|
|
method: 'post',
|
||
|
|
headers: {
|
||
|
|
'Identifier':uid,
|
||
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||
|
|
},
|
||
|
|
data: data
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 删除文件或目录
|
||
|
|
*/
|
||
|
|
export function doDelSpaceMatter(uid:string,data?: any){
|
||
|
|
return request({
|
||
|
|
url: '/hxpan/api/space/materdelete',
|
||
|
|
method: 'post',
|
||
|
|
headers: {
|
||
|
|
'Identifier':uid,
|
||
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||
|
|
},
|
||
|
|
data: data
|
||
|
|
});
|
||
|
|
}
|