Merge branch 'feature/sale' of git.dev.yoho.cn:web/yohobuywap-node into feature/sale
Showing
5 changed files
with
13 additions
and
11 deletions
@@ -30,7 +30,7 @@ app.locals.devEnv = app.get('env') === 'development'; | @@ -30,7 +30,7 @@ app.locals.devEnv = app.get('env') === 'development'; | ||
30 | app.locals.version = pkg.version; | 30 | app.locals.version = pkg.version; |
31 | 31 | ||
32 | // 指定libray目录 | 32 | // 指定libray目录 |
33 | -global.library = path.resolve('./library'); | 33 | +global.library = path.resolve('./library/'); |
34 | 34 | ||
35 | app.set('view engine', '.hbs'); | 35 | app.set('view engine', '.hbs'); |
36 | 36 |
@@ -4,11 +4,12 @@ | @@ -4,11 +4,12 @@ | ||
4 | * @date: 2016/05/09 | 4 | * @date: 2016/05/09 |
5 | */ | 5 | */ |
6 | 'use strict'; | 6 | 'use strict'; |
7 | +const library = '../../../library'; | ||
7 | const _ = require('lodash'); | 8 | const _ = require('lodash'); |
8 | const channelModel = require('../models/channel'); | 9 | const channelModel = require('../models/channel'); |
9 | -const helpers = require(`${global.library}/helpers`); | ||
10 | -const log = require(`${global.library}/logger`); | ||
11 | -const cookie = require(`${global.library}/cookie`); | 10 | +const helpers = require(`${library}/helpers`); |
11 | +const log = require(`${library}/logger`); | ||
12 | +const cookie = require(`${library}/cookie`); | ||
12 | 13 | ||
13 | const renderData = { | 14 | const renderData = { |
14 | module: 'channel', | 15 | module: 'channel', |
@@ -4,10 +4,11 @@ | @@ -4,10 +4,11 @@ | ||
4 | * @date: 2016/05/09 | 4 | * @date: 2016/05/09 |
5 | */ | 5 | */ |
6 | 'use strict'; | 6 | 'use strict'; |
7 | +const library = '../../../library'; | ||
7 | const _ = require('lodash'); | 8 | const _ = require('lodash'); |
8 | -const ServiceAPI = require(`${global.library}/api`).ServiceAPI; | ||
9 | -const sign = require(`${global.library}/sign`); | ||
10 | -const camelCase = require(`${global.library}/camel-case`); | 9 | +const ServiceAPI = require(`${library}/api`).ServiceAPI; |
10 | +const sign = require(`${library}/sign`); | ||
11 | +const camelCase = require(`${library}/camel-case`); | ||
11 | 12 | ||
12 | const api = new ServiceAPI(); | 13 | const api = new ServiceAPI(); |
13 | 14 |
@@ -5,11 +5,11 @@ | @@ -5,11 +5,11 @@ | ||
5 | */ | 5 | */ |
6 | 6 | ||
7 | 'use strict'; | 7 | 'use strict'; |
8 | - | 8 | +const library = '../../../library'; |
9 | const mRoot = '../models'; | 9 | const mRoot = '../models'; |
10 | -const cookie = require('../../../library/cookie'); | 10 | +const cookie = require(`${library}/cookie`); |
11 | const headerModel = require('../../../doraemon/models/header'); | 11 | const headerModel = require('../../../doraemon/models/header'); |
12 | -const log = require('../../../library/logger'); | 12 | +const log = require(`${library}/logger`); |
13 | const sale = require(`${mRoot}/sale`); | 13 | const sale = require(`${mRoot}/sale`); |
14 | 14 | ||
15 | const saleLogger = (err, res) => { | 15 | const saleLogger = (err, res) => { |
@@ -123,7 +123,7 @@ class Http { | @@ -123,7 +123,7 @@ class Http { | ||
123 | timeout: 3000 | 123 | timeout: 3000 |
124 | }; | 124 | }; |
125 | 125 | ||
126 | - console.log('in api : ' + config.useCache); | 126 | + // console.log('in api : ' + config.useCache); |
127 | 127 | ||
128 | // 从缓存获取数据 | 128 | // 从缓存获取数据 |
129 | if (config.useCache && cacheOption) { | 129 | if (config.useCache && cacheOption) { |
-
Please register or login to post a comment