Merge branch 'hotfix/favuid' into 'master'
店铺收藏问题模块化推荐商品 See merge request !532
Showing
4 changed files
with
13 additions
and
14 deletions
@@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
88 | <div class="margin-bottom"></div> | 88 | <div class="margin-bottom"></div> |
89 | {{/if}} | 89 | {{/if}} |
90 | {{/isEqual}} | 90 | {{/isEqual}} |
91 | - {{#isEqual module_type 'RecommentProduct'}} | 91 | + {{#isEqual module_type 'AppRecommendProduct'}} |
92 | <div class="index-goods-container" data-type="{{../type}}" data-skns="{{../skns}}" data-order="{{../order}}"></div> | 92 | <div class="index-goods-container" data-type="{{../type}}" data-skns="{{../skns}}" data-order="{{../order}}"></div> |
93 | {{#if ../isModuleMargin}} | 93 | {{#if ../isModuleMargin}} |
94 | <div class="margin-bottom"></div> | 94 | <div class="margin-bottom"></div> |
@@ -48,7 +48,9 @@ module.exports = () => { | @@ -48,7 +48,9 @@ module.exports = () => { | ||
48 | yoho.channel = channel; | 48 | yoho.channel = channel; |
49 | 49 | ||
50 | // 判断请求是否来自app | 50 | // 判断请求是否来自app |
51 | - yoho.isApp = req.query.app_version || req.query.appVersion || req.cookies.app_version; | 51 | + yoho.isApp = (req.query.app_version && req.query.app_version !== 'false') || |
52 | + (req.query.appVersion && req.query.appVersion !== 'false') || | ||
53 | + req.cookies.app_version; | ||
52 | yoho.isWechat = /micromessenger/i.test(req.get('User-Agent') || ''); | 54 | yoho.isWechat = /micromessenger/i.test(req.get('User-Agent') || ''); |
53 | yoho.isWeibo = ua.indexOf('weibo') !== -1; | 55 | yoho.isWeibo = ua.indexOf('weibo') !== -1; |
54 | yoho.isqq = /MQQBrowser/i.test(req.get('User-Agent') || ''); | 56 | yoho.isqq = /MQQBrowser/i.test(req.get('User-Agent') || ''); |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | * @Author: Targaryen | 2 | * @Author: Targaryen |
3 | * @Date: 2017-03-23 11:31:51 | 3 | * @Date: 2017-03-23 11:31:51 |
4 | * @Last Modified by: Targaryen | 4 | * @Last Modified by: Targaryen |
5 | - * @Last Modified time: 2017-04-25 11:45:13 | 5 | + * @Last Modified time: 2017-05-02 11:17:31 |
6 | */ | 6 | */ |
7 | 7 | ||
8 | /** ***************** | 8 | /** ***************** |
@@ -95,7 +95,7 @@ $.each($goodsContainer, function(index, elem) { | @@ -95,7 +95,7 @@ $.each($goodsContainer, function(index, elem) { | ||
95 | let $result = $(result); | 95 | let $result = $(result); |
96 | 96 | ||
97 | lazyLoad($result.find('img[class=lazy]')); | 97 | lazyLoad($result.find('img[class=lazy]')); |
98 | - $(elem).html(result); | 98 | + $(elem).html($result); |
99 | } | 99 | } |
100 | }); | 100 | }); |
101 | }); | 101 | }); |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | * @Author: Targaryen | 2 | * @Author: Targaryen |
3 | * @Date: 2017-03-23 11:02:31 | 3 | * @Date: 2017-03-23 11:02:31 |
4 | * @Last Modified by: Targaryen | 4 | * @Last Modified by: Targaryen |
5 | - * @Last Modified time: 2017-04-26 16:33:07 | 5 | + * @Last Modified time: 2017-05-02 11:09:37 |
6 | */ | 6 | */ |
7 | /* 红人店铺数据处理 */ | 7 | /* 红人店铺数据处理 */ |
8 | 8 | ||
@@ -174,14 +174,14 @@ const _tools = { | @@ -174,14 +174,14 @@ const _tools = { | ||
174 | }, | 174 | }, |
175 | 175 | ||
176 | /** | 176 | /** |
177 | - * 商品列表 | 177 | + * 推荐商品列表 |
178 | * @param {*} moduleData | 178 | * @param {*} moduleData |
179 | */ | 179 | */ |
180 | - recommentProduct(moduleData) { | 180 | + appRecommendProduct(moduleData) { |
181 | let displayType = _.parseInt(_.get(moduleData, 'properties.displayType', 0)); | 181 | let displayType = _.parseInt(_.get(moduleData, 'properties.displayType', 0)); |
182 | 182 | ||
183 | let result = { | 183 | let result = { |
184 | - module_type: 'RecommentProduct', | 184 | + module_type: 'AppRecommendProduct', |
185 | type: displayType | 185 | type: displayType |
186 | }; | 186 | }; |
187 | 187 | ||
@@ -206,10 +206,7 @@ const _tools = { | @@ -206,10 +206,7 @@ const _tools = { | ||
206 | break; | 206 | break; |
207 | } | 207 | } |
208 | 208 | ||
209 | - return { | ||
210 | - module_type: 'RecommentProduct', | ||
211 | - skns: skns, | ||
212 | - }; | 209 | + return result; |
213 | } | 210 | } |
214 | }; | 211 | }; |
215 | 212 | ||
@@ -256,8 +253,8 @@ const floor = (decoratorsData) => { | @@ -256,8 +253,8 @@ const floor = (decoratorsData) => { | ||
256 | case 'SknList': | 253 | case 'SknList': |
257 | skns = _.get(value, 'module_data.data').join(','); | 254 | skns = _.get(value, 'module_data.data').join(','); |
258 | break; | 255 | break; |
259 | - case 'RecommentProduct': | ||
260 | - decorators.push(_tools.recommentProduct(value.module_data)); | 256 | + case 'AppRecommendProduct': |
257 | + decorators.push(_tools.appRecommendProduct(value.module_data)); | ||
261 | break; | 258 | break; |
262 | default: | 259 | default: |
263 | break; | 260 | break; |
-
Please register or login to post a comment