From b30be8efb26ad085b3942c15358b18164d340e10 Mon Sep 17 00:00:00 2001 From: Yer <17633066053@163.com> Date: Fri, 21 Apr 2023 17:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=9F=8E=E7=AB=AF?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E9=87=8D=E5=A4=8D=E6=90=9C=E7=B4=A2=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/components/Search.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/buyer/src/components/Search.vue b/buyer/src/components/Search.vue index e3c5fd54..fd9ed409 100644 --- a/buyer/src/components/Search.vue +++ b/buyer/src/components/Search.vue @@ -71,10 +71,15 @@ export default { this.search(); }, search () { // 全平台搜索商品 - this.$router.push({ - path: '/goodsList', - query: { keyword: this.searchData } - }); + const url = this.$route.path; + if(url == '/goodsList'){ + this.$emit('search', this.searchData) + }else{ + this.$router.push({ + path: '/goodsList', + query: { keyword: this.searchData } + }); + } }, searchStore () { // 店铺搜索商品 this.$emit('search', this.searchData)