...
|
...
|
@@ -7,6 +7,7 @@ |
|
|
'use strict';
|
|
|
const mRoot = '../models';
|
|
|
const outlets = require(`${mRoot}/outlets`);
|
|
|
const log = require(`${global.library}/logger`);
|
|
|
|
|
|
/**
|
|
|
* outlets 首页
|
...
|
...
|
@@ -27,7 +28,8 @@ exports.index = (req, res) => { |
|
|
resData.headerData = result.headerData;
|
|
|
resData.resultShow = JSON.stringify(result, null, 4);
|
|
|
res.render('outlets/index', resData);
|
|
|
}).catch(() => {
|
|
|
}).catch((e) => {
|
|
|
log.error(e);
|
|
|
resData.pageErr = true;
|
|
|
res.render('error', resData);
|
|
|
});
|
...
|
...
|
@@ -48,7 +50,8 @@ exports.channel = (req, res) => { |
|
|
|
|
|
outlets.getOutletsChannelData(req.query, req.params.channel).then(result => {
|
|
|
res.render('outlets/channel', Object.assign(resData, result));
|
|
|
}).catch(() => {
|
|
|
}).catch((e) => {
|
|
|
log.error(e);
|
|
|
resData.pageErr = true;
|
|
|
res.render('error', resData);
|
|
|
});
|
...
|
...
|
@@ -74,7 +77,8 @@ exports.special = (req, res) => { |
|
|
|
|
|
outlets.getOutletsSpecialData(params, channel).then(result => {
|
|
|
res.render('outlets/special', Object.assign(resData, result));
|
|
|
}).catch(() => {
|
|
|
}).catch((e) => {
|
|
|
log.error(e);
|
|
|
resData.pageErr = true;
|
|
|
res.render('error', resData);
|
|
|
});
|
...
|
...
|
@@ -101,7 +105,8 @@ exports.list = (req, res) => { |
|
|
outlets.getOutletsCategoryData(params, channel).then((result) => {
|
|
|
responseData.resultShow = JSON.stringify(result, null, 4);
|
|
|
res.render('sale/other', Object.assign(responseData, result));
|
|
|
}).catch(() => {
|
|
|
}).catch((e) => {
|
|
|
log.error(e);
|
|
|
responseData.pageErr = true;
|
|
|
res.render('error', responseData);
|
|
|
});
|
...
|
...
|
|