diff --git a/src/pages/history/index.tsx b/src/pages/history/index.tsx index 2e09def..01d3957 100644 --- a/src/pages/history/index.tsx +++ b/src/pages/history/index.tsx @@ -42,7 +42,7 @@ export default function History() { if (record.status === 'completed' && record.outputResult) { // 跳转到结果页面查看 navigateTo({ - url: `/pages/result/index?resultUrl=${encodeURIComponent(record.outputResult)}` + url: `/pages/result/index?images=${encodeURIComponent(JSON.stringify([record.outputResult!]))}` }) } else if (record.status === 'failed') { // 显示错误信息 @@ -60,29 +60,6 @@ export default function History() { } } - const clearHistory = () => { - Taro.showModal({ - title: '确认清空', - content: '是否清空所有历史记录?', - success: async (res) => { - if (res.confirm) { - try { - await dispatch(clearRecords()) - Taro.showToast({ - title: '清空成功', - icon: 'success' - }) - } catch (error) { - Taro.showToast({ - title: '清空失败', - icon: 'error' - }) - } - } - } - }) - } - const getStatusText = (status: string) => { switch (status) { case 'generating': return '生成中'