Authored by yyq

fix filter

{{# checkedConditions}}
{{#if checkedConditions}}
<div class="filter-box">
{{#if conditions}}
<div class="checked-conditions section">
<span class="title">已选条件:</span>
{{# checkedConditions}}
{{#if conditions}}
<div class="checked-conditions section">
<span class="title">已选条件:</span>
<div class="attr-content clearfix">
{{#each conditions}}
<a class="tag" href="{{href}}" name="{{name}}" itemType="{{itemType}}"
{{#if totalName}} totalName="{{totalName}}" {{/if}}>
{{#if color}}
<i class="color-block" style="background: {{color}}"></i>
{{^}}
{{name}}
{{/if}}
<i class="close iconfont">&#xe60d;</i>
</a>
{{/each}}
<a class="clear-checked" href="{{clearUrl}}">清空筛选条件</a>
</div>
</div>
{{/if}}
{{/ checkedConditions}}
{{#if channel}}
<div class="channel section">
<span class="title">频道:</span>
<div class="attr-content clearfix">
{{#each conditions}}
<a class="tag" href="{{href}}" name="{{name}}" itemType="{{itemType}}"
{{#if totalName}} totalName="{{totalName}}" {{/if}}>
{{#if color}}
<i class="color-block" style="background: {{color}}"></i>
{{^}}
{{name}}
{{/if}}
<i class="close iconfont">&#xe60d;</i>
{{#each channel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">
{{name}}
</a>
{{/each}}
<a class="clear-checked" href="{{clearUrl}}">清空筛选条件</a>
</div>
</div>
{{/if}}
{{/ checkedConditions}}
{{#if channel}}
<div class="channel section">
<span class="title">频道:</span>
{{#if gender}}
<div class="channel section">
<span class="title">性别:</span>
<div class="attr-content clearfix">
{{#each channel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">
{{name}}
</a>
{{/each}}
<div class="attr-content clearfix">
{{#each gender}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">
{{name}}
</a>
{{/each}}
</div>
</div>
</div>
{{/if}}
{{#if gender}}
<div class="channel section">
<span class="title">性别:</span>
{{/if}}
<div class="attr-content clearfix">
{{#each gender}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">
{{name}}
</a>
{{/each}}
{{#if sort}}
<div class="sort section">
<span class="title">分类:</span>
<div class="attr-content">
<ul class="sort-pre clearfix">
{{#each sort}}
<li data-id="{{id}}">
<span class="attr {{#if checked}}checked{{/if}}" name="{{name}}">
{{name}}
<div class="sort-up-icon"></div>
</span>
</li>
{{/each}}
</ul>
<div class="sort-sub-wrap">
{{#each sort}}
<ul class="sort-sub clearfix hide">
{{#each sub}}
<li class="attr {{#if checked}}checked{{/if}}" name="{{name}}">
<a href="{{href}}">{{name}}</a>
</li>
{{/each}}
</ul>
{{/each}}
</div>
</div>
</div>
</div>
{{/if}}
{{#if sort}}
<div class="sort section">
<span class="title">分类:</span>
<div class="attr-content">
<ul class="sort-pre clearfix">
{{#each sort}}
<li data-id="{{id}}">
<span class="attr {{#if checked}}checked{{/if}}" name="{{name}}">
{{name}}
<div class="sort-up-icon"></div>
</span>
</li>
{{/each}}
</ul>
<div class="sort-sub-wrap">
{{#each sort}}
<ul class="sort-sub clearfix hide">
{{#each sub}}
<li class="attr {{#if checked}}checked{{/if}}" name="{{name}}">
<a href="{{href}}">{{name}}</a>
</li>
{{/each}}
</ul>
{{/if}}
{{! 小分类}}
{{#if misort}}
<div class="misort section">
<span class="title">品类:</span>
<div class="attr-content clearfix">
{{#each misort}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">
{{name}}
</a>
{{/each}}
</div>
</div>
</div>
{{/if}}
{{/if}}
{{! 小分类}}
{{#if misort}}
<div class="misort section">
<span class="title">品类:</span>
{{# brand}}
<div class="brand section" id="yo-filter-brands">
<span class="title">品牌:</span>
<div class="attr-content">
<ul class="default clearfix">
{{# default}}
<li class="attr {{#if checked}}checked{{/if}}">
<a href="{{href}}" title="{{name}}">{{name}}</a>
</li>
{{/ default}}
</ul>
<div class="brand-opt">
{{#if showMore}}
<span id="brand-more" class="brand-more">
<em>更多</em>
<i class="iconfont">&#xe60b;</i>
</span>
{{/if}}
<div class="attr-content clearfix">
{{#each misort}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">
{{name}}
</a>
{{/each}}
</div>
</div>
{{/if}}
{{# brand}}
<div class="brand section" id="yo-filter-brands">
<span class="title">品牌:</span>
<div class="attr-content">
<ul class="default clearfix">
{{# default}}
<li class="attr {{#if checked}}checked{{/if}}">
<a href="{{href}}" title="{{name}}">{{name}}</a>
</li>
{{/ default}}
</ul>
<div class="brand-opt">
{{#if showMore}}
<span id="brand-more" class="brand-more">
<em>更多</em>
<i class="iconfont">&#xe60b;</i>
</span>
{{/if}}
{{#if showMulti}}
<span id="brand-multi" class="multi-select">多选 +</span>
{{/if}}
</div>
<div data-role="all-brand">
{{#if showAllBrands}}
{{> product/filter-brands-sync}}
{{/if}}
{{#if showMulti}}
<span id="brand-multi" class="multi-select">多选 +</span>
{{/if}}
</div>
<div data-role="all-brand">
{{#if showAllBrands}}
{{> product/filter-brands-sync}}
{{/if}}
</div>
</div>
</div>
</div>
{{/ brand}}
{{/ brand}}
<script id="yo-brands-tpl" type="text/x-handlebars">
{{> product/filter-brands}}
</script>
<script id="yo-brands-tpl" type="text/x-handlebars">
{{> product/filter-brands}}
</script>
{{#if ageLevel}}
<div class="people section">
<span class="title">人群:</span>
{{#if ageLevel}}
<div class="people section">
<span class="title">人群:</span>
<div class="attr-content clearfix">
{{#each ageLevel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">
{{name}}
</a>
{{/each}}
<div class="attr-content clearfix">
{{#each ageLevel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">
{{name}}
</a>
{{/each}}
</div>
</div>
</div>
{{/if}}
{{#if price}}
<div class="price section">
<span class="title">价格:</span>
<div class="attr-content clearfix">
{{# price}}
<a class="attr{{#if checked}} checked{{/if}}" href="{{href}}" name="{{name}}">{{name}}</a>
{{/ price}}
{{/if}}
<div class="ud-price-range">
¥
<input type="text" class="min limit" value="{{customPrice.min}}">
<span class="price-sep">-</span>
<input type="text" class="max limit" value="{{customPrice.max}}">
{{#if price}}
<div class="price section">
<span class="title">价格:</span>
<button class="price-sure hide">确定</button>
<div class="attr-content clearfix">
{{# price}}
<a class="attr{{#if checked}} checked{{/if}}" href="{{href}}" name="{{name}}">{{name}}</a>
{{/ price}}
<div class="ud-price-range">
¥
<input type="text" class="min limit" value="{{customPrice.min}}">
<span class="price-sep">-</span>
<input type="text" class="max limit" value="{{customPrice.max}}">
<button class="price-sure hide">确定</button>
</div>
</div>
</div>
</div>
{{/if}}
{{/if}}
{{#if discount}}
<div class="discount section">
<span class="title">折扣:</span>
{{#if discount}}
<div class="discount section">
<span class="title">折扣:</span>
<div class="attr-content clearfix">
{{# discount}}
<a class="attr{{#if checked}} checked{{/if}}" href="{{href}}" name="{{name}}">¥{{name}}</a>
{{/ discount}}
<div class="attr-content clearfix">
{{# discount}}
<a class="attr{{#if checked}} checked{{/if}}" href="{{href}}" name="{{name}}">¥{{name}}</a>
{{/ discount}}
</div>
</div>
</div>
{{/if}}
{{/if}}
{{#if color}}
<div class="color section">
<span class="title">颜色:</span>
{{#if color}}
<div class="color section">
<span class="title">颜色:</span>
<div class="attr-content clearfix">
{{# color}}
<a class="attr{{#if checked}} checked{{/if}}" href="{{href}}" name="{{name}}">
{{#if checked}}
<span class="color-block">
<i class="sub-color-block" style="background: {{rgb}}"></i>
</span>
{{^}}
<i class="color-block" style="background: {{rgb}}"></i>
{{/if}}
{{name}}
</a>
{{/ color}}
<div class="attr-content clearfix">
{{# color}}
<a class="attr{{#if checked}} checked{{/if}}" href="{{href}}" name="{{name}}">
{{#if checked}}
<span class="color-block">
<i class="sub-color-block" style="background: {{rgb}}"></i>
</span>
{{^}}
<i class="color-block" style="background: {{rgb}}"></i>
{{/if}}
{{name}}
</a>
{{/ color}}
</div>
</div>
</div>
{{/if}}
{{/if}}
<div class="size section {{#unless size}}hide{{/unless}}" {{#if size}}data-load="true"{{/if}}>
<span class="title">尺码:</span>
<div class="size section {{#unless size}}hide{{/unless}}" {{#if size}}data-load="true"{{/if}}>
<span class="title">尺码:</span>
<div class="attr-content clearfix">
{{# size}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">{{name}}</a>
{{/ size}}
<div class="attr-content clearfix">
{{# size}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}" name="{{name}}">{{name}}</a>
{{/ size}}
</div>
</div>
</div>
{{#if seniorChose}}
<div class="senior section">
<span class="title">高级选项:</span>
<div class="attr-content">
<ul class="clearfix senior-attr-wrap">
{{#each seniorChose}}
<li class="attr{{#unless sub}} no-sub{{/unless}}">
{{#if seniorChose}}
<div class="senior section">
<span class="title">高级选项:</span>
<div class="attr-content">
<ul class="clearfix senior-attr-wrap">
{{#each seniorChose}}
<li class="attr{{#unless sub}} no-sub{{/unless}}">
{{#if sub}}
{{name}}
<span class="iconfont">&#xe60b;</span>
<div class="senior-up-icon"></div>
{{^}}
<a href="{{url}}">{{name}}</a>
{{/if}}
</li>
{{/each}}
</ul>
<div class="senior-sub-wrap">
{{#each seniorChose}}
{{#if sub}}
{{name}}
<span class="iconfont">&#xe60b;</span>
<div class="senior-up-icon"></div>
{{^}}
<a href="{{url}}">{{name}}</a>
{{/if}}
</li>
{{/each}}
</ul>
<div class="senior-sub-wrap">
{{#each seniorChose}}
{{#if sub}}
<div class="senior-sub hide" data-attr="{{attr}}">
<div class="senior-baffle"></div>
<div class="senior-content">
{{#if showMulti}}
<span class="multi-select">多选 +</span>
{{/if}}
<ul class="clearfix check-container">
{{#each sub}}
<li class="attr {{#if checked}}checked{{/if}}">
<a href="{{href}}">
{{#if checked}}
<span class="iconfont checkbox checked" data-id="{{id}}">&#xe613;</span>
{{^}}
<span class="iconfont checkbox" data-id="{{id}}">&#xe612;</span>
{{/if}}
<span>{{name}}</span>
</a>
</li>
{{/each}}
</ul>
<div class="btns">
<button class="multi-select-ok dis">确定</button>
<button class="multi-select-cancel">取消</button>
<div class="senior-sub hide" data-attr="{{attr}}">
<div class="senior-baffle"></div>
<div class="senior-content">
{{#if showMulti}}
<span class="multi-select">多选 +</span>
{{/if}}
<ul class="clearfix check-container">
{{#each sub}}
<li class="attr {{#if checked}}checked{{/if}}">
<a href="{{href}}">
{{#if checked}}
<span class="iconfont checkbox checked" data-id="{{id}}">&#xe613;</span>
{{^}}
<span class="iconfont checkbox" data-id="{{id}}">&#xe612;</span>
{{/if}}
<span>{{name}}</span>
</a>
</li>
{{/each}}
</ul>
<div class="btns">
<button class="multi-select-ok dis">确定</button>
<button class="multi-select-cancel">取消</button>
</div>
</div>
</div>
</div>
{{/if}}
{{/each}}
{{/if}}
{{/each}}
</div>
</div>
</div>
</div>
{{/if}}
</div>
{{/if}}
... ...