...
|
...
|
@@ -71,6 +71,7 @@ let searchView = function() { |
|
|
* see: search-process.js
|
|
|
*/
|
|
|
let searchParams = {
|
|
|
order: 's_t_desc',
|
|
|
filter: {
|
|
|
},
|
|
|
page: {
|
...
|
...
|
@@ -266,21 +267,21 @@ let searchView = function() { |
|
|
let $curNav = $(event.currentTarget);
|
|
|
|
|
|
// 处理新添加的默认,最新排序
|
|
|
if ($curNav.hasClass('first-li-more')) {
|
|
|
filter.hideFilter();
|
|
|
|
|
|
if ($newList.hasClass('hide')) {
|
|
|
$curNav.find('.up').removeClass('hide');
|
|
|
$curNav.find('.down').addClass('hide');
|
|
|
$newList.removeClass('hide');
|
|
|
} else {
|
|
|
$curNav.find('.up').addClass('hide');
|
|
|
$curNav.find('.down').removeClass('hide');
|
|
|
$newList.addClass('hide');
|
|
|
}
|
|
|
switchNav($curNav);
|
|
|
return;
|
|
|
}
|
|
|
// if ($curNav.hasClass('first-li-more')) {
|
|
|
// filter.hideFilter();
|
|
|
|
|
|
// if ($newList.hasClass('hide')) {
|
|
|
// $curNav.find('.up').removeClass('hide');
|
|
|
// $curNav.find('.down').addClass('hide');
|
|
|
// $newList.removeClass('hide');
|
|
|
// } else {
|
|
|
// $curNav.find('.up').addClass('hide');
|
|
|
// $curNav.find('.down').removeClass('hide');
|
|
|
// $newList.addClass('hide');
|
|
|
// }
|
|
|
// switchNav($curNav);
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
$newList.addClass('hide');
|
|
|
|
...
|
...
|
@@ -298,34 +299,34 @@ let searchView = function() { |
|
|
});
|
|
|
|
|
|
// 单独处理默认、最新排序条件
|
|
|
$newList.on('click', 'li', function(event) {
|
|
|
let $defaultCurNav = $(event.currentTarget);
|
|
|
let $firstMore = $('.first-li-more');
|
|
|
|
|
|
$newList.addClass('hide');
|
|
|
$firstMore.find('.up').addClass('hide');
|
|
|
$firstMore.find('.down').removeClass('hide');
|
|
|
|
|
|
if ($defaultCurNav.hasClass('new')) {
|
|
|
$firstMore.attr('data-order', 's_t_desc').find('.span-test').text('最新');
|
|
|
$defaultCurNav.addClass('active');
|
|
|
$newList.find('.default').removeClass('active');
|
|
|
} else {
|
|
|
$firstMore.attr('data-order', '').find('.span-test').text('默认');
|
|
|
$defaultCurNav.addClass('active');
|
|
|
$newList.find('.new').removeClass('active');
|
|
|
}
|
|
|
|
|
|
checkOrderChange($firstMore, function() {
|
|
|
fetchNew({ // eslint-disable-line
|
|
|
$box: $goodBox,
|
|
|
before: $box => {
|
|
|
fetchXhr.abort();
|
|
|
$box.html('');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
// $newList.on('click', 'li', function(event) {
|
|
|
// let $defaultCurNav = $(event.currentTarget);
|
|
|
// let $firstMore = $('.first-li-more');
|
|
|
|
|
|
// $newList.addClass('hide');
|
|
|
// $firstMore.find('.up').addClass('hide');
|
|
|
// $firstMore.find('.down').removeClass('hide');
|
|
|
|
|
|
// if ($defaultCurNav.hasClass('new')) {
|
|
|
// $firstMore.attr('data-order', 's_t_desc').find('.span-test').text('最新');
|
|
|
// $defaultCurNav.addClass('active');
|
|
|
// $newList.find('.default').removeClass('active');
|
|
|
// } else {
|
|
|
// $firstMore.attr('data-order', '').find('.span-test').text('默认');
|
|
|
// $defaultCurNav.addClass('active');
|
|
|
// $newList.find('.new').removeClass('active');
|
|
|
// }
|
|
|
|
|
|
// checkOrderChange($firstMore, function() {
|
|
|
// fetchNew({ // eslint-disable-line
|
|
|
// $box: $goodBox,
|
|
|
// before: $box => {
|
|
|
// fetchXhr.abort();
|
|
|
// $box.html('');
|
|
|
// }
|
|
|
// });
|
|
|
// });
|
|
|
// });
|
|
|
|
|
|
});
|
|
|
|
...
|
...
|
|