修改细节
This commit is contained in:
parent
063c5dd568
commit
cb550b6be0
@ -123,10 +123,19 @@
|
||||
/** 编辑模板 */
|
||||
const editTemplate = async (item: Item) => {
|
||||
try {
|
||||
const res = await getEditorToken({ templateId: item.uuid, purpose: 'edit' });
|
||||
// 确保传递正确的模板ID,支持id和uuid字段
|
||||
const templateId = item.uuid || item.id;
|
||||
console.log('[editTemplate] 模板数据:', item, '使用templateId:', templateId);
|
||||
|
||||
if (!templateId) {
|
||||
EleMessage.error('模板ID缺失,无法编辑');
|
||||
return;
|
||||
}
|
||||
|
||||
const res = await getEditorToken({ templateId: templateId, purpose: 'edit' });
|
||||
console.log('[editTemplate] getEditorToken返回:', res);
|
||||
if (res && res.fastPosterUrl && res.editorToken) {
|
||||
const url = `${res.fastPosterUrl}?editorToken=${res.editorToken}`;
|
||||
const url = `${res.fastPosterUrl}?editorToken=${res.editorToken}&templateId=${templateId}`;
|
||||
console.log('[editTemplate] 跳转URL:', url);
|
||||
window.location.href = url;
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user