From 6e6d4e145f69b1a24acbc139e9df0e840f5eb730 Mon Sep 17 00:00:00 2001 From: davy Date: Mon, 7 Apr 2025 13:40:26 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=8A=BD=E7=A6=BBBeerCard=E7=BB=84?= =?UTF-8?q?=E4=BB=B6,=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BeerCard.vue | 121 +++++++++++++++ components/SearchBar.vue | 91 ----------- pages/index/newBeer.vue | 238 +++++++++++++---------------- pages/index/styleBeer.vue | 286 ++++++++++++++++++++++++++--------- pagesActivity/homeSearch.vue | 9 +- 5 files changed, 452 insertions(+), 293 deletions(-) create mode 100644 components/BeerCard.vue delete mode 100644 components/SearchBar.vue diff --git a/components/BeerCard.vue b/components/BeerCard.vue new file mode 100644 index 0000000..00c9fc6 --- /dev/null +++ b/components/BeerCard.vue @@ -0,0 +1,121 @@ + + + + + \ No newline at end of file diff --git a/components/SearchBar.vue b/components/SearchBar.vue deleted file mode 100644 index 2e1557e..0000000 --- a/components/SearchBar.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index/newBeer.vue b/pages/index/newBeer.vue index 42e170f..84b8a5a 100644 --- a/pages/index/newBeer.vue +++ b/pages/index/newBeer.vue @@ -65,19 +65,7 @@ {{ it.launchDate.slice(8, 10)}} /{{ it.launchDate.slice(5, 7)}}月 - - - - - {{it.beerName}} - - {{it.beerStyles}} - {{it.brandName}} - - - - - + @@ -88,80 +76,84 @@ \ No newline at end of file diff --git a/pagesActivity/homeSearch.vue b/pagesActivity/homeSearch.vue index df163fb..c239469 100644 --- a/pagesActivity/homeSearch.vue +++ b/pagesActivity/homeSearch.vue @@ -78,7 +78,7 @@ 全系列{{item.popular}}款产品在售 @@ -647,10 +647,11 @@ } }, - // 按风格搜索 + // 点击热门风格 searchByStyle(item) { - this.keyword = item.beerStyles - this.search() + uni.navigateTo({ + url: '/pages/index/styleBeer?beerStyles=' + item.beerStyles + }); }, // 跳转酒厂详情