Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
8 years ago
Commit
9b257c825ef9f992432a0c74506f8b67d7d9e430
1 parent
91168b2d
fix bug
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletions
apps/product/controllers/search.js
apps/product/controllers/search.js
View file @
9b257c8
...
...
@@ -162,11 +162,31 @@ const searchRecommend = (req, res, next) => {
}).
catch
(
next
);
};
/**
* 搜索少或无 有可能喜欢
**/
const
searchLessRecommend
=
(
req
,
res
,
next
)
=>
{
let
channel
=
req
.
yoho
.
channel
;
let
uid
=
req
.
user
.
uid
;
let
udid
=
req
.
yoho
.
udid
;
let
page
=
Number
(
req
.
query
.
page
||
1
);
if
(
page
<=
0
||
page
>=
6
)
{
page
=
1
;
}
search
.
getSearchLessProduct
(
channel
,
uid
,
udid
,
page
).
then
(
result
=>
{
return
res
.
send
(
result
);
}).
catch
(
next
);
};
module
.
exports
=
{
index
,
suggest
,
suggest4Old
,
searchFilterBrands
,
searchHistory
,
// 搜索历史记录
searchRecommend
// 搜索框下方 热门搜索
searchRecommend
,
// 搜索框下方 热门搜索
searchLessRecommend
};
...
...
Please
register
or
login
to post a comment