Authored by 毕凯

Merge branch 'hotfix/category' into 'gray'

Hotfix/category



See merge request !1322
... ... @@ -45,7 +45,8 @@ module.exports = class extends global.yoho.BaseModel {
sales: 'Y',
outlets: 2,
stocknumber: 1,
need_filter: 'no'
need_filter: 'no',
from: 'fuzzySearch'
};
finalParams = _.assign(finalParams, searchProcess.getSearchParamsWithoutMethod(params));
... ...
... ... @@ -255,6 +255,10 @@ module.exports = class extends global.yoho.BaseModel {
method = 'app.search.li';
}
if (method === 'web.search.search') {
params.from = 'categoryList';
}
let paramsForApi = searchProcess.getSearchParamsWithoutMethod(params);
return this.get({
... ...
... ... @@ -311,13 +311,13 @@ class ProductListWithFilter {
$this.addClass('active');
this.view.dropList.toggle();
this.view.dropList.find('.default').on('touchend touchcancel', (e) => {
this.view.thisLi = $(e.target);
this.view.thisLi = $(e.delegateTarget);
this.view.firstText.html('默认');
this.popularityFilter(this.view.thisLi, 'default');
return false;
});
this.view.dropList.find('.discount').on('touchend touchcancel', (e) => {
this.view.thisLi = $(e.target);
this.view.thisLi = $(e.delegateTarget);
this.view.firstText.html(this.view.thisLi.data('text'));
this.popularityFilter(this.view.thisLi, 'discount');
$('.first-li-more').removeClass('new default sale discount').addClass('discount');
... ...
... ... @@ -340,6 +340,9 @@ const getSearchParamsWithoutMethod = (params) => {
if (params.physical_channel) {
finalParams.physical_channel = params.physical_channel;
}
if (params.from) {
finalParams.from = params.from;
}
finalParams = _.mapValues(finalParams, value => {
return stringProcess.decodeURIComponent(value);
... ...