Authored by 张丽霞

Merge branch 'release/4.4' of git.dev.yoho.cn:web/yohobuywap into release/4.4

... ... @@ -8491,7 +8491,8 @@ var $subNav = $('.home-sub-nav'),
$dgc = $($goodsChildren.get(2)),
shopId = $('input[name="shop_id"]').val(),
appVersion = $('input[name="app_version"]').val(),
brand = $('input[name="brand"]').val();
brand = $('input[name="brand"]').val(),
favId = $('input[name="favId"]').val();
var winH = $(window).height(),
noResult = '<p class="no-result">未找到相关搜索结果</p>';
... ... @@ -8604,13 +8605,13 @@ function getPageGoods(info) {
}
function getParam(req) {
if (shopId) {
req.data.shop_id = shopId;
}
if (brand) {
req.data.brand = brand;
}
if (shopId) {
req.data.shop_id = shopId;
}
}
function newData(callback) {
... ... @@ -8852,49 +8853,51 @@ function search(opt) {
}
}
switch (opt.type) {
case 'shop_id':
ext = {
shop_id: opt.id
};
break;
case 'gender':
ext = {
gender: opt.id
};
break;
case 'brand':
ext = {
brand: opt.id
};
break;
case 'sort':
ext = {
sort: opt.id
};
break;
case 'color':
ext = {
color: opt.id
};
break;
case 'size':
ext = {
size: opt.id
};
break;
case 'price':
ext = {
price: opt.id
};
break;
case 'discount':
ext = {
discount: opt.id
};
break;
if (opt.id) {
switch (opt.type) {
case 'shop_id':
ext = {
shop_id: opt.id
};
break;
case 'gender':
ext = {
gender: opt.id
};
break;
case 'brand':
ext = {
brand: opt.id
};
break;
case 'sort':
ext = {
sort: opt.id
};
break;
case 'color':
ext = {
color: opt.id
};
break;
case 'size':
ext = {
size: opt.id
};
break;
case 'price':
ext = {
price: opt.id
};
break;
case 'discount':
ext = {
discount: opt.id
};
break;
}
$.extend(defaultOpt, ext); //扩展筛选项
}
$.extend(defaultOpt, ext); //扩展筛选项
}
//导航类别
... ... @@ -8924,7 +8927,6 @@ function search(opt) {
if (brand) {
setting.brand = brand;
}
if (shopId) {
setting.shop_id = shopId;
}
... ... @@ -8996,7 +8998,7 @@ $.ajax({
type: 'GET',
url: '/search/filter',
data: {
shop_id: shopId,
shop_id: brand ? '' : shopId,
brand: brand
},
success: function(data) {
... ... @@ -9279,7 +9281,7 @@ function collectShop() {
qew.url = '/product/index/shopFav';
qew.data = {
shop_id: shopId,
shop_id: favId ? favId : shopId,
app_version: appVersion
};
postCollect(qew);
... ... @@ -9290,7 +9292,7 @@ function cancelShop() {
qew.url = '/product/index/cancelShopFav';
qew.data = {
shop_id: shopId,
shop_id: favId ? favId : shopId,
app_version: appVersion
};
postCollect(qew);
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.