From 34ad840f2d7f4163e3c9eca4d95d63cac405aa04 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 7 Jul 2021 11:29:18 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=8D=8F=E4=BD=9C=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/WebSocketService.php | 5 ++++- resources/assets/js/store/actions.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Services/WebSocketService.php b/app/Services/WebSocketService.php index 661df950..7054ad8e 100644 --- a/app/Services/WebSocketService.php +++ b/app/Services/WebSocketService.php @@ -143,7 +143,10 @@ class WebSocketService implements WebSocketHandlerInterface $pathOld = $row->path; $row->path = $pathNew; $row->save(); - if (preg_match("/^file\/content\/\d+$/", $pathNew) || preg_match("/^file\/content\/\d+$/", $pathOld)) { + if (preg_match("/^file\/content\/\d+$/", $pathOld)) { + $this->pushPath($pathOld); + } + if (preg_match("/^file\/content\/\d+$/", $pathNew)) { $this->pushPath($pathNew); } } diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js index 345831a4..71bab93b 100644 --- a/resources/assets/js/store/actions.js +++ b/resources/assets/js/store/actions.js @@ -1640,7 +1640,7 @@ export default { if (state.wsPathValue == path) { dispatch("websocketSend", {type: 'path', data: {path}}); } - }, 3000); + }, 1000); }, /**