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
Plain Diff
Browse Files
Authored by
yyq
7 years ago
Commit
50815b9f5fd80619fdc1128589d89114cf44a13b
2 parents
cef7165a
a70c862c
Merge branch 'hotfix/queryKey' into release/6.6wp
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
apps/product/controllers/search.js
apps/product/controllers/search.js
View file @
50815b9
...
...
@@ -26,16 +26,20 @@ const index = (req, res, next) => {
let
params
=
req
.
query
;
let
resData
=
{};
req
.
ctx
(
search
).
getKeyActivity
(
params
.
query
).
then
(
activityUrl
=>
{
let
queryKey
=
params
.
query
;
queryKey
&&
(
queryKey
=
queryKey
.
replace
(
/
(
<|>
)
/g
,
''
));
req
.
ctx
(
search
).
getKeyActivity
(
queryKey
).
then
(
activityUrl
=>
{
if
(
activityUrl
)
{
activityUrl
=
encodeURI
(
activityUrl
);
res
.
redirect
(
activityUrl
);
return
;
}
return
req
.
ctx
(
search
).
getSearchDataPre
(
Object
.
assign
(
params
,
{
uid
:
req
.
user
.
uid
,
prid
:
req
.
user
.
prid
}),
return
req
.
ctx
(
search
).
getSearchDataPre
(
Object
.
assign
(
params
,
{
uid
:
req
.
user
.
uid
,
prid
:
req
.
user
.
prid
,
query
:
queryKey
}),
req
.
yoho
.
channel
).
then
(
result
=>
{
let
queryKey
=
req
.
query
.
query
;
Object
.
assign
(
resData
,
result
);
...
...
Please
register
or
login
to post a comment