From da67a1bf5d8ef951441d707c01d1f868b5a32e88 Mon Sep 17 00:00:00 2001 From: xuli3099 Date: Mon, 4 Aug 2025 16:19:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=90=9C=E7=B4=A2=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/customSearch.vue | 300 +++++++++++++++++++++++++------- src/pages/business/business.vue | 9 +- src/pages/home/home.vue | 9 +- src/pages/notice/notice.vue | 5 +- src/pages/search/search.vue | 11 +- 5 files changed, 265 insertions(+), 69 deletions(-) diff --git a/src/components/customSearch.vue b/src/components/customSearch.vue index c3ab321..c925faa 100644 --- a/src/components/customSearch.vue +++ b/src/components/customSearch.vue @@ -1,84 +1,262 @@ \ No newline at end of file + +// 点击搜索结果 +const handleResultClick = (item) => { + uni.showToast({ + title: `点击了 ${item.name}`, + icon: 'none' + }) + // 实际项目中这里可以跳转到详情页 + // uni.navigateTo({ url: `/pages/detail/detail?id=${item.id}` }) +} + + \ No newline at end of file diff --git a/src/pages/business/business.vue b/src/pages/business/business.vue index e4a7d2a..e2cc0d5 100644 --- a/src/pages/business/business.vue +++ b/src/pages/business/business.vue @@ -8,13 +8,13 @@ - + @@ -91,6 +91,11 @@ let handleExpand = (item)=>{ item.expandFlag = !item.expandFlag; } +// 获取input 焦点跳转 +let handleFocus=()=>{ + uni.navigateTo({url:'/pages/search/search?type=2'}) +} + // 查询搜索跳转 let handleSearch = ()=>{ diff --git a/src/pages/home/home.vue b/src/pages/home/home.vue index 2277608..58a7765 100644 --- a/src/pages/home/home.vue +++ b/src/pages/home/home.vue @@ -9,13 +9,13 @@ - + @@ -188,6 +188,11 @@ const navBarPaddingTop = ref(0); onMounted(() => { navBarPaddingTop.value = getNavBarPaddingTop()*2; }) + +// 获取input 焦点跳转 +let handleFocus=()=>{ + uni.navigateTo({url:'/pages/search/search?type=1'}) +} // 查询搜索跳转 let handleSearch = ()=>{ diff --git a/src/pages/notice/notice.vue b/src/pages/notice/notice.vue index 85d0979..3cdd94a 100644 --- a/src/pages/notice/notice.vue +++ b/src/pages/notice/notice.vue @@ -14,9 +14,10 @@ + @@ -54,7 +55,7 @@ onMounted(() => { // 获取input 焦点跳转 let handleFocus=()=>{ - uni.navigateTo({url:'/pages/search/search'}) + uni.navigateTo({url:'/pages/search/search?type=3'}) } // 查询搜索跳转 diff --git a/src/pages/search/search.vue b/src/pages/search/search.vue index d7ddbee..c1f1647 100644 --- a/src/pages/search/search.vue +++ b/src/pages/search/search.vue @@ -8,15 +8,22 @@ - +