$position = $request->post('target')['position'];
$targetChapter = ChapterLogic::instance()->getById($request->post('target')['chapter_id']);
if ($targetChapter && ($targetChapter->is_dir != Chapter::IS_DIR)) {
//移动对象不是目录
throw new ErrorHttpException('只能移动到目录下面');
}
$position = $request->post('target')['position'];
$targetChapter = ChapterLogic::instance()->getById($request->post('target')['chapter_id']);
if ($targetChapter && ($targetChapter->is_dir != Chapter::IS_DIR)) {
//移动对象不是目录
throw new ErrorHttpException('只能移动到目录下面');
}