Merge branch 'hotfix/category' into 'gray'
Hotfix/category See merge request !1322
Showing
4 changed files
with
11 additions
and
3 deletions
@@ -45,7 +45,8 @@ module.exports = class extends global.yoho.BaseModel { | @@ -45,7 +45,8 @@ module.exports = class extends global.yoho.BaseModel { | ||
45 | sales: 'Y', | 45 | sales: 'Y', |
46 | outlets: 2, | 46 | outlets: 2, |
47 | stocknumber: 1, | 47 | stocknumber: 1, |
48 | - need_filter: 'no' | 48 | + need_filter: 'no', |
49 | + from: 'fuzzySearch' | ||
49 | }; | 50 | }; |
50 | 51 | ||
51 | finalParams = _.assign(finalParams, searchProcess.getSearchParamsWithoutMethod(params)); | 52 | finalParams = _.assign(finalParams, searchProcess.getSearchParamsWithoutMethod(params)); |
@@ -255,6 +255,10 @@ module.exports = class extends global.yoho.BaseModel { | @@ -255,6 +255,10 @@ module.exports = class extends global.yoho.BaseModel { | ||
255 | method = 'app.search.li'; | 255 | method = 'app.search.li'; |
256 | } | 256 | } |
257 | 257 | ||
258 | + if (method === 'web.search.search') { | ||
259 | + params.from = 'categoryList'; | ||
260 | + } | ||
261 | + | ||
258 | let paramsForApi = searchProcess.getSearchParamsWithoutMethod(params); | 262 | let paramsForApi = searchProcess.getSearchParamsWithoutMethod(params); |
259 | 263 | ||
260 | return this.get({ | 264 | return this.get({ |
@@ -311,13 +311,13 @@ class ProductListWithFilter { | @@ -311,13 +311,13 @@ class ProductListWithFilter { | ||
311 | $this.addClass('active'); | 311 | $this.addClass('active'); |
312 | this.view.dropList.toggle(); | 312 | this.view.dropList.toggle(); |
313 | this.view.dropList.find('.default').on('touchend touchcancel', (e) => { | 313 | this.view.dropList.find('.default').on('touchend touchcancel', (e) => { |
314 | - this.view.thisLi = $(e.target); | 314 | + this.view.thisLi = $(e.delegateTarget); |
315 | this.view.firstText.html('默认'); | 315 | this.view.firstText.html('默认'); |
316 | this.popularityFilter(this.view.thisLi, 'default'); | 316 | this.popularityFilter(this.view.thisLi, 'default'); |
317 | return false; | 317 | return false; |
318 | }); | 318 | }); |
319 | this.view.dropList.find('.discount').on('touchend touchcancel', (e) => { | 319 | this.view.dropList.find('.discount').on('touchend touchcancel', (e) => { |
320 | - this.view.thisLi = $(e.target); | 320 | + this.view.thisLi = $(e.delegateTarget); |
321 | this.view.firstText.html(this.view.thisLi.data('text')); | 321 | this.view.firstText.html(this.view.thisLi.data('text')); |
322 | this.popularityFilter(this.view.thisLi, 'discount'); | 322 | this.popularityFilter(this.view.thisLi, 'discount'); |
323 | $('.first-li-more').removeClass('new default sale discount').addClass('discount'); | 323 | $('.first-li-more').removeClass('new default sale discount').addClass('discount'); |
@@ -340,6 +340,9 @@ const getSearchParamsWithoutMethod = (params) => { | @@ -340,6 +340,9 @@ const getSearchParamsWithoutMethod = (params) => { | ||
340 | if (params.physical_channel) { | 340 | if (params.physical_channel) { |
341 | finalParams.physical_channel = params.physical_channel; | 341 | finalParams.physical_channel = params.physical_channel; |
342 | } | 342 | } |
343 | + if (params.from) { | ||
344 | + finalParams.from = params.from; | ||
345 | + } | ||
343 | 346 | ||
344 | finalParams = _.mapValues(finalParams, value => { | 347 | finalParams = _.mapValues(finalParams, value => { |
345 | return stringProcess.decodeURIComponent(value); | 348 | return stringProcess.decodeURIComponent(value); |
-
Please register or login to post a comment