Authored by ccbikai(👎🏻🍜)

Merge branch 'release/newSearch'

... ... @@ -748,14 +748,28 @@ const getShopCategory = (params) => {
_.forEach(value.sub, (subValue, subKey) => {
value.sub[subKey].url = helpers.urlFormat('/product/search/list', {
shop_id: params.shopId,
sort: _.get(value, 'relation_parameter.sort', ''),
sort: _.get(subValue, 'relation_parameter.sort', ''),
title: subValue.category_name,
query: subValue.category_name
});
});
let subCategory = [
{
category_name: '全部' + value.category_name,
url: helpers.urlFormat('/product/search/list', {
shop_id: params.shopId,
sort: _.get(value, 'relation_parameter.sort', ''),
title: '全部' + value.category_name,
query: value.category_name
})
}
];
subCategory = subCategory.concat(value.sub);
finalResult.category.push({
subcategory: value.sub
subcategory: subCategory
});
});
... ...
... ... @@ -58,6 +58,12 @@ $categoryContainer.on('touchend', function(e) {
$cur, index;
$cur = $this.closest('.p-level-item');
// 第一次单击右则空白处,出现冒泡
if ($(e.target).closest('.sub-level').length <= 0) {
e.preventDefault();
}
if ($cur.length > 0) {
index = $cur.index();
$subLevel = $this.closest('.content').find('.sub-level');
... ...
... ... @@ -135,7 +135,8 @@ function initFilter(opt) {
var $this = $(e.target),
$cur;
// e.preventDefault();//防止透点
//这行不能注释,iphone下会出现穿透
e.preventDefault();//防止透点
if ($this.closest('.filter-body').length > 0) {
$cur = $this.closest('.sub-item');
... ...
... ... @@ -34,6 +34,11 @@ $categoryContainer.on('touchend', function(e) {
$cur = $this.closest('.p-level-item');
// 第一次单击右则空白处,出现冒泡
if ($(e.target).closest('.sub-level').length <= 0) {
e.preventDefault();
}
$subLevelContainer = $this.closest('.content').find('.sub-level-container');
$subLevelContainer.removeClass('hide');
... ...