Authored by 毕凯

Merge branch 'hotfix/favuid' into 'master'

店铺收藏问题模块化推荐商品



See merge request !532
... ... @@ -88,7 +88,7 @@
<div class="margin-bottom"></div>
{{/if}}
{{/isEqual}}
{{#isEqual module_type 'RecommentProduct'}}
{{#isEqual module_type 'AppRecommendProduct'}}
<div class="index-goods-container" data-type="{{../type}}" data-skns="{{../skns}}" data-order="{{../order}}"></div>
{{#if ../isModuleMargin}}
<div class="margin-bottom"></div>
... ...
... ... @@ -48,7 +48,9 @@ module.exports = () => {
yoho.channel = channel;
// 判断请求是否来自app
yoho.isApp = req.query.app_version || req.query.appVersion || req.cookies.app_version;
yoho.isApp = (req.query.app_version && req.query.app_version !== 'false') ||
(req.query.appVersion && req.query.appVersion !== 'false') ||
req.cookies.app_version;
yoho.isWechat = /micromessenger/i.test(req.get('User-Agent') || '');
yoho.isWeibo = ua.indexOf('weibo') !== -1;
yoho.isqq = /MQQBrowser/i.test(req.get('User-Agent') || '');
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-03-23 11:31:51
* @Last Modified by: Targaryen
* @Last Modified time: 2017-04-25 11:45:13
* @Last Modified time: 2017-05-02 11:17:31
*/
/** *****************
... ... @@ -95,7 +95,7 @@ $.each($goodsContainer, function(index, elem) {
let $result = $(result);
lazyLoad($result.find('img[class=lazy]'));
$(elem).html(result);
$(elem).html($result);
}
});
});
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-03-23 11:02:31
* @Last Modified by: Targaryen
* @Last Modified time: 2017-04-26 16:33:07
* @Last Modified time: 2017-05-02 11:09:37
*/
/* 红人店铺数据处理 */
... ... @@ -174,14 +174,14 @@ const _tools = {
},
/**
* 商品列表
* 推荐商品列表
* @param {*} moduleData
*/
recommentProduct(moduleData) {
appRecommendProduct(moduleData) {
let displayType = _.parseInt(_.get(moduleData, 'properties.displayType', 0));
let result = {
module_type: 'RecommentProduct',
module_type: 'AppRecommendProduct',
type: displayType
};
... ... @@ -206,10 +206,7 @@ const _tools = {
break;
}
return {
module_type: 'RecommentProduct',
skns: skns,
};
return result;
}
};
... ... @@ -256,8 +253,8 @@ const floor = (decoratorsData) => {
case 'SknList':
skns = _.get(value, 'module_data.data').join(',');
break;
case 'RecommentProduct':
decorators.push(_tools.recommentProduct(value.module_data));
case 'AppRecommendProduct':
decorators.push(_tools.appRecommendProduct(value.module_data));
break;
default:
break;
... ...