Authored by Aiden Xu

商品详情

... ... @@ -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]);
});
})();
}
};
... ...