Authored by weiqingting

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

var dragging = function(el, array, callback) {
var $ = require('jquery');
var drag = function(el, array, callback) {
this.el = el;
this.dataArray = array;
this.callback = callback;
}
dragging.prototype = {
constructor: dragging,
drag.prototype = {
constructor: drag,
minZindex: 1,
dragItemList: null,
dragItemPos: [],
Initialize: function(){
console.log(list);
this.dragItemList = $("#" + this.el).find(".dragItem");
this.dragItemList = $(this.el).find("li");
if(this.dragItemList.length < 1){
return;
}
var elHeight = 0;
$(this.el).css("position","relative");
for(var i=0;i<this.dragItemList.length;i++){
var top = this.dragItemList[i].offsetTop;
var left = this.dragItemList[i].offsetLeft;
... ... @@ -24,7 +27,12 @@ dragging.prototype = {
this.dragItemPos[i] = {left:left, top:top};
this.dragItemList[i].index = i;
if(i == this.dragItemList.length - 1){
elHeight = top + $(this.dragItemList[i]).height() + 20;
}
}
$(this.el).css("height", elHeight + "px");
for(var i=0; i<this.dragItemList.length; i++){
$(this.dragItemList[i]).css("position", "absolute").css("margin", 0);
... ... @@ -82,6 +90,11 @@ dragging.prototype = {
_self.move(oNear,_self.dragItemPos[obj.index]);
_self.move(obj,_self.dragItemPos[oNear.index]);
/*
$(oNear).css("top",_self.dragItemPos[obj.index].top+"px").css("left",_self.dragItemPos[obj.index].left+"px");
$(obj).css("top",_self.dragItemPos[oNear.index].top+"px").css("left",_self.dragItemPos[oNear.index].left+"px");
*/
//交换index
oNear.index += obj.index;
obj.index = oNear.index - obj.index;
... ... @@ -191,3 +204,5 @@ dragging.prototype = {
}
}
module.exports = drag;
\ No newline at end of file
... ...
... ... @@ -142,6 +142,13 @@ var Bll = {
},
__render: function(selecter, templater, data) {
$(selecter).html(common.util.__template2($("#" + templater).html(), data));
var contentDrag = new common.drag("#add-content", Bll.contentDatas, function(data){
console.log(data);
Bll.contentDatas = data;
Bll.__render("#add-content","template_content",{modules:Bll.contentDatas});
});
contentDrag.Initialize();
},
Tags: []
}
... ... @@ -185,6 +192,8 @@ Bll.__render("#add-content","template_content",{modules:Bll.contentDatas});
new common.dropDown({
el: "#authorId",
ajax: "guangGetAuthorList"
... ... @@ -371,7 +380,7 @@ $(document).on("click", ".del", function() {
$(document).on("change", ".observe", function() {
var $this = $(this);
var name = $this.data("field");
var name = $this.data("field");//a.b.2.d
Bll.module.contentData.data=common.util.__buildobj(name, '.', Bll.module.contentData.data, function(obj, name) {
obj[name] = $this.val();
});
... ... @@ -641,3 +650,5 @@ $(document).on("click","#brandAutoBtn",function(){
},true);
}
});
... ...
... ... @@ -35,17 +35,17 @@ var Button=[
{
template_intro:"焦点图",
template_name:"focus",
dialog:"",
dialog:"focus-template",
data:[
{
"src": "",
"alt": "",
"url": {},
"bgColor": "",
"imgId": ""
"imgId": "0"
}
],
focus_type:""
focus_type:"1"
},
{
template_intro:"添加商品",
... ... @@ -228,7 +228,7 @@ var Button=[
{
"template_name": "singleNameImage",
"template_intro": "标题广告",
dialog:"",
dialog:"singleNameImage-template",
"data": {
"title": "",
"src": "",
... ... @@ -401,7 +401,7 @@ var Button=[
},
{
template_intro:"添加促销",
dialog:"",
dialog:"promotion-template",
template_name:"promotion",
data: {
"promotionId": ""
... ... @@ -413,7 +413,12 @@ var Button=[
dialog:"carouselBanner-template",
"data": {
"speed": "",
"list": []
"list": [
{
"src": "",
"url": {}
}
]
}
},
{
... ... @@ -605,7 +610,92 @@ var Button=[
}
},
"blocks": [],
"list": [],
"list": [
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
},
{
"url": {
"action": "",
"url": ""
},
"name": ""
}
],
"imgs": []
}
},
... ... @@ -804,6 +894,27 @@ var Button=[
]
}
},
{
"template_name": "getCoupon",
"template_intro": "领券频道",
dialog:"getCoupon-template",
"data": {
"title":"",
"isShow":"YES",
"image":{
"src": "",
"url": {
"action": "",
"url": ""
}
},
"couponID":"",
"goShopping":{
"action": "",
"url": ""
}
}
}
];
module.exports = Button;
... ...
... ... @@ -195,8 +195,7 @@ $(document).on("click", '#icon-delOne', function() {
});
/*自定义参数*/
$(document).on("click", '.paramsGroupDel', function() {
console.log($(this).data("index"));
Bll.module.contentData.data.list.splice($(this).data("index"));
Bll.module.contentData.data.list.splice($(this).data("index"),1);
Bll.renderDialog("paramsGroup-template");
});
$(document).on("click", '#paramsGroup-addOne', function() {
... ... @@ -222,6 +221,171 @@ $(document).on("click", '#newUserFloor-addBanner', function() {
);
Bll.renderDialog("newUserFloor-template");
});
/*有序焦点添加*/
$(document).on("click", '#debrisSlider-addLeft', function() {
Bll.module.contentData.data.left.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("debrisSlider-template");
});
$(document).on("click", '#debrisSlider-addCenter', function() {
Bll.module.contentData.data.big_image.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("debrisSlider-template");
});
$(document).on("click", '#debrisSlider-addRight', function() {
Bll.module.contentData.data.right.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("debrisSlider-template");
});
//*****************************************************************//
/*热门品类*/
$(document).on("click", '#hotCategory-addLeft', function() {
Bll.module.contentData.data.blocks.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("hotCategory-template");
});
$(document).on("click", '#hotCategory-addRight', function() {
Bll.module.contentData.data.imgs.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("hotCategory-template");
});
$(document).on("click", '.hotCategory-delLeft', function() {
Bll.module.contentData.data.blocks.splice($(this).data("index"),1);
Bll.renderDialog("hotCategory-template");
});
$(document).on("click", '.hotCategory-delRight', function() {
Bll.module.contentData.data.imgs.splice($(this).data("index"),1);
Bll.renderDialog("hotCategory-template");
});
//*****************************************************************//
/*图片列表*/
$(document).on("click", '#imageList-addOne', function() {
Bll.module.contentData.data.list.push(
{
"src": "",
"url": {
"action": "",
"url": ""
},
"title": ""
}
);
Bll.renderDialog("imageList-template");
});
$(document).on("click", '.imageList-del', function() {
Bll.module.contentData.data.list.splice($(this).data("index"),1);
Bll.renderDialog("imageList-template");
});
$(document).on("checked", '#imageList_Y', function() {
Bll.module.contentData.data.title.is_show_name = "Y";
Bll.renderDialog("imageList-template");
});
$(document).on("checked", '#imageList_N', function() {
Bll.module.contentData.data.title.is_show_name = "N";
Bll.renderDialog("imageList-template");
});
//*****************************************************************//
/*文本导航*/
$(document).on("click", '#textNav-addOne', function() {
Bll.module.contentData.data.push(
{
"name": "",
"url": {
"action": "",
"url": ""
}
}
);
Bll.renderDialog("textNav-template");
});
$(document).on("click", '.textNav-delOne', function() {
Bll.module.contentData.data.splice($(this).data("index"), 1);
Bll.renderDialog("textNav-template");
});
//*****************************************************************//
/*推荐(标题 + 12张图)*/
$(document).on("change", '#recommendContentFive-is_show', function() {
Bll.module.contentData.data.title.is_show = 1-Bll.module.contentData.data.title.is_show;
Bll.renderDialog("recommendContent-template");
});
//*****************************************************************//
/*焦点图*/
$(document).on("click", '#focus-addOne', function() {
Bll.module.contentData.data.push(
{
"src": "",
"alt": "",
"url": {},
"bgColor": "",
"imgId": "0"
}
);
Bll.renderDialog("focus-template");
});
$(document).on("click", '.focus-del', function() {
Bll.module.contentData.data.splice($(this).data("index"), 1);
Bll.renderDialog("focus-template");
});
$(document).on("change", '#focus-select', function() {
Bll.module.contentData.focus_type = $(this).val();
Bll.renderDialog("focus-template");
});
//*****************************************************************//
/*轮播banner*/
$(document).on("click", '#carouselBanner-addOne', function() {
Bll.module.contentData.data.list.push(
{
"src": "",
"url": {}
}
);
Bll.renderDialog("carouselBanner-template");
});
$(document).on("click", '.carouselBanner-del', function() {
Bll.module.contentData.data.list.splice($(this).data("index"), 1);
Bll.renderDialog("carouselBanner-template");
});
//*****************************************************************//
$(document).on("click", "#sub_btn", function() {
var data = {
... ...
... ... @@ -266,13 +266,14 @@
[[each btns as btn index]]
<li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]">[[btn.template_intro]]</a></li>
[[/each]]
<div class="clearfix"></div>
</script>
<script type="text/template" id="template_content">
<!-- 文本内容 -->
[[each modules as module index]]
<li class="form-group custom-group" data-index="[[index]]">
<li class="form-group custom-group" data-index="[[index]]" style="width: 100%">
[[if module.contentData.template_name=='text']]
<div class="col-sm-12"><h3>[[module.contentData.data.text]]</h3></div>
[[else if module.contentData.template_name=='singleImage']]
... ...
<!--领券楼层-->
<!-- 标题图片 -->
<script type="text/template" id="titleImage-template">
<div class="panel-body" id="titleImage-baseFrom">
... ... @@ -215,7 +217,8 @@
<input type="text" class="form-control observe" value="[[contentData.data.title.title]]" required="required" data-field="title.title">
</div>
<label class="col-sm-4 control-label">是否显示
<input type="checkbox" value="[[contentData.data.title.is_show]]" checked="[[contentData.data.title.is_show?'checked':'']]" class="observe" data-field="title.is_show">
<input type="checkbox" name="is_show" value="1" id="recommendContentFive-is_show">
<input type="hidden" id="is_show" for="checkbox" value="[[contentData.data.title.is_show]]" />
</label>
</div>
[[/if]]
... ... @@ -250,7 +253,11 @@
[[/if]]
[[each contentData.data.list as item index]]
<tr>
[[if contentData.data.big_image]]
<td>[[index+2]]</td>
[[else]]
<td>[[index+1]]</td>
[[/if]]
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/></td>
<td>
<div class="col-sm-12">
... ... @@ -419,7 +426,7 @@
<script type="text/template" id="debrisSlider-template">
<div class="panel-body" id="debrisSlider-baseFrom">
<div class="debris_slider">
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加左图" style="margin:10px;" id="select-left-pic"></p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加左图" style="margin:10px;" id="debrisSlider-addLeft"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
... ... @@ -435,57 +442,53 @@
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="left.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe" value="[[url.action]]" data-field="left.[[index]].action">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="left.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input value="[[item.url.url]]" class="observe" required="required" data-field="left.[[index]].url.url"/>
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="left.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe" required="required" data-field="left.[[index]].title"/>
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="left.[[index]].title"/>
</div>
</td>
</tr>
[[/each]]
</tbody>
</table>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加中间图" style="margin:10px;" id="select-big-pic"></p>
<div class="image-info">
<ul class="sortable" style="width:100%;">
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
</tr>
</thead>
<tbody>
[[each contentData.data.big_image as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="big_image.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe" value="[[url.action]]" data-field="big_image.[[index]].action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input value="[[item.url.url]]" class="observe" required="required" data-field="big_image.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe" required="required" data-field="big_image.[[index]].title"/>
</div>
</td>
</tr>
[[/each]]
</tbody>
</table>
</ul>
</div>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加右图" style="margin:10px;" id="select-right-pic"></p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加中间图" style="margin:10px;" id="debrisSlider-addCenter"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
</tr>
</thead>
<tbody>
[[each contentData.data.big_image as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="big_image.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="big_image.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="big_image.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="big_image.[[index]].title"/>
</div>
</td>
</tr>
[[/each]]
</tbody>
</table>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加右图" style="margin:10px;" id="debrisSlider-addRight"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
... ... @@ -501,15 +504,15 @@
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="right.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe" value="[[url.action]]" data-field="right.[[index]].action">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="right.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input value="[[item.url.url]]" class="observe" required="required" data-field="right.[[index]].url.url"/>
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="right.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe" required="required" data-field="right.[[index]].title"/>
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="right.[[index]].title"/>
</div>
</td>
</tr>
... ... @@ -519,6 +522,264 @@
</div>
</div>
</script>
<!--热门品类-->
<script type="text/template" id="hotCategory-template">
<div class="hotCategory">
<p>
标题 : <input type="text" class="observe" data-field="title.name" value="[[contentData.data.title.name]]" required> 更多名称 : <input type="text" class="observe" data-field="title.more_name" value="[[contentData.data.title.more_name]]" style="width:50px;"><br>
跳转目的 : <select name="goTo" class="observe" value="[[contentData.data.title.more_url.action]]" data-field="title.more_url.action">
[[layout action_template]]
</select>
跳转url : <input value="[[contentData.data.title.more_url.url]]" class="observe" required="required" data-field="title.more_url.url"/>
</p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加左上图片" style="margin:10px;" id="hotCategory-addLeft"></p>
[[if contentData.data.blocks.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data.blocks as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="blocks.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="blocks.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="blocks.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="blocks.[[index]].title"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm hotCategory-delLeft" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
[[/if]]
<p>添加左下导航:</p>
[[each contentData.data.list as item index]]
<p>
导航名称:<input type="text" class="observe" value="[[item.name]]" data-field="list.[[index]].name">
<select name="goTo" class="observe" value="[[item.url.action]]" data-field="list.[[index]].url.action">
[[layout action_template]]
</select>
<input value="[[item.url.url]]" class="observe" required="required" data-field="list.[[index]].url.url"/>
</p>
[[/each]]
<p>
<input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加右侧图片" style="margin:10px;" id="hotCategory-addRight">
</p>
[[if contentData.data.imgs.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data.imgs as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="imgs.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="imgs.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="imgs.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="imgs.[[index]].title"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm hotCategory-delRight" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
[[/if]]
</div>
</script>
<!--图片列表-->
<script type="text/template" id="imageList-template">
<p>
标题:<input type="text" class="observe" data-field="title.title" value="[[contentData.data.title.title]]" style="width:100px;">
显示名称: <input type="radio" name="is_show_name" id="imageList_Y" value="Y"> <input type="radio" name="is_show_name" id="imageList_N" value="N"> &nbsp;&nbsp;&nbsp;&nbsp;
<input type="hidden" id="is_show_name" for="radio" value="[[contentData.data.title.is_show_name]]" />
每行显示:<input style="width:60px;" type="number" data-field="title.column_num" class="observe" value="[[contentData.data.title.column_num]]"> 张图片
</p>
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加图片" style="margin:10px;" id="imageList-addOne"></p>
[[if contentData.data.list.length]]
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data.list as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="list.[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="list.[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.title]]" class="observe form-control" required="required" data-field="list.[[index]].title"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm imageList-del" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
[[/if]]
</script>
<!--文本导航-->
<script type="text/template" id="textNav-template">
<div class="textNav-baseForm">
<p><input type="button" name="select-pic" class="btn btn-info btn-xs" value="添加一个" style="margin:10px;" id="textNav-addOne"></p>
[[each contentData.data as item index]]
<p>
导航名称:<input type="text" value="[[item.name]]" class="observe" data-field="[[index]].name" required>
<select name="goTo" class="observe" value="[[item.url.action]]" data-field="[[index]].url.action">
[[layout action_template]]
</select>
<input value="[[item.url.url]]" data-field="[[index]].url.url" class="observe" required="required"/>
<a type="button" class="btn btn-danger btn-xs textNav-delOne" data-index="[[index]]">删除</a>
</p>
[[/each]]
</div>
</script>
<!--轮播banner-->
<script type="text/template" id="carouselBanner-template">
<input type="button" name="select-pic" value="添加图片" class="btn btn-info btn-xs" style="margin:10px;" id="carouselBanner-addOne">
  轮播速度:<input type="text" class="observe" data-field="speed" value="[[contentData.data.speed]]"><br>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data.list as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/></td>
<td><button class="btn btn-danger btn-sm carouselBanner-del" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
</script>
<!--添加促销-->
<script type="text/template" id="promotion-template">
<p> 添加促销id<input type="text" class="observe" value="[[contentData.data.promotionId]]" data-field="promotionId"></p>
</script>
<!--标题广告-->
<script type="text/template" id="singleNameImage-template">
<p style="margin:10px;">添加标题: <input type="text" class="observe" value="[[contentData.data.title]]" data-field="title"></p>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><input type="file" name="file" value="[[contentData.data.src]]" class="observe" data-field="src" required/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[contentData.data.url.action]]" data-field="url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[contentData.data.url.url]]" class="observe form-control" required="required" data-field="url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[contentData.data.alt]]" class="observe form-control" data-field="alt"/>
</div>
</td>
</tr>
</tbody>
</table>
</script>
<!--焦点图-->
<script type="text/template" id="focus-template">
<input type="button" class="btn btn-info btn-xs" id="focus-addOne" value="添加图片" style="margin:10px;"><br>
焦点图类型:&nbsp;&nbsp;
<select id="focus-select" value="[[contentData.focus_type]]">
<option value="1">通栏</option>
<option value="2">左右滑动</option>
<option value="3">手风琴</option>
</select>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
<tr>
<th>序号</th>
<th>资源位</th>
<th>选项</th>
<th>操作</th>
</tr>
</thead>
<tbody>
[[each contentData.data as item index]]
<tr>
<td>[[index+1]]</td>
<td><input type="file" name="file" value="[[item.src]]" class="observe" data-field="[[index]].src" required/></td>
<td>
<div class="col-sm-12">
<select name="goTo" class="observe form-control" value="[[item.url.action]]" data-field="[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-12">
<input placeholder="url" value="[[item.url.url]]" class="observe form-control" required="required" data-field="[[index]].url.url"/>
</div>
<div class="col-sm-12">
<input placeholder="图片描述" value="[[item.alt]]" class="observe form-control" data-field="[[index]].alt"/>
</div>
<div class="col-sm-12">
<input placeholder="通栏背景色" value="[[item.bgColor]]" class="observe form-control" data-field="[[index]].bgColor"/>
</div>
</td>
<td><button class="btn btn-danger btn-sm focus-del" type="button" data-index="[[index]]">删除</button></td>
</tr>
[[/each]]
</tbody>
</table>
</script>
<!--select选项-->
<script type="text/template" id="action_template">
<option value="">选择跳转目标</option>
... ...
... ... @@ -77,7 +77,7 @@
<img src="/js/source/plugins/trendgoodsTopic/trend.png" width="96%">
</div>
</div>
[[else if module.contentData.template_name=='customBrands']]
[[else if module.contentData.template_name=='appHotBrands']]
<div class="custom-pic">
<div class="hot-brand-title">[[module.contentData.data.title]]</div>
<ul class="custom-pic clearfix">
... ... @@ -141,7 +141,7 @@
[[else if module.contentData.template_name=='imageList']]
<div class="custom-pic">
<div class="hot-brand-title" style="margin:0px auto; text-align:center;">[[module.contentData.data.title.title]]</div>
<ul class="custom-pic clearfix image-list-box resource-row li[[12/module.contentData.data.title.column_num]]">
<ul class="custom-pic clearfix image-list-box resource-row li[[module.contentData.data.title.column_num]]">
[[each module.contentData.data.list as item index]]
<li><img src="[[item.src]]"></li>
[[/each]]
... ... @@ -231,7 +231,7 @@
</div>
<div class='row'>
[[each module.contentData.data.list as item index]]
<div class='col-sm-6 matchImage'><img src="[[item.src]]"></div>
<div class='col-sm-4 matchImage'><img src="[[item.src]]"></div>
[[/each]]
</div>
</div>
\ No newline at end of file
... ...