import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { matterPage,createDir,matterTreeList} from './type'; /** * 获取空间目录文件 */ export function getSpaceMatterList( uid:string,data?: matterPage): AxiosPromise { 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 }); }