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
周少峰
8 years ago
Commit
26474cf81faad82ddb1d49e27b360bb24fc45c90
1 parent
ab2a1d7a
response 404
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
apps/product/controllers/detail.js
apps/product/models/detail-service.js
apps/product/controllers/detail.js
View file @
26474cf
...
...
@@ -39,7 +39,7 @@ const showMain = (req, res, next) => {
module
:
'product'
,
page
:
'detail'
},
result
.
seo
,
result
));
}).
catch
(
next
);
}).
catch
(
()
=>
next
()
);
};
...
...
apps/product/models/detail-service.js
View file @
26474cf
...
...
@@ -14,7 +14,7 @@ const cheerio = require('cheerio');
const
helpers
=
global
.
yoho
.
helpers
;
const
config
=
global
.
yoho
.
config
;
const
crypto
=
global
.
yoho
.
crypto
;
const
logger
=
global
.
yoho
.
logger
;
const
videoPlayerTpl
=
require
(
'../helper/video-player-tpl'
);
const
productAPI
=
require
(
'./detail-product-api'
);
...
...
@@ -1520,6 +1520,7 @@ const showMainAsync = (data) => {
let
productData
=
yield
productAPI
.
getProductAsync
(
data
.
pid
,
data
.
uid
,
data
.
isStudent
,
data
.
vipLevel
);
if
(
_
.
isEmpty
(
productData
.
data
))
{
logger
.
error
(
'app.product.data api wrong'
);
return
Promise
.
reject
({
code
:
404
,
message
:
'app.product.data api wrong'
...
...
Please
register
or
login
to post a comment