Authored by zhaoqing

模块话店铺APP端添加推荐商品模块

... ... @@ -174,6 +174,14 @@
</div>
[[/if]]
[[/if]]
[[if item.moduleType == 'AppRecommendProduct']]
<div class="modular-editor app-recommend-product" data-type="AppRecommendProduct" data-title="编辑推荐商品模块" data-index="[[index]]">
[[if item.moduleData]]
[[else]]
<img src="/static/assets/images/decorator/yoho-logo.png" alt="#" class="logo">
[[/if]]
</div>
[[/if]]
[[/each]]
</div>
... ...
... ... @@ -11,6 +11,7 @@ var systemTemplates =
templateName: '系统默认',
templateId: 1,
createTime: '2016-12-14 14:42:00'
};
var shopTemplates = [];
... ... @@ -900,6 +901,13 @@ var Bll = {
$('.editor-header').html(common.util.__template2($('#recommend-product-display-type').html(), {displayType: Bll.recommendProductDisplayType}));
Bll.initRecommendProduct(selector);
break;
case "AppRecommendProduct":
// 渲染 "展示类型" 选择组件
Bll.recommendProductDisplayType = Bll.getRecommendProductDisplayType(module);
Bll.recommendProductList = Bll.getModuleData(module); // 临时保存选中的SKN
$('.editor-header').html(common.util.__template2($('#recommend-product-display-type').html(), {displayType: Bll.recommendProductDisplayType}));
Bll.initRecommendProduct(selector);
break;
};
// editorTitle区域 input组件自动选中
... ...
... ... @@ -41,6 +41,11 @@ base.prototype = {
name: '视频',
description: '视频模块',
type: 'Video'
},
{
name: '推荐商品',
description: '配置推荐商品模块,可以通过配置参数,自动从搜索结果获取;或者手动选择商品。',
type: 'AppRecommendProduct'
}
],
// PC端,左侧160区域
... ...
... ... @@ -231,4 +231,10 @@
background: #FFFFFF;
margin-top: 10px;
height: 20px;
}
.app-recommend-product {
width: 375px;
height: 180px;
text-align: center;
}
\ No newline at end of file
... ...