Authored by ccbikai

断码区 支持自定义入口

... ... @@ -9,7 +9,7 @@
<ul id="list-nav" class="list-nav clearfix">
{{# sortData}}
<li {{#if @first}} class="active" {{/if}} data-id="{{sortId}}" data-allSub="{{allSub}}">
<li data-id="{{sortId}}" data-allSub="{{allSub}}">
<a href="javascript:void(0);">
<span class="span-test">{{sortName}}</span>
</a>
... ...
... ... @@ -515,13 +515,25 @@ $(window).scroll(function() {
});
// 初始请求最新第一页数据
search([{
$(function() {
var type = window.queryString.type;
var selector;
// type 1: 上装, 3:下装, 6: 鞋装
if (type && type !== '1') {
selector = type === '3' ? '.trouser' : '.shoes';
} else {
selector = '.coat';
}
$('#list-nav').find(selector).addClass('active').siblings().removeClass('active');
search([{
type: 'breakSort',
id: $('.coat').data('id')
}, {
id: $(selector).data('id')
}, {
type: 'breakSize',
id: $('.coat').data('allsub')
}]);
id: $(selector).data('allsub')
}]);
});
$listNav.on('touchstart', 'li', function() {
$(this).addClass('bytouch');
... ...