Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
Plain Diff
Browse Files
Authored by
陈峰
8 years ago
Commit
ca79d5fa663e400caade3416c8a63c81c3cba74e
2 parents
240ff45f
efb7551c
Merge branch 'hotfix/bugs' of
http://git.yoho.cn/fe/yohobuywap-node
into hotfix/bugs
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
utils/product-process.js
utils/product-process.js
View file @
ca79d5f
...
...
@@ -204,13 +204,14 @@ exports.processProductList = (list, options) => {
*/
exports
.
termsSuggestion
=
(
list
,
options
)
=>
{
let
termsSuggestion
=
[];
let
query
=
options
.
query
&&
decodeURIComponent
(
options
.
query
.
replace
(
/
\%
/g
,
escape
(
'%'
)))
||
''
;
_
.
each
(
list
,
(
terms
,
index
)
=>
{
termsSuggestion
.
push
({
name
:
terms
,
link
:
helpers
.
urlFormat
(
'/'
,
{
needSuggestion
:
'Y'
,
query
:
terms
,
from
:
'search'
},
'search'
),
select
:
(
options
.
isChangedQuery
&&
index
===
0
)
||
(
options
.
needSuggestion
===
'Y'
&&
terms
===
decodeURIComponent
(
options
.
query
)
)
(
options
.
needSuggestion
===
'Y'
&&
terms
===
query
)
});
});
...
...
Please
register
or
login
to post a comment