Authored by 郭成尧

首页楼层标题

... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2016-06-01 14:37:03
* @Last Modified by: Targaryen
* @Last Modified time: 2016-06-03 17:30:01
* @Last Modified time: 2016-06-03 17:38:17
*/
'use strict';
... ... @@ -30,7 +30,7 @@ exports.getOutletsActivityOrigin = (params) => {
platform: params.platform || 1,
size: params.size || 0,
yh_channel: 1,
type: params.type || 2 // 0 没有数据,暂时用 3
type: params.type || 0
}));
};
... ...
... ... @@ -231,14 +231,16 @@ exports.handleOutletsBannersData = (origin, params) => {
/**
* 处理奥莱活动数据
* @param {[type]} origin [description]
* @param {[type]} params [description]
* @return {[type]} [description]
*/
exports.handleOutletsActivityData = (origin) => {
exports.handleOutletsActivityData = (origin, name) => {
let dest = {};
let nowTime = Math.round(new Date().getTime() / 1000);
dest.name = '限时嗨购'; // 需要根据 origin 传值修改
dest.name = name || '限时嗨购'; // 需要根据 name 传值修改
dest.topic = [];
// 处理奥莱活动列表数据
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2016-05-30 16:20:03
* @Last Modified by: Targaryen
* @Last Modified time: 2016-06-03 17:36:03
* @Last Modified time: 2016-06-03 18:04:43
*/
'use strict';
... ... @@ -37,8 +37,8 @@ exports.getOutletsIndexData = (params) => {
return api.all([
headerModel.requestHeaderData('outlets'),
outletsApi.getChannelResouceData({ content_code: channelCode.index }),
outletsApi.getOutletsActivityOrigin(Object.assign(params, { type: '1' })), // 获取限时嗨购列表
outletsApi.getOutletsActivityOrigin(Object.assign(params, { type: '2' })), // 获取即将结束列表
outletsApi.getOutletsActivityOrigin(params), // 获取限时活动列表
outletsApi.getOutletsActivityOrigin(params), // 获取即将结束列表
outletsApi.getOutletsTrendData(params), // 获取潮流速递商品数据
saleApi.getSaleGoodsList(params) // 获取底部商品数据
]).then(result => {
... ... @@ -53,12 +53,12 @@ exports.getOutletsIndexData = (params) => {
// 处理限时嗨购列表数据
if (result[2].code === 200) {
finalResult.limitedBuy = Object.assign(finalResult.limitedBuy,
outletsProcess.handleOutletsActivityData(result[2].data));
outletsProcess.handleOutletsActivityData(result[2].data, '限时嗨购'));
}
// 处理即将结束列表数据
if (result[3].code === 200) {
finalResult.nearOver = outletsProcess.handleOutletsActivityData(result[3].data);
finalResult.nearOver = outletsProcess.handleOutletsActivityData(result[3].data, '即将结束');
}
// 处理潮品推荐数据
... ... @@ -123,6 +123,7 @@ exports.getOutletsChannelData = (params) => {
if (result[3].code === 200) {
channelData.goodsBoard = {};
channelData.goodsBoard.list = productProcess.processProductList(result[3].data.product_list);
channelData.pager = publicHandler.handleSalePagerData(result[3].data.total, params);
}
}
... ...
... ... @@ -15,9 +15,7 @@
{{> outlets/near-over}}
{{> outlets/main-product}}
<div class="pager">
{{{pager}}}
</div>
</div>
</div>
{{/ result}}
\ No newline at end of file
... ...
... ... @@ -25,4 +25,7 @@
{{/ list}}
</div>
</div>
{{/ goodsBoard}}
\ No newline at end of file
{{/ goodsBoard}}
<div class="pager">
{{{pager}}}
</div>
\ No newline at end of file
... ...