恢复跳转参数

This commit is contained in:
davy 2025-07-23 17:18:29 +08:00
parent d260e09a00
commit ac32423cef

View File

@ -125,6 +125,7 @@
try { try {
// IDiduuid // IDiduuid
const templateId = item.uuid || item.id; const templateId = item.uuid || item.id;
const posterId = item.id;
console.log('[editTemplate] 模板数据:', item, '使用templateId:', templateId); console.log('[editTemplate] 模板数据:', item, '使用templateId:', templateId);
if (!templateId) { if (!templateId) {
@ -135,7 +136,8 @@
const res = await getEditorToken({ templateId: templateId, purpose: 'edit' }); const res = await getEditorToken({ templateId: templateId, purpose: 'edit' });
console.log('[editTemplate] getEditorToken返回:', res); console.log('[editTemplate] getEditorToken返回:', res);
if (res && res.fastPosterUrl && res.editorToken) { if (res && res.fastPosterUrl && res.editorToken) {
const url = `${res.fastPosterUrl}?editorToken=${res.editorToken}&templateId=${templateId}`; // posterId
const url = `${res.fastPosterUrl}?editorToken=${res.editorToken}&templateId=${templateId}&posterId=${posterId}`;
console.log('[editTemplate] 跳转URL:', url); console.log('[editTemplate] 跳转URL:', url);
window.location.href = url; window.location.href = url;
} else { } else {