From 133481053e41cbe6981b67c2884997b9cd4e63a7 Mon Sep 17 00:00:00 2001 From: kilo5hz <1005hz@outlook.com> Date: Thu, 23 Dec 2021 16:32:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=84=9A=E6=9C=AC=E4=B8=8E?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E6=A0=8F=E6=98=BE=E7=A4=BA=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample/config.sample.sh | 6 +++--- src/pages/script/index.tsx | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sample/config.sample.sh b/sample/config.sample.sh index 58122716..4c1133a8 100644 --- a/sample/config.sample.sh +++ b/sample/config.sample.sh @@ -116,8 +116,8 @@ export GOBOT_QQ="" ## gotify_url 填写gotify地址,如https://push.example.de:8080 ## gotify_token 填写gotify的消息应用token ## gotify_priority 填写推送消息优先级,默认为0 -export GOTIFY_URL=""; -export GOTIFY_TOKEN=""; -export GOTIFY_PRIORITY=0; +export GOTIFY_URL="" +export GOTIFY_TOKEN="" +export GOTIFY_PRIORITY=0 ## 其他需要的变量,脚本中需要的变量使用 export 变量名= 声明即可 diff --git a/src/pages/script/index.tsx b/src/pages/script/index.tsx index 50a594e3..08b71ada 100644 --- a/src/pages/script/index.tsx +++ b/src/pages/script/index.tsx @@ -112,17 +112,19 @@ const Script = ({ headerStyle, isPhone, theme, socketMessage }: any) => { const initGetScript = () => { const { p, s } = history.location.query as any; if (s) { + const vkey = `${p}/${s}`; const obj = { node: { title: s, value: s, - key: p ? `${p}/${s}` : s, + key: p ? vkey : s, parent: p, }, }; setExpandedKeys([p]); - onTreeSelect([`${p}/${s}`], obj); + onTreeSelect([vkey], obj); } + history.push('/script'); }; const onSelect = (value: any, node: any) => {