From b336d86af10ca91ec4860cbf627724f5b9a4bd79 Mon Sep 17 00:00:00 2001 From: luJianJun <2587063613@qq.com> Date: Mon, 31 Jul 2023 12:18:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/seachModule/seachModule.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/seachModule/seachModule.vue b/src/components/seachModule/seachModule.vue index b91919b..4b457ee 100644 --- a/src/components/seachModule/seachModule.vue +++ b/src/components/seachModule/seachModule.vue @@ -170,10 +170,11 @@ historyArr.data = JSON.parse(localStorage.getItem('historyArr')) || [] //搜索数据 let seachList = (item) => { let string = seachAllType.keyword + if (!string.replace(/\s/g, "")) return if (historyArr.data.indexOf(seachAllType.keyword) === -1) { historyArr.data.push(seachAllType.keyword) } - if (string.replace(/\s/g, "")) localStorage.setItem('historyArr', JSON.stringify(historyArr.data)); + localStorage.setItem('historyArr', JSON.stringify(historyArr.data)); route.push({ path: '/seachPage', query: {