fix:课时编辑页面步骤处保存冗余保存问题
This commit is contained in:
@@ -539,8 +539,16 @@ function deleteSectionInRaw(level, title) {
|
||||
if (!t) return '';
|
||||
return parsed.lines.slice(t.start, t.end + 1).join('\n');
|
||||
}
|
||||
|
||||
// 加载某个步骤到编辑器
|
||||
function buildOriginSaveUrl() {
|
||||
return `/api/materials/save/${encodeURIComponent(CURRENT.material_id)}/${encodeURIComponent(CURRENT.chapter_name)}/${encodeURIComponent(CURRENT.lesson_name)}`;
|
||||
const mid = typeof CURRENT.material_id === 'string' && CURRENT.material_id
|
||||
|| (window.material && window.material.material_id) || '';
|
||||
const ch = typeof CURRENT.chapter_name === 'string' && CURRENT.chapter_name
|
||||
|| (window.chapter && window.chapter.chapter_name) || '';
|
||||
const ln = typeof CURRENT.lesson_name === 'string' && CURRENT.lesson_name
|
||||
|| (window.lesson && window.lesson.lesson_name) || '';
|
||||
return `/api/materials/save/${encodeURIComponent(mid)}/${encodeURIComponent(ch)}/${encodeURIComponent(ln)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user