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
yyq
7 years ago
Commit
8d8855e04e156cbf9090ea428593f98045376420
1 parent
0c49b268
fix notfond
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
apps/product/controllers/seo.js
apps/product/models/seo-service.js
apps/product/controllers/seo.js
View file @
8d8855e
...
...
@@ -9,6 +9,10 @@ const seoModel = require('../models/seo-service'); // seo 页 model
const
hot
=
(
req
,
res
,
next
)
=>
{
return
req
.
ctx
(
seoModel
).
getHotKeywordDate
(
req
.
params
.
id
,
req
.
query
,
req
.
yoho
.
channel
).
then
(
result
=>
{
if
(
!
result
)
{
return
next
();
}
res
.
render
(
'seo/hot'
,
result
);
}).
catch
(
next
);
};
...
...
apps/product/models/seo-service.js
View file @
8d8855e
...
...
@@ -130,7 +130,8 @@ module.exports = class extends global.yoho.BaseModel {
}
if
(
!
_
.
get
(
keyword
,
'name'
))
{
return
Promise
.
reject
(
`
cannot
find
hot
keywords
by
id
(
$
{
id
})
`
);
logger
.
error
(
`
cannot
find
hot
keywords
by
id
(
$
{
id
})
`
);
return
false
;
}
params
.
query
=
keyword
.
name
;
...
...
Please
register
or
login
to post a comment