From 9d3d3b2a8d53caa5aba95430dc6876b22f914321 Mon Sep 17 00:00:00 2001 From: liangjiami <2249412933@qq.com> Date: Tue, 1 Jul 2025 16:42:57 +0800 Subject: [PATCH 1/4] =?UTF-8?q?style:=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/index/pc/css/aboutus_introduction.css | 1 + public/static/index/pc/css/orico_header.css | 1 + 2 files changed, 2 insertions(+) diff --git a/public/static/index/pc/css/aboutus_introduction.css b/public/static/index/pc/css/aboutus_introduction.css index d480acdd..d3433e92 100755 --- a/public/static/index/pc/css/aboutus_introduction.css +++ b/public/static/index/pc/css/aboutus_introduction.css @@ -103,6 +103,7 @@ overflow: hidden; position: relative; text-align: center; + z-index: 10; } /* .orico_Page_introduction .introductionMain .iotb_part2 .fdimgs.fdimgs1 .fdimgs-div { height: 405px; diff --git a/public/static/index/pc/css/orico_header.css b/public/static/index/pc/css/orico_header.css index 42177830..50b565ff 100755 --- a/public/static/index/pc/css/orico_header.css +++ b/public/static/index/pc/css/orico_header.css @@ -174,6 +174,7 @@ .header-PC #header .nav2 .navItem .navItemConten1 li a { cursor: pointer; padding-left: 0; + white-space: nowrap; } .header-PC #header .nav2 .navItem .navItemConten1 li a:hover { color: #004bfa; From e0898db01732a891a29b067e121447ff64d89693 Mon Sep 17 00:00:00 2001 From: liangjiami <2249412933@qq.com> Date: Tue, 1 Jul 2025 17:03:46 +0800 Subject: [PATCH 2/4] =?UTF-8?q?style:=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/index/pc/css/product_detail.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/static/index/pc/css/product_detail.css b/public/static/index/pc/css/product_detail.css index 0da9d4e7..e53cc1ce 100755 --- a/public/static/index/pc/css/product_detail.css +++ b/public/static/index/pc/css/product_detail.css @@ -596,6 +596,7 @@ background: url(/static/index/pc/images/fl.png); left: 90px; margin-top: -24.5px; + z-index: 1; } .scrollbutton.smallImgDown, @@ -603,6 +604,7 @@ background: url(/static/index/pc/images/rh.png); right: 0px; margin-top: -24.5px; + z-index: 1; } .orico_Page_prdetail .glcpmain { width: 100%; From d1690ee965dbe6ca51769b00bb6591e7d8f5fe4b Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Tue, 1 Jul 2025 17:13:24 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E4=BA=A7=E5=93=81=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E8=AF=8D=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/common.php | 19 +++++++++++++++++++ app/index/controller/Product.php | 6 +++--- app/index/model/ProductModel.php | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/index/common.php b/app/index/common.php index de61e023..81d3df13 100644 --- a/app/index/common.php +++ b/app/index/common.php @@ -222,3 +222,22 @@ if (!function_exists('get_platform')) { return $platform; } } + +if (!function_exists('highlight_keywords')) { + /** + * 高亮关键词 + * @param string $item + * @param string $keywords + * @param array $class + * @return string + */ + function highlight_keywords(string $text, string $keywords, array $class=[]): string + { + return preg_replace_callback('/' . preg_quote($keywords, '/') . '+/i', function($match) use($text, $class) { + if (empty($match)) { + return $text; + } + return '' . $match[0] . ''; + }, $text); + } +} diff --git a/app/index/controller/Product.php b/app/index/controller/Product.php index 74510312..b16ded89 100644 --- a/app/index/controller/Product.php +++ b/app/index/controller/Product.php @@ -299,9 +299,9 @@ class Product extends Common 'query' => request()->param() ]) ->each(function ($item) use($keywords) { - $item['spu'] = str_replace($keywords, ''.$keywords.'', $item['spu']); - $item['name'] = str_replace($keywords, ''.$keywords.'', $item['name']); - $item['short_name'] = str_replace($keywords, ''.$keywords.'', $item['short_name']); + $item['spu'] = highlight_keywords($item['spu'], $keywords, ['redpoint']); + $item['name'] = highlight_keywords($item['name'], $keywords, ['redpoint']); + $item['short_name'] = highlight_keywords($item['short_name'], $keywords, ['redpoint']); return $item; }); View::assign('products', $products); diff --git a/app/index/model/ProductModel.php b/app/index/model/ProductModel.php index 5b8a74f3..a4be17ef 100644 --- a/app/index/model/ProductModel.php +++ b/app/index/model/ProductModel.php @@ -79,6 +79,6 @@ class ProductModel extends ProductBaseModel // 关键词搜索 public function searchKeywordsAttr($query, string $keywords) { - $query->whereRaw('BINARY spu LIKE "%' . $keywords . '%" OR BINARY name LIKE "%' . $keywords . '%" OR BINARY short_name LIKE "%' . $keywords . '%"'); + $query->whereRaw('spu LIKE "%' . $keywords . '%" OR name LIKE "%' . $keywords . '%" OR short_name LIKE "%' . $keywords . '%"'); } } From 87c57caa4641b957ea1e599d715ae442416f6c3e Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Tue, 1 Jul 2025 17:23:14 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20pc=20nas=E4=B8=93=E9=A2=98=E9=A1=B5?= =?UTF-8?q?=20=E8=81=94=E7=B3=BB=E6=88=91=E4=BB=AC=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E9=A1=B9=E6=97=A0js=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/pc/topic_nas/help.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/index/view/pc/topic_nas/help.html b/app/index/view/pc/topic_nas/help.html index e0752832..12c373e3 100644 --- a/app/index/view/pc/topic_nas/help.html +++ b/app/index/view/pc/topic_nas/help.html @@ -136,7 +136,7 @@ $('#dropdown').hide(); } }); - $('.nhlplxwmit:not(:first)').hover(function () { + $('.nhlplxwmit').hover(function () { // 当鼠标移入时,显示.lxewmimg 并隐藏.lximg var lxe = $(this).find('.lxewmimg'); var lxi = $(this).find('.lximg');