Authored by yyq

outlets channel

... ... @@ -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);
});
... ...
... ... @@ -129,7 +129,6 @@ exports.getOutletsChannelData = (params, channel) => {
if (result[1].code === 200) {
Object.assign(channelData, outletsProcess.processFloor(result[1].data.list, params));
}
// 限时嗨购
if (result[2].code === 200) {
channelData.nearOver = outletsProcess.handleOutletsActivityData(result[2].data, '限时嗨购');
... ... @@ -137,6 +136,9 @@ exports.getOutletsChannelData = (params, channel) => {
// 商品列表
if (result[3].code === 200) {
if (!channelData.goodsBoard) {
channelData.goodsBoard = {};
}
channelData.goodsBoard.sort = publicHandler.handleSaleOptsData(params, result[3].data.total);
channelData.goodsBoard.sort.newPage = true;
channelData.goodsBoard.list = productProcess.processProductList(result[3].data.product_list);
... ...
<div class="outlets-channel-page yoho-page" data-page="girls">
<div class="outlets-channel-page outlets-page center-content yoho-page" data-page="girls">
<div class="slide-container clearfix">
<div class="center-col col">
<ul class="slide-wrapper">
... ...