Authored by zhaoqing

PC添加搜索和品类类目导航模块

... ... @@ -40,10 +40,16 @@
[[each data as item index]]
<!-- 品类导航 -->
[[if item.moduleType == 'ProductSort']]
<div class="modular-editor product-sort" non-editor="true" data-type="ProductSort" data-title="编辑品类导航模块" data-index="[[index]]">
<div class="modular-editor product-sort" non-editor="true" data-type="ProductSort" data-title="添加品类导航模块" data-index="[[index]]">
<img src="/static/assets/images/decorator/product-sort.png" alt="#">
</div>
[[/if]]
<!-- PC搜索 -->
[[if item.moduleType == 'PcSearch']]
<div class="modular-editor pc-search" non-editor="true" data-type="PcSearch" data-title="添加搜索模块" data-index="[[index]]">
<img src="/static/assets/images/decorator/pc-search.png" alt="#">
</div>
[[/if]]
<!-- 整图 -->
[[if item.moduleType == 'ImageSet']]
<div class="modular-editor pc-image-set" data-type="ImageSet" data-title="编辑整图模块" data-index="[[index]]">
... ...

12.4 KB | W: | H:

10.9 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -284,7 +284,7 @@ var Bll = {
// 添加模块
if(!nonAdded) {
if(moduleType == 'ProductSort'){
if(moduleType == 'ProductSort' || moduleType == 'PcSearch'){
editorIcon += '<a class="add-module-icon-right" href="javascript:;" title="添加模块"><img src="/static/assets/images/decorator/add-icon.png"></a>';
}else{
editorIcon += '<a class="add-module-icon" href="javascript:;" title="添加模块"><img src="/static/assets/images/decorator/add-icon.png"></a>';
... ... @@ -1232,6 +1232,7 @@ var Bll = {
};
break;
case "ProductSort":
case "PcSearch":
// 店招
case "ShopBanner":
if(+t.active) { // PC端
... ... @@ -1576,7 +1577,7 @@ var handleDecoratorTemplate = function() {
return;
}
if(module.moduleType == 'ProductSort'){
if(module.moduleType == 'ProductSort' || module.moduleType == 'PcSearch'){
if(module.moduleData === undefined) {
module.moduleData = {data: [{"existModule":true}], properties: {}};
}
... ... @@ -2076,7 +2077,8 @@ $(document).on('dblclick', '.modular-editor', function() {
var index = $(this).data('index');
var title = $(this).data('title');
var type = $(this).data('type');
if(type != 'ProductSort'){
if(type == 'ProductSort' || type == 'PcSearch'){
}else{
Bll.editEvent(index, title);
}
});
... ...
... ... @@ -68,6 +68,11 @@ base.prototype = {
name: '品类导航',
description: '添加品类导航',
type: 'ProductSort'
},
{
name: '搜索',
description: '添加搜索',
type: 'PcSearch'
}
],
2: [
... ...
... ... @@ -55,7 +55,13 @@
/* 商品分类列表 */
.left-area .product-sort {
width: 100%;
height: 238px;
height: 200px;
}
/* 商品分类列表 */
.left-area .pc-search {
width: 100%;
height: 45px;
}
/* 整图模块 */
... ...