From 9f2dcaa4f494256f2fb4f42f65fba2de46a39b56 Mon Sep 17 00:00:00 2001 From: luJianJun <2587063613@qq.com> Date: Fri, 21 Jul 2023 15:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=86=85=E5=AE=B9=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E4=B9=9F=E8=83=BD=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/seachModule/seachModule.vue | 3 +-- src/components/seachPage/input.vue | 4 ++-- src/views/seachIndex.vue | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/seachModule/seachModule.vue b/src/components/seachModule/seachModule.vue index 6b731ff..db82612 100644 --- a/src/components/seachModule/seachModule.vue +++ b/src/components/seachModule/seachModule.vue @@ -161,11 +161,10 @@ historyArr.data = JSON.parse(localStorage.getItem('historyArr')) || [] let seachList = (item) => { // console.log(123) let string = seachAllType.keyword - if (!string.replace(/\s/g, "")) return if (historyArr.data.indexOf(seachAllType.keyword) === -1) { historyArr.data.push(seachAllType.keyword) } - localStorage.setItem('historyArr', JSON.stringify(historyArr.data)); + if (string.replace(/\s/g, "")) localStorage.setItem('historyArr', JSON.stringify(historyArr.data)); route.push({ path: '/seachPage', query: { diff --git a/src/components/seachPage/input.vue b/src/components/seachPage/input.vue index ddef97a..468be4c 100644 --- a/src/components/seachPage/input.vue +++ b/src/components/seachPage/input.vue @@ -3,7 +3,7 @@