Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
周少峰
9 years ago
Commit
e6f4ea32d8c1291cb0f4ea263893fc76e01454b6
1 parent
c418197f
品牌多选
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
library/WebPlugin/HelperSearch.php
library/WebPlugin/HelperSearch.php
View file @
e6f4ea3
...
...
@@ -191,8 +191,7 @@ class HelperSearch
$val
[
'default_images'
]
=
Images
::
getImageUrl
(
$val
[
'default_images'
],
$imgSize
[
0
],
$imgSize
[
1
]);
}
//搜索关键字高亮
$patten
=
"/"
.
self
::
$params
[
'query'
]
.
"/i"
;
if
(
isset
(
self
::
$params
[
'query'
])
&&
!
empty
(
self
::
$params
[
'query'
])
&&
preg_match
(
$patten
,
$val
[
'product_name'
],
$match
))
{
if
(
isset
(
self
::
$params
[
'query'
])
&&
!
empty
(
self
::
$params
[
'query'
])
&&
preg_match
(
"/"
.
self
::
$params
[
'query'
]
.
"/i"
,
$val
[
'product_name'
],
$match
))
{
foreach
(
$match
as
$k
=>
&
$v
)
{
$replace
[
$k
]
=
'<span style="color: #cc0000">'
.
$v
.
'</span>'
;
$v
=
'/'
.
$v
.
'/'
;
...
...
Please
register
or
login
to post a comment