Authored by 郭成尧

Merge branch 'feature/sale' of git.yoho.cn:fe/yohobuy-node into feature/sale

 the commit.
@@ -10,6 +10,7 @@ const library = '../../../library'; @@ -10,6 +10,7 @@ const library = '../../../library';
10 const utils = '../../../utils'; 10 const utils = '../../../utils';
11 const API = require(`${library}/api`).API; 11 const API = require(`${library}/api`).API;
12 const api = new API(); 12 const api = new API();
  13 +const list = require('./list');
13 const saleApi = require('./sale-api'); 14 const saleApi = require('./sale-api');
14 const outletsProcess = require('./outlets-handler'); 15 const outletsProcess = require('./outlets-handler');
15 const outletsApi = require('./outlets-api'); 16 const outletsApi = require('./outlets-api');
@@ -130,7 +131,7 @@ exports.getOutletsChannelData = (params) => { @@ -130,7 +131,7 @@ exports.getOutletsChannelData = (params) => {
130 * @return {[type]} 131 * @return {[type]}
131 */ 132 */
132 exports.getOutletsSpecialData = (params) => { 133 exports.getOutletsSpecialData = (params) => {
133 - return Promise.all([ 134 + return api.all([
134 headerModel.requestHeaderData('outlets'), 135 headerModel.requestHeaderData('outlets'),
135 outletsApi.getOutletsActivityOrigin({ 136 outletsApi.getOutletsActivityOrigin({
136 id: params.id 137 id: params.id
@@ -143,6 +144,17 @@ exports.getOutletsSpecialData = (params) => { @@ -143,6 +144,17 @@ exports.getOutletsSpecialData = (params) => {
143 delete specialData.pageErr; 144 delete specialData.pageErr;
144 Object.assign(specialData, 145 Object.assign(specialData,
145 outletsProcess.handleOutletsSpecilData(result[1].data[0])); 146 outletsProcess.handleOutletsSpecilData(result[1].data[0]));
  147 +
  148 + return api.all([
  149 + list.getSaleOthersData({
  150 + productPool: result[1].data[0].productPoolId,
  151 + saleType: 4
  152 + })
  153 + ]).then(data => {
  154 + specialData.specialHead.count = data[0].totalCount;
  155 + Object.assign(specialData, data[0]);
  156 + return specialData;
  157 + });
146 } 158 }
147 159
148 return specialData; 160 return specialData;
1 {{!-- <pre>{{resultShow}}</pre> --}} 1 {{!-- <pre>{{resultShow}}</pre> --}}
2 {{# result}} 2 {{# result}}
3 -<div class="outlets-page yoho-page"> 3 +<div class="outlets-page product-page yoho-page">
4 {{> common/main-banner}} 4 {{> common/main-banner}}
5 <div class="center-content"> 5 <div class="center-content">
6 <ul class="column-img-tab"> 6 <ul class="column-img-tab">
1 -<div class="outlets-special-page outlets-page yoho-page"> 1 +<pre>{{resultShow}}</pre>
  2 +<div class="outlets-special-page product-page yoho-page">
2 {{> common/main-banner}} 3 {{> common/main-banner}}
3 <div class="center-content clearfix"> 4 <div class="center-content clearfix">
4 {{> common/special-head}} 5 {{> common/special-head}}
@@ -14,6 +14,7 @@ var limitTime = []; @@ -14,6 +14,7 @@ var limitTime = [];
14 // require('../common'); 14 // require('../common');
15 // require('../outlets/channel'); 15 // require('../outlets/channel');
16 require('../common/slider'); 16 require('../common/slider');
  17 +require('./outlets/special');
17 18
18 lazyLoad($('img.lazy')); 19 lazyLoad($('img.lazy'));
19 20
  1 +/**
  2 + * 活动专题页
  3 + * @author: yyq<yanqing.yang@yoho.cn>
  4 + * @date: 2016/06/3
  5 + */
  6 +
  7 +// var $ = require('yoho-jquery');
  8 +
  9 +require('../product');
  10 +require('../../common/filter');
  11 +require('../../common/sort-pager');