Merge branch 'feature/searchOptimi' into 'release/5.5'
maybe like 接受对象参数 See merge request !351
Showing
5 changed files
with
8 additions
and
7 deletions
@@ -62,7 +62,7 @@ function getGender() { | @@ -62,7 +62,7 @@ function getGender() { | ||
62 | return window.cookie('_Channel') || 'boys'; | 62 | return window.cookie('_Channel') || 'boys'; |
63 | } | 63 | } |
64 | 64 | ||
65 | -require('../channel/maybe-like')(getGender()); | 65 | +require('../channel/maybe-like')({gender: getGender()}); |
66 | 66 | ||
67 | // 你可能喜欢没有数据就隐藏 | 67 | // 你可能喜欢没有数据就隐藏 |
68 | setTimeout(function() { | 68 | setTimeout(function() { |
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | * @date: 2015/10/12 | 4 | * @date: 2015/10/12 |
5 | */ | 5 | */ |
6 | 6 | ||
7 | -module.exports = function(specificGender) { | 7 | +module.exports = function(likeParameter) { |
8 | var $ = require('yoho-jquery'), | 8 | var $ = require('yoho-jquery'), |
9 | Hammer = require('yoho-hammer'), | 9 | Hammer = require('yoho-hammer'), |
10 | ellipsis = require('yoho-mlellipsis'), | 10 | ellipsis = require('yoho-mlellipsis'), |
@@ -20,7 +20,8 @@ module.exports = function(specificGender) { | @@ -20,7 +20,8 @@ module.exports = function(specificGender) { | ||
20 | gender = null, | 20 | gender = null, |
21 | num, | 21 | num, |
22 | url, | 22 | url, |
23 | - RECPOSE = '110001'; | 23 | + specificGender = likeParameter && likeParameter.gender, |
24 | + RECPOSE = likeParameter && likeParameter.recpose || '110001'; | ||
24 | 25 | ||
25 | // The kidsType can be specified by the parameter. Add by @ZhaoBiao | 26 | // The kidsType can be specified by the parameter. Add by @ZhaoBiao |
26 | var kidsType = specificGender === 'kids' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false, | 27 | var kidsType = specificGender === 'kids' || $('.mobile-wrap').hasClass('kids-wrap') ? true : false, |
@@ -241,7 +242,7 @@ module.exports = function(specificGender) { | @@ -241,7 +242,7 @@ module.exports = function(specificGender) { | ||
241 | } | 242 | } |
242 | 243 | ||
243 | // 优惠券页面直接加载你可能喜欢。add by @zhaobiao | 244 | // 优惠券页面直接加载你可能喜欢。add by @zhaobiao |
244 | - if (specificGender) { | 245 | + if (specificGender || likeParameter && likeParameter.isExecute) { |
245 | search(); | 246 | search(); |
246 | } | 247 | } |
247 | 248 |
@@ -12,7 +12,7 @@ function getGender() { | @@ -12,7 +12,7 @@ function getGender() { | ||
12 | return window.cookie('_Channel') || 'boys'; | 12 | return window.cookie('_Channel') || 'boys'; |
13 | } | 13 | } |
14 | 14 | ||
15 | -require('../channel/maybe-like')(getGender()); | 15 | +require('../channel/maybe-like')({gender: getGender()}); |
16 | 16 | ||
17 | setTimeout(function() { | 17 | setTimeout(function() { |
18 | 18 |
@@ -1137,4 +1137,4 @@ var fuckNum = $('.good-info').length; | @@ -1137,4 +1137,4 @@ var fuckNum = $('.good-info').length; | ||
1137 | 1137 | ||
1138 | fuckNum < 12 && $('.search-divide').remove(); | 1138 | fuckNum < 12 && $('.search-divide').remove(); |
1139 | 1139 | ||
1140 | -require('channel/maybe-like')(true); | 1140 | +require('channel/maybe-like')({recpose: 100101, isExecute: true}); |
@@ -821,4 +821,4 @@ $('#goods-container').on('click', '.good-info', function() { | @@ -821,4 +821,4 @@ $('#goods-container').on('click', '.good-info', function() { | ||
821 | // return false; | 821 | // return false; |
822 | }); | 822 | }); |
823 | 823 | ||
824 | -require('channel/maybe-like')(true); | 824 | +require('channel/maybe-like')({recpose: 100101, isExecute: true}); |
-
Please register or login to post a comment