From 0ebe5f9cc2a26d6242f66ff30f2423aa6db2ffa9 Mon Sep 17 00:00:00 2001 From: imeepos Date: Wed, 3 Sep 2025 21:16:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E9=A1=B5=E9=9D=A2=E5=8F=82=E6=95=B0=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E5=92=8C=E6=B8=85=E7=90=86=E6=9C=AA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 统一结果页面参数格式,使用images参数传递图片数组 - 移除未使用的clearHistory函数,简化代码结构 - 保持与其他页面的参数传递格式一致 --- src/pages/history/index.tsx | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) 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 '生成中'