From 841017988550e42f4bf9f7c1f325db4d248cacfa Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Fri, 2 Oct 2026 15:26:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(buyer):=20=E5=A2=9E=E5=BC=BA=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=8A=9F=E8=83=BD=E5=B9=B6=E6=8F=90=E5=8D=87=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 `getStoreById` 接口方法,用于获取包含评分在内的店铺信息 - `Search.vue` 新增搜索建议面板,展示搜索历史和热词,优化搜索体验 - 新增 `SearchSuggest.vue` 组件,用于展示搜索建议和搜索历史 - `App.vue` 根据路由元信息按条件设置页面标题 - 优化多个组件的布局与样式,让整体风格更统一 - 重构多个组件的跳转逻辑,改用路由跳转(`router.push`)替代新开窗口(`window.open`),提升用户体验 --- buyer/src/App.vue | 4 +- buyer/src/api/shopentry.js | 9 + buyer/src/components/Search.vue | 248 ++++++++--- buyer/src/components/SearchSuggest.vue | 151 +++++++ buyer/src/components/drawer/Drawer.vue | 2 +- buyer/src/components/drawer/Main.vue | 20 +- buyer/src/components/footer/Footer.vue | 5 +- buyer/src/components/goods/GoodsThumb.vue | 118 +++++ .../src/components/goodsDetail/ShowGoods.vue | 150 +++---- .../goodsDetail/ShowGoodsDetail.vue | 37 +- .../src/components/goodsDetail/StoreSide.vue | 419 ++++++++++++++++++ buyer/src/components/header/Header.vue | 46 +- buyer/src/components/header/hoverSearch.vue | 10 +- .../indexDecorate/modelList/Carousel.vue | 14 +- .../indexDecorate/modelList/Carousel2.vue | 3 +- .../indexDecorate/modelList/Seckill.vue | 3 +- buyer/src/components/nav/CateNav.vue | 3 +- buyer/src/pages/Cart.vue | 6 +- buyer/src/pages/CouponCenter.vue | 300 +++++++------ buyer/src/pages/GoodsDetail.vue | 123 +---- buyer/src/pages/GoodsList.vue | 93 +++- buyer/src/pages/Login.vue | 8 +- buyer/src/pages/NotFound.vue | 44 ++ buyer/src/pages/SignUp.vue | 8 +- buyer/src/pages/home/Main.vue | 278 +++++++++++- .../pages/home/memberCenter/AccountSafe.vue | 156 ++++--- .../pages/home/memberCenter/ComplainList.vue | 6 + .../src/pages/home/memberCenter/Favorites.vue | 3 +- .../home/memberCenter/memberMsg/MsgDetail.vue | 7 +- .../home/memberCenter/memberMsg/MsgList.vue | 3 + .../src/pages/home/orderCenter/AfterSale.vue | 3 +- .../home/orderCenter/AfterSaleDetail.vue | 3 +- buyer/src/pages/home/orderCenter/MyOrder.vue | 35 +- .../pages/home/orderCenter/OrderDetail.vue | 3 +- buyer/src/pages/home/userCenter/MyTracks.vue | 3 +- buyer/src/pages/payment/Pay.vue | 3 +- buyer/src/pages/promotion/seckill.vue | 249 +++++++---- buyer/src/pages/user/Home.vue | 97 +++- buyer/src/pages/user/menu.js | 34 +- buyer/src/router/index.js | 21 +- buyer/src/utils/buyerLogin.js | 34 +- buyer/src/utils/unreadMessage.js | 24 + buyer/src/vuex/mutations.js | 3 + buyer/src/vuex/store.js | 1 + 44 files changed, 2116 insertions(+), 674 deletions(-) create mode 100644 buyer/src/components/SearchSuggest.vue create mode 100644 buyer/src/components/goods/GoodsThumb.vue create mode 100644 buyer/src/components/goodsDetail/StoreSide.vue create mode 100644 buyer/src/pages/NotFound.vue create mode 100644 buyer/src/utils/unreadMessage.js diff --git a/buyer/src/App.vue b/buyer/src/App.vue index 8130cf7de..7affed580 100644 --- a/buyer/src/App.vue +++ b/buyer/src/App.vue @@ -23,7 +23,9 @@ export default { storage.setItem("siteIcon", data.buyerSideIcon); this.$store.commit("SET_SITENAME", data.siteName); this.$store.commit("SET_LOGOIMG", data.buyerSideLogo); - window.document.title = data.siteName; + if (this.$route.meta.title === undefined) { + window.document.title = data.siteName; + } let link = document.querySelector("link[rel*='icon']") || document.createElement("link"); diff --git a/buyer/src/api/shopentry.js b/buyer/src/api/shopentry.js index 0e5fb90ef..18aefdc90 100644 --- a/buyer/src/api/shopentry.js +++ b/buyer/src/api/shopentry.js @@ -42,6 +42,15 @@ export function applyThird (params) { }) } +// 店铺信息(含评分) +export function getStoreById (id) { + return request({ + url: `/buyer/store/store/store/${id}`, + needToken: false, + method: Method.GET + }) +} + // 店铺详情 export function getDetailById (id) { return request({ diff --git a/buyer/src/components/Search.vue b/buyer/src/components/Search.vue index 96d6ffc42..ab96835f8 100644 --- a/buyer/src/components/Search.vue +++ b/buyer/src/components/Search.vue @@ -7,11 +7,24 @@ size="large" class="search-input" placeholder="输入你想查找的商品" + @focus="openPanel" + @input="queueSuggest" @keyup.enter="search" />
+
+ +