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' })); }