Merge branch 'qCloud' of http://git.yoho.cn/fe/yohobuywap-node into qCloud
Showing
4 changed files
with
4 additions
and
7 deletions
@@ -47,6 +47,8 @@ app.use(global.yoho.hbs({ | @@ -47,6 +47,8 @@ app.use(global.yoho.hbs({ | ||
47 | helpers: global.yoho.helpers | 47 | helpers: global.yoho.helpers |
48 | })); | 48 | })); |
49 | 49 | ||
50 | +app.use(global.yoho.middleware()); | ||
51 | + | ||
50 | app.use(favicon(path.join(__dirname, '/public/favicon.ico'))); | 52 | app.use(favicon(path.join(__dirname, '/public/favicon.ico'))); |
51 | app.use(express.static(path.join(__dirname, 'public'))); | 53 | app.use(express.static(path.join(__dirname, 'public'))); |
52 | app.use(bodyParser.json()); | 54 | app.use(bodyParser.json()); |
@@ -249,7 +249,7 @@ const _getContent = (data, params, isApp, appVersion) => { | @@ -249,7 +249,7 @@ const _getContent = (data, params, isApp, appVersion) => { | ||
249 | } | 249 | } |
250 | 250 | ||
251 | // tar note 处理楼层标题 | 251 | // tar note 处理楼层标题 |
252 | - if (fun === 'getCoupon' && _.has(data[i - 1], 'template_name') && data[i - 1].template_name === 'text') { | 252 | + if (fun === 'getCoupon' && data[i].data.length && _.has(data[i - 1], 'template_name') && data[i - 1].template_name === 'text') { |
253 | data[i].data[0].floorTitle = data[i - 1].data; | 253 | data[i].data[0].floorTitle = data[i - 1].data; |
254 | } | 254 | } |
255 | build = processFun[fun](data[i].data, isApp); | 255 | build = processFun[fun](data[i].data, isApp); |
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | const api = global.yoho.API; | 3 | const api = global.yoho.API; |
4 | -const logger = global.yoho.logger; | ||
5 | const utils = '../../../utils'; | 4 | const utils = '../../../utils'; |
6 | const productProcess = require(`${utils}/product-process`); | 5 | const productProcess = require(`${utils}/product-process`); |
7 | 6 | ||
@@ -29,8 +28,6 @@ const mayLike = (uid, page, limit, gender, udid, recPos, channel) => { | @@ -29,8 +28,6 @@ const mayLike = (uid, page, limit, gender, udid, recPos, channel) => { | ||
29 | } | 28 | } |
30 | } | 29 | } |
31 | 30 | ||
32 | - } else { | ||
33 | - logger.error('mayLike cood 不是 200'); | ||
34 | } | 31 | } |
35 | }); | 32 | }); |
36 | }; | 33 | }; |
@@ -54,8 +51,6 @@ const mayLikeKids = (page, limit, channel) => { | @@ -54,8 +51,6 @@ const mayLikeKids = (page, limit, channel) => { | ||
54 | return productProcess.processProductList(result.data.product_list); | 51 | return productProcess.processProductList(result.data.product_list); |
55 | 52 | ||
56 | } | 53 | } |
57 | - } else { | ||
58 | - logger.error('mayLikeKids cood 不是 200'); | ||
59 | } | 54 | } |
60 | }); | 55 | }); |
61 | }; | 56 | }; |
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | "request-promise": "^3.0.0", | 38 | "request-promise": "^3.0.0", |
39 | "serve-favicon": "^2.3.0", | 39 | "serve-favicon": "^2.3.0", |
40 | "uuid": "^2.0.3", | 40 | "uuid": "^2.0.3", |
41 | - "yoho-node-lib": "0.1.13" | 41 | + "yoho-node-lib": "0.1.18" |
42 | }, | 42 | }, |
43 | "devDependencies": { | 43 | "devDependencies": { |
44 | "autoprefixer": "^6.3.7", | 44 | "autoprefixer": "^6.3.7", |
-
Please register or login to post a comment