Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0
Showing
6 changed files
with
29 additions
and
7 deletions
@@ -34,7 +34,10 @@ const _doPassportCallback = (req, res, user) => { | @@ -34,7 +34,10 @@ const _doPassportCallback = (req, res, user) => { | ||
34 | 34 | ||
35 | if (user.openId && user.nickname) { | 35 | if (user.openId && user.nickname) { |
36 | let signinByOpenID = LoginService.signinByOpenIDAsync( | 36 | let signinByOpenID = LoginService.signinByOpenIDAsync( |
37 | - user.nickname, user.openId, user.sourceType, shoppingKey, user.unionId); | 37 | + _.trim(user.nickname), _.trim(user.openId), |
38 | + _.trim(user.sourceType), _.trim(shoppingKey), | ||
39 | + _.trim(user.unionId) | ||
40 | + ); | ||
38 | 41 | ||
39 | return signinByOpenID.then((result) => { | 42 | return signinByOpenID.then((result) => { |
40 | if (result.code !== 200) { | 43 | if (result.code !== 200) { |
@@ -17,6 +17,7 @@ const Query = { | @@ -17,6 +17,7 @@ const Query = { | ||
17 | index: (req, res, next) => { | 17 | index: (req, res, next) => { |
18 | let q = req.query; | 18 | let q = req.query; |
19 | let query = q.query || ''; | 19 | let query = q.query || ''; |
20 | + let channel = req.cookies._Channel || req.query._Channel || 'men'; | ||
20 | 21 | ||
21 | q.page = parseInt(q.page || 1, 10); | 22 | q.page = parseInt(q.page || 1, 10); |
22 | q.order = q.order || 's_n_desc'; | 23 | q.order = q.order || 's_n_desc'; |
@@ -36,7 +37,7 @@ const Query = { | @@ -36,7 +37,7 @@ const Query = { | ||
36 | 37 | ||
37 | if (result && result.code === 200 && result.data) { | 38 | if (result && result.code === 200 && result.data) { |
38 | let data = camelCase(result.data); | 39 | let data = camelCase(result.data); |
39 | - let nav = [DataHelper.getChannelNav()]; | 40 | + let nav = [DataHelper.getChannelNav(channel)]; |
40 | 41 | ||
41 | nav.push({ | 42 | nav.push({ |
42 | name: query ? `"${query}" 共${data.total}个结果` : `共${data.total}个结果` | 43 | name: query ? `"${query}" 共${data.total}个结果` : `共${data.total}个结果` |
@@ -36,6 +36,19 @@ function _paramHanlde(obj) { | @@ -36,6 +36,19 @@ function _paramHanlde(obj) { | ||
36 | obj.standard_value_id = standards[1]; | 36 | obj.standard_value_id = standards[1]; |
37 | } | 37 | } |
38 | 38 | ||
39 | + if (obj.channel) { | ||
40 | + switch (obj.channel) { | ||
41 | + case 'men': | ||
42 | + obj.gender = '1,3'; | ||
43 | + break; | ||
44 | + case 'women': | ||
45 | + obj.gender = '2,3'; | ||
46 | + break; | ||
47 | + default: | ||
48 | + break; | ||
49 | + } | ||
50 | + } | ||
51 | + | ||
39 | return obj; | 52 | return obj; |
40 | } | 53 | } |
41 | 54 |
@@ -135,7 +135,7 @@ const ShopService = { | @@ -135,7 +135,7 @@ const ShopService = { | ||
135 | info.shopId = shopId; | 135 | info.shopId = shopId; |
136 | info.name = shopIntro.shopName; | 136 | info.name = shopIntro.shopName; |
137 | info.info = shopIntro.shopIntro; | 137 | info.info = shopIntro.shopIntro; |
138 | - info.btnName = '店铺介绍'; | 138 | + info.btnName = '品牌介绍'; |
139 | info.isFavorite = shopIntro.isFavorite === 'Y'; | 139 | info.isFavorite = shopIntro.isFavorite === 'Y'; |
140 | 140 | ||
141 | let shopData = yield Promise.all([ShopService.getShopDecorator(shopId), | 141 | let shopData = yield Promise.all([ShopService.getShopDecorator(shopId), |
@@ -91,6 +91,10 @@ $('.yoho-group a').hover(function() { | @@ -91,6 +91,10 @@ $('.yoho-group a').hover(function() { | ||
91 | $(this).text(data.en); | 91 | $(this).text(data.en); |
92 | }); | 92 | }); |
93 | 93 | ||
94 | +$('.tag-bag').hover(function() { | ||
95 | + refreshBag(); | ||
96 | +}); | ||
97 | + | ||
94 | $bagGoodsList.on('click', '.del-good-btn', function() { | 98 | $bagGoodsList.on('click', '.del-good-btn', function() { |
95 | var $this = $(this), | 99 | var $this = $(this), |
96 | data = $this.data(); | 100 | data = $this.data(); |
@@ -253,14 +253,15 @@ $('#keep-shopping').click(function() { | @@ -253,14 +253,15 @@ $('#keep-shopping').click(function() { | ||
253 | 253 | ||
254 | $('#brand-fav').click(function() { | 254 | $('#brand-fav').click(function() { |
255 | var $this = $(this), | 255 | var $this = $(this), |
256 | - info = $this.data(), | ||
257 | - param = {}; | 256 | + param = { |
257 | + brandId: $this.data('id'), | ||
258 | + type: 'add' | ||
259 | + }; | ||
258 | 260 | ||
259 | - if (!info.id) { | 261 | + if (!param.brandId) { |
260 | return; | 262 | return; |
261 | } | 263 | } |
262 | 264 | ||
263 | - param.brandId = info.id; | ||
264 | if ($this.hasClass('coll')) { | 265 | if ($this.hasClass('coll')) { |
265 | param.type = 'cancel'; | 266 | param.type = 'cancel'; |
266 | } | 267 | } |
-
Please register or login to post a comment