From 184e81737e3a67bfc5efee090cfef6dd0eea7cc4 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 8 Apr 2026 13:54:02 +0800 Subject: [PATCH] =?UTF-8?q?header=E6=90=9C=E7=B4=A2=E6=A1=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E9=94=99=E4=B9=B1=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/mobile/index/index.html | 2 +- app/index/view/mobile/public/header.html | 49 +++++++++++++------ .../mobile/topic_power_prodline/index.html | 8 ++- app/index/view/pc/index/index.html | 2 +- app/index/view/pc/public/header.html | 3 ++ public/static/index/mobile/css/index.css | 2 +- public/static/index/pc/css/index.css | 2 +- 7 files changed, 45 insertions(+), 23 deletions(-) diff --git a/app/index/view/mobile/index/index.html b/app/index/view/mobile/index/index.html index 4260f198..b704c5e9 100644 --- a/app/index/view/mobile/index/index.html +++ b/app/index/view/mobile/index/index.html @@ -9,7 +9,7 @@
{notempty name="focus_images"} -
+
{volist name="focus_images" id="fi"}
diff --git a/app/index/view/mobile/public/header.html b/app/index/view/mobile/public/header.html index 297d9a69..0146df26 100644 --- a/app/index/view/mobile/public/header.html +++ b/app/index/view/mobile/public/header.html @@ -324,8 +324,14 @@ height: 14px; cursor: pointer; opacity: 0.6; + } - + .search-clear-box { + padding-right: 10px; + } + /* .search-clear-btn { + border-right: 1px solid #eee; + } */ .search-input-box .search-clear-btn:hover { opacity: 1; } @@ -334,8 +340,13 @@ width: 18px; height: 18px; cursor: pointer; + box-sizing: border-box; + } + .search-submit-box { + border-left: 1px solid #d9d9d9; + padding-left:10px; + max-height: 18px; } - .search-history { margin-top: 20px; } @@ -407,6 +418,10 @@ font-size: 14px; color: #aaa; } + .mobile-header-right { + display: flex; + align-items: center; + }
@@ -514,9 +529,14 @@
- - | - {:lang_i18n('搜索')} + +
+ +
+ +
+ {:lang_i18n('搜索')} +
@@ -844,16 +864,16 @@ if (keyword && keyword.trim()) { const searchKeyword = keyword.trim(); console.log('搜索关键词:', searchKeyword); - addSearchHistory(searchKeyword); - alert('搜索: ' + searchKeyword); - searchModal.classList.remove('show'); - searchInput.value = ''; - searchClearBtn.style.display = 'none'; - } else { - alert('请输入搜索关键词'); - } - } + if (searchKeyword) { + addSearchHistory(searchKeyword); + window.location.href = "{:url('product/search')}?keywords=" + encodeURIComponent(searchKeyword); + searchModal.classList.remove('show'); + searchInput.value = ''; + searchClearBtn.style.display = 'none'; + } + } + }12 searchSubmit.addEventListener('click', function (e) { e.stopPropagation(); @@ -862,6 +882,7 @@ searchInput.addEventListener('keypress', function (e) { + console.log(e,'========e=============') if (e.key === 'Enter' || e.key === 'enter' || e.keyCode === 13) { e.preventDefault(); doSearch(searchInput.value); diff --git a/app/index/view/mobile/topic_power_prodline/index.html b/app/index/view/mobile/topic_power_prodline/index.html index 1ba6c5be..0dfafd95 100644 --- a/app/index/view/mobile/topic_power_prodline/index.html +++ b/app/index/view/mobile/topic_power_prodline/index.html @@ -31,15 +31,13 @@ {/block} -{block name="header"} - -{/block} + {block name="main"} - +
{notempty name="data.focus_image"} diff --git a/app/index/view/pc/index/index.html b/app/index/view/pc/index/index.html index b0bab1e6..47f28600 100644 --- a/app/index/view/pc/index/index.html +++ b/app/index/view/pc/index/index.html @@ -9,7 +9,7 @@
{notempty name="focus_images"} -
+
{volist name="focus_images" id="focus"}
diff --git a/app/index/view/pc/public/header.html b/app/index/view/pc/public/header.html index 09c87a41..a1d3ba86 100644 --- a/app/index/view/pc/public/header.html +++ b/app/index/view/pc/public/header.html @@ -28,7 +28,10 @@ position: relative; padding: 0 12.5em; overflow: visible; + height: 64px; background: #fff; + display: flex; + align-items: center; } /* 顶部导航栏:内容区带左右边距,外框1920px */ diff --git a/public/static/index/mobile/css/index.css b/public/static/index/mobile/css/index.css index 78aacb22..f09568e7 100755 --- a/public/static/index/mobile/css/index.css +++ b/public/static/index/mobile/css/index.css @@ -13,7 +13,7 @@ overflow-x: hidden; } .oricoEGapp .oricoEGapp-index .oidx-banner { - margin-top: 3.5rem; + margin-top: 46px; z-index: 9; } .oricoEGapp .oricoEGapp-index .oidx-banner .swiper-container { diff --git a/public/static/index/pc/css/index.css b/public/static/index/pc/css/index.css index e8aeeb76..fedbcf51 100755 --- a/public/static/index/pc/css/index.css +++ b/public/static/index/pc/css/index.css @@ -17,7 +17,7 @@ width: 100%; height: auto; position: relative; - margin-top: 3.75rem; + margin-top: 64px; } .orico_Page_index .pageMain .bannerswiper .swiper-slide img {