Authored by 王水玲

sale

... ... @@ -30,7 +30,7 @@ app.locals.devEnv = app.get('env') === 'development';
app.locals.version = pkg.version;
// 指定libray目录
global.library = path.resolve('./library');
global.library = path.resolve('./library/');
app.set('view engine', '.hbs');
... ...
... ... @@ -4,11 +4,12 @@
* @date: 2016/05/09
*/
'use strict';
const library = '../../../library';
const _ = require('lodash');
const channelModel = require('../models/channel');
const helpers = require(`${global.library}/helpers`);
const log = require(`${global.library}/logger`);
const cookie = require(`${global.library}/cookie`);
const helpers = require(`${library}/helpers`);
const log = require(`${library}/logger`);
const cookie = require(`${library}/cookie`);
const renderData = {
module: 'channel',
... ...
... ... @@ -4,10 +4,11 @@
* @date: 2016/05/09
*/
'use strict';
const library = '../../../library';
const _ = require('lodash');
const ServiceAPI = require(`${global.library}/api`).ServiceAPI;
const sign = require(`${global.library}/sign`);
const camelCase = require(`${global.library}/camel-case`);
const ServiceAPI = require(`${library}/api`).ServiceAPI;
const sign = require(`${library}/sign`);
const camelCase = require(`${library}/camel-case`);
const api = new ServiceAPI();
... ...
... ... @@ -5,11 +5,11 @@
*/
'use strict';
const library = '../../../library';
const mRoot = '../models';
const cookie = require('../../../library/cookie');
const cookie = require(`${library}/cookie`);
const headerModel = require('../../../doraemon/models/header');
const log = require('../../../library/logger');
const log = require(`${library}/logger`);
const sale = require(`${mRoot}/sale`);
const saleLogger = (err, res) => {
... ...
... ... @@ -123,7 +123,7 @@ class Http {
timeout: 3000
};
console.log('in api : ' + config.useCache);
// console.log('in api : ' + config.useCache);
// 从缓存获取数据
if (config.useCache && cacheOption) {
... ...