Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
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
Aiden Xu
9 years ago
Commit
b44cfec8b6dbf95f4d60d9f00d0f1e9dcaa10a7d
1 parent
2037bd4b
商品详情
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
apps/news/models/detail.js
apps/news/models/detail.js
View file @
b44cfec
...
...
@@ -10,7 +10,7 @@
// const helpers = global.yoho.helpers;
const
serviceAPI
=
global
.
yoho
.
ServiceAPI
;
const
URI_PACKAGE_ARTICLE
=
'guang/service/v2/article/'
;
const
co
=
require
(
'co
'
);
const
Prmoise
=
require
(
'bluebird
'
);
const
camelCase
=
global
.
yoho
.
camelCase
;
/**
...
...
@@ -18,7 +18,7 @@ const camelCase = global.yoho.camelCase;
*/
const
model
=
{
index
(
params
)
{
return
co
(
function
*
()
{
return
Prmoise
.
coroutine
(
function
*
()
{
const
article
=
yield
serviceAPI
.
get
(
URI_PACKAGE_ARTICLE
+
'getArticle'
,
params
);
const
content
=
yield
serviceAPI
.
get
(
URI_PACKAGE_ARTICLE
+
'getArticleContent'
,
params
);
const
brands
=
yield
serviceAPI
.
get
(
URI_PACKAGE_ARTICLE
+
'getBrand'
,
params
);
...
...
@@ -29,7 +29,7 @@ const model = {
},
params
));
return
camelCase
([
article
,
content
,
brands
,
other
]);
});
})
()
;
}
};
...
...
Please
register
or
login
to post a comment