Authored by Aiden Xu

商品详情

@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 // const helpers = global.yoho.helpers; 10 // const helpers = global.yoho.helpers;
11 const serviceAPI = global.yoho.ServiceAPI; 11 const serviceAPI = global.yoho.ServiceAPI;
12 const URI_PACKAGE_ARTICLE = 'guang/service/v2/article/'; 12 const URI_PACKAGE_ARTICLE = 'guang/service/v2/article/';
13 -const co = require('co'); 13 +const Prmoise = require('bluebird');
14 const camelCase = global.yoho.camelCase; 14 const camelCase = global.yoho.camelCase;
15 15
16 /** 16 /**
@@ -18,7 +18,7 @@ const camelCase = global.yoho.camelCase; @@ -18,7 +18,7 @@ const camelCase = global.yoho.camelCase;
18 */ 18 */
19 const model = { 19 const model = {
20 index(params) { 20 index(params) {
21 - return co(function*() { 21 + return Prmoise.coroutine(function*() {
22 const article = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticle', params); 22 const article = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticle', params);
23 const content = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticleContent', params); 23 const content = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getArticleContent', params);
24 const brands = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getBrand', params); 24 const brands = yield serviceAPI.get(URI_PACKAGE_ARTICLE + 'getBrand', params);
@@ -29,7 +29,7 @@ const model = { @@ -29,7 +29,7 @@ const model = {
29 }, params)); 29 }, params));
30 30
31 return camelCase([article, content, brands, other]); 31 return camelCase([article, content, brands, other]);
32 - }); 32 + })();
33 } 33 }
34 }; 34 };
35 35