From 7baac33d0d75bbbbaa42c87f8f596533b9c71d18 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Sat, 11 Apr 2026 11:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/pc/public/header.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/index/view/pc/public/header.html b/app/index/view/pc/public/header.html index ec8229af..51c1640b 100644 --- a/app/index/view/pc/public/header.html +++ b/app/index/view/pc/public/header.html @@ -234,6 +234,10 @@ }); }); + + + + let searchHistory = JSON.parse(localStorage.getItem('searchHistory') || '[]'); function renderHistory () @@ -330,14 +334,14 @@ }); } // 鼠标移入导航项时,关闭购买下拉框 - const navItems = document.querySelectorAll('.nav-item'); + const navItems = document.querySelectorAll('.header-nav-item'); navItems.forEach(item => { + item.addEventListener('mouseenter', () => { - if (buyDropdown) { - buyDropdown.classList.remove('show'); - } + console.log('122132') + buyDropdown.classList.remove('show'); }); });