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
陈峰
2018-06-06 11:50:56 +0800
Commit
a42eb66a9354fedeaa84604cf7d8d3c4bc04b860
2 parents
eed8b3ce
cb69d946
Merge branch 'master' into 'gray'
Master See merge request
!305
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
apps/passport/models/index-service.js
apps/product/controllers/search.js
apps/passport/models/index-service.js
View file @
a42eb66
...
...
@@ -17,15 +17,15 @@ module.exports = class extends global.yoho.BaseModel {
*/
getResourceAsync
(
resourceCode
)
{
return
this
.
indexApi
.
getResourceAsync
(
resourceCode
)
.
then
(
result
=>
{
if
(
result
.
code
===
200
)
{
return
result
.
data
;
}
else
{
.
then
(
result
=>
{
if
(
result
.
code
===
200
)
{
return
result
.
data
;
}
else
{
return
{};
}
})
.
catch
(()
=>
{
return
{};
}
})
.
catch
(()
=>
{
return
{};
});
});
}
};
...
...
apps/product/controllers/search.js
View file @
a42eb66
...
...
@@ -157,7 +157,6 @@ const searchHistory = (req, res) => {
history
=
_
.
filter
(
history
.
split
(
','
),
old
=>
old
&&
old
!==
q
);
if
(
q
)
{
sear
;
history
.
unshift
(
q
);
res
.
cookie
(
'_History'
,
_
.
take
(
history
,
9
).
join
(
','
),
{
path
:
'/'
,
...
...
Please
register
or
login
to post a comment