From 40d06e38280b54ee1a9bb3f3d2202699918d638f Mon Sep 17 00:00:00 2001 From: user9994793890 <3722323274763196-user9994793890@noreply.coze.cn> Date: Fri, 10 Jul 2026 10:56:20 +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=E5=8A=A0=E8=BD=BD=E9=94=99=E8=AF=AF=20-=20to?= =?UTF-8?q?tal=5Famount=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题:加载失败: (item.total_amount || 0).toFixed is not a function 原因: - 数据库返回的 total_amount 是字符串类型(Decimal) - JavaScript中字符串没有 toFixed 方法 - 导致渲染历史记录时出错 修复: - 使用 parseFloat(item.total_amount || 0).toFixed(2) - 先将字符串转换为数字,再调用 toFixed 现在历史记录应该能正常加载和显示了。 Coze-Commit-Type: user Coze-User-ID: 3722323274763196 Coze-Conversation-ID: 9894087 --- templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 0dd2b2c..3e78a05 100644 --- a/templates/index.html +++ b/templates/index.html @@ -992,7 +992,7 @@