Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
98cc01521d561f06bd264744a1bdac5748768595
1 parent
fd55a8b2
增加 商品 ID 检查
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
apps/product/controllers/detail.js
apps/product/models/intro.js
apps/product/controllers/detail.js
View file @
98cc015
...
...
@@ -50,15 +50,19 @@ exports.index = (req, res, next) => {
* @param {[type]} res [description]
* @return {[type]} [description]
*/
exports
.
intro
=
(
req
,
res
)
=>
{
introModel
({
exports
.
intro
=
(
req
,
res
,
next
)
=>
{
if
(
!
req
.
params
.
productskn
)
{
return
next
();
}
introModel
.
getintroData
({
productskn
:
req
.
params
.
productskn
}).
then
((
result
)
=>
{
}
,
req
).
then
((
result
)
=>
{
res
.
render
(
'detail/intro'
,
{
result
:
result
,
layout
:
false
});
});
})
.
catch
(
next
)
;
};
/**
...
...
apps/product/models/intro.js
View file @
98cc015
...
...
@@ -319,16 +319,20 @@ const getSizeInfo = (sizeInfo) => {
return
dest
;
};
module
.
exports
=
(
data
)
=>
{
let
getintroData
=
(
data
,
req
)
=>
{
var
finalResult
;
return
api
.
get
(
''
,
{
method
:
'h5.product.intro'
,
productskn
:
data
.
productskn
,
udid
:
'f528764d624db129b32c21fbca0cb8d6
'
udid
:
req
.
sessionID
||
'yoho
'
}).
then
(
result
=>
{
finalResult
=
getSizeInfo
(
result
);
return
finalResult
;
});
};
module
.
exports
=
{
getintroData
};
...
...
Please
register
or
login
to post a comment