Authored by runner

newsale filter-age

@@ -586,6 +586,13 @@ exports.handleSaleFilterData = (origin, params) => { @@ -586,6 +586,13 @@ exports.handleSaleFilterData = (origin, params) => {
586 handleCheckedData(params, dest.size, 'size')); 586 handleCheckedData(params, dest.size, 'size'));
587 } 587 }
588 588
  589 + // 年龄处理

  590 + dest.ageLevel = origin.ageLevel;
  591 + _.forEach(dest.ageLevel, item => {
  592 + item.href = handleFilterUrl(params, {age_level: item.id});
  593 + item.checked = params.age_level === item.id;
  594 + })
  595 +
589 // 清除所有选中数据 596 // 清除所有选中数据
590 let remainParams = {}; 597 let remainParams = {};
591 598
@@ -608,6 +615,10 @@ exports.handleSaleFilterData = (origin, params) => { @@ -608,6 +615,10 @@ exports.handleSaleFilterData = (origin, params) => {
608 dest.checkedConditions.conditions = _.union(dest.checkedConditions.conditions, 615 dest.checkedConditions.conditions = _.union(dest.checkedConditions.conditions,
609 handleCheckedData(params, dest.price, 'price')); 616 handleCheckedData(params, dest.price, 'price'));
610 617
  618 + // 处理价格筛选数据
  619 + dest.checkedConditions.conditions = _.union(dest.checkedConditions.conditions,
  620 + handleCheckedData(params, dest.ageLevel, 'age_level'));
  621 +
611 return dest; 622 return dest;
612 }; 623 };
613 624
@@ -49,6 +49,20 @@ @@ -49,6 +49,20 @@
49 </div> 49 </div>
50 {{/if}} 50 {{/if}}
51 51
  52 + {{#if ageLevel}}
  53 + <div class="channel section">
  54 + <span class="title">性别:</span>
  55 +
  56 + <div class="attr-content clearfix">
  57 + {{#each ageLevel}}
  58 + <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
  59 + {{name}}
  60 + </a>
  61 + {{/each}}
  62 + </div>
  63 + </div>
  64 + {{/if}}
  65 +
52 {{#if sort}} 66 {{#if sort}}
53 <div class="sort section"> 67 <div class="sort section">
54 <span class="title">分类:</span> 68 <span class="title">分类:</span>