/** * @description 移动节点位置 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** projectId */ projectId: number; /** 文件id */ fileId: string; /** 新的父节点id */ newParentId: number; } export const init = undefined; export async function request(params = {}) { return Request({ url: '/api/smc/project/{projectId}/nodes/{fileId}/move', params, method: 'post', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'POST', url: getUrl( '/api/smc/project/{projectId}/nodes/{fileId}/move', params, 'POST', ), params, init, }; }; }