From 8c16358c567e3b74f5d57a9263027a91c66a9b29 Mon Sep 17 00:00:00 2001 From: claw_bot Date: Tue, 10 Mar 2026 06:34:34 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=E7=AD=96=E7=95=A5conf?= =?UTF-8?q?ig=E5=8F=8C=E5=B1=82=E8=BD=AC=E4=B9=89=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E5=89=8D=E7=AB=AF=E8=87=AA=E5=8A=A8=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E4=B8=A4=E5=B1=82JSON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/config/config.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pages/config/config.vue b/pages/config/config.vue index 9e6bfc1..95c0a58 100644 --- a/pages/config/config.vue +++ b/pages/config/config.vue @@ -197,7 +197,19 @@ const fetchStrategies = async () => { name: item.name, desc: item.description, type: item.type, - parameters: item.config ? JSON.parse(item.config) : {}, + parameters: item.config ? (() => { + try { + let config = JSON.parse(item.config); + // 如果解析后还是字符串,再解析一次(处理双层转义) + if (typeof config === 'string') { + config = JSON.parse(config); + } + return config; + } catch (e) { + console.error('解析策略配置失败:', e); + return {}; + } + })(), color: '#10B981' })); }