Authored by 陶雨

资源管理 -> 资源管理、资源内容管理

... ... @@ -6,12 +6,19 @@
module.exports=function(app) {
/*资源管理首页*/
app.get("/resource/index/index","resource.resourceManage.Index");
app.get("/resource/index/index","resource.resourceManage.Index", function () {
this.$extend = {
moduleName: "资源管理",
pageName: "资源管理"
}
});
/*资源内容管理页*/
app.get("/resource/content/index/:param","resource.resourceManage.ContentManage", "resourceManage_getUrlAction", function (response) {
this.$extend = {
data:response.data
data:response.data,
moduleName: "资源管理",
pageName: "资源内容管理"
};
});
... ...
<!-- 添加图标、楼层 -->
<script type="text/template" id="icon-template">
<%if contentData.template_name=='appIconList'%>
[[if contentData.template_name=='appIconList']]
<div class="panel-body">
<div class="form-group">
<label class="col-sm-2">图标类型</label>
... ... @@ -12,57 +12,57 @@
<label style="cursor: pointer;">
<input type="radio" name="number" class="icon-number" value="5">一行5
</label>
<input type="hidden" id="number" value="<%contentData.number%>" for="radio"/>
<input type="hidden" id="number" value="[[contentData.number]]" for="radio"/>
</div>
</div>
</div>
<%/if%>
[[/if]]
<div class="panel-body">
<div>
<ul class="draggable" data-array="data">
<%each contentData.data as item index%>
[[each contentData.data as item index]]
<li>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<tbody>
<tr>
<td align="center">
<%index+1%>
[[index+1]]
</td>
<td align="center"><input type="file" name="file" value="<%item.src%>" class="observe" data-field="<%index%>.src"/>
<td align="center"><input type="file" name="file" value="[[item.src]]" class="observe" data-field="[[index]].src"/>
</td>
<td>
<div class="form-group ">
<select name="goTo" class="form-control observe" value="<%item.url.action%>"
data-field="<%index%>.url.action">
<%layout action_template%>
<select name="goTo" class="form-control observe" value="[[item.url.action]]"
data-field="[[index]].url.action">
[[layout action_template]]
</select>
</div>
<div class="form-group ">
<input value="<%item.url.url%>" class="form-control observe" required="required"
data-field="<%index%>.url.url" placeholder="图片链接"/>
<input value="[[item.url.url]]" class="form-control observe" required="required"
data-field="[[index]].url.url" placeholder="图片链接"/>
<p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
</div>
<div class="form-group ">
<input value="<%item.alt%>" class="form-control observe"
data-field="<%index%>.alt" placeholder="图片描述"/>
<input value="[[item.alt]]" class="form-control observe"
data-field="[[index]].alt" placeholder="图片描述"/>
</div>
<%if contentData.template_name=='addfloor'%>
[[if contentData.template_name=='addfloor']]
<div class="form-group ">
<input value="<%item.altEn%>" class="form-control observe"
data-field="<%index%>.altEn" placeholder="英文描述"/>
<input value="[[item.altEn]]" class="form-control observe"
data-field="[[index]].altEn" placeholder="英文描述"/>
</div>
<%/if%>
[[/if]]
</td>
<td>
<a class="btn btn-danger delBtn" data-event="icon.data" data-index="<%index%>">删除</a>
<a class="btn btn-danger delBtn" data-event="icon.data" data-index="[[index]]">删除</a>
</td>
</tr>
</tbody>
</table>
</li>
<%/each%>
[[/each]]
</ul>
</div>
<a href="JavaScript:;" data-event="icon.data" class="btn btn-primary btn-xs addBtn">添加一个</a>
... ... @@ -71,80 +71,80 @@
<!-- 推荐品牌-->
<script type="text/template" id="brands-template">
<div class="panel-body">
<%if contentData.template_name=='appHotBrands'%>
[[if contentData.template_name=='appHotBrands']]
<div class="form-group">
<div class="col-sm-10">
<label>标题</label>
<input class="form-control observe input-form" type="text" value="<%contentData.data.title.title%>" data-field="title.title" placeholder="推荐品牌">
<input class="form-control observe input-form" type="text" value="[[contentData.data.title.title]]" data-field="title.title" placeholder="推荐品牌">
&emsp;&emsp;&emsp;&emsp;<label>显示名称</label>
<label style="cursor: pointer;"><input type="radio" name="is_show_name_brand" class="is_show_name_brand" value="Y"></label>
<label style="cursor: pointer;"><input type="radio" name="is_show_name_brand" class="is_show_name_brand" value="N"></label>
<input type="hidden" id="is_show_name_brand" value="<%contentData.data.is_show_name%>" for="radio"/>
<input type="hidden" id="is_show_name_brand" value="[[contentData.data.is_show_name]]" for="radio"/>
</div>
</div>
<%/if%>
<%if contentData.template_name=='customBrands'%>
[[/if]]
[[if contentData.template_name=='customBrands']]
<div class="form-group">
<div class="col-sm-6">
<label>标题</label>&emsp;&emsp;&emsp;&emsp;
<input class="form-control observe input-form" type="text" value="<%contentData.data.title.title%>" data-field="title.title" placeholder="自定义品牌">
<input class="form-control observe input-form" type="text" value="[[contentData.data.title.title]]" data-field="title.title" placeholder="自定义品牌">
</div>
</div>
<div class="form-group">
<div class="col-sm-6">
<label>附加参数</label>&emsp;&emsp;
<select class="form-control observe input-form" value="<%contentData.data.title.param%>" data-field="title.param">
<%layout parm1_template%>
<select class="form-control observe input-form" value="[[contentData.data.title.param]]" data-field="title.param">
[[layout parm1_template]]
</select>
</div>
<div class="col-sm-6">
<label>附加参数值</label>&emsp;
<input class="form-control observe input-form" type="text" value="<%contentData.data.title.param_value%>" data-field="title.param_value" placeholder="附加参数值">
<input class="form-control observe input-form" type="text" value="[[contentData.data.title.param_value]]" data-field="title.param_value" placeholder="附加参数值">
</div>
</div>
<%/if%>
<%if contentData.template_name=='kidsBrands'%>
[[/if]]
[[if contentData.template_name=='kidsBrands']]
<div class="form-group">
<div class="col-sm-6">
<label>标题</label>&emsp;&emsp;&emsp;&emsp;
<input class="form-control observe input-form" required type="text" value="<%contentData.data.params.title%>" data-field="params.title" placeholder="请输入标题" prompt="标题">
<input class="form-control observe input-form" required type="text" value="[[contentData.data.params.title]]" data-field="params.title" placeholder="请输入标题" prompt="标题">
</div>
</div>
<div class="form-group">
<div class="col-sm-6">
<label>分类</label>&emsp;&emsp;&emsp;&emsp;
<select class="form-control observe input-form" value="<%contentData.data.params.param%>" data-field="params.param">
<%layout parm2_template%>
<select class="form-control observe input-form" value="[[contentData.data.params.param]]" data-field="params.param">
[[layout parm2_template]]
</select>
</div>
<div class="col-sm-6">
<label>附加参数值</label>&emsp;
<input class="form-control observe input-form" type="text" value="<%contentData.data.params.paramValue%>" data-field="params.paramValue" placeholder="附加参数值">
<input class="form-control observe input-form" type="text" value="[[contentData.data.params.paramValue]]" data-field="params.paramValue" placeholder="附加参数值">
</div>
</div>
<div class="form-group ">
<div class="col-sm-6">
<label>更多名称</label>&emsp;&emsp;
<input class="form-control observe input-form" type="text" value="<%contentData.data.params.more%>" data-field="params.more" placeholder="更多名称">
<input class="form-control observe input-form" type="text" value="[[contentData.data.params.more]]" data-field="params.more" placeholder="更多名称">
</div>
</div>
<div class="form-group ">
<div class="col-sm-6">
<label>跳转目的</label>&emsp;&emsp;
<select name="goTo" class="form-control observe input-form" value="<%contentData.data.params.more_url.action%>"
<select name="goTo" class="form-control observe input-form" value="[[contentData.data.params.more_url.action]]"
data-field="params.more_url.action">
<%layout action_template%>
[[layout action_template]]
</select>
</div>
<div class="col-sm-6">
<label>链接</label>&emsp;&emsp;&emsp;&emsp;
<input placeholder="url" value="<%contentData.data.params.more_url.url%>" class="form-control observe input-form"
<input placeholder="url" value="[[contentData.data.params.more_url.url]]" class="form-control observe input-form"
data-field="params.more_url.url"/>
<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
<label style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</label>
</div>
</div>
<%/if%>
[[/if]]
</div>
<div class="panel-body">
<div class="form-group">
... ... @@ -152,31 +152,31 @@
</div>
<div>
<ul class="draggable" data-array="data.list">
<%each contentData.data.list as item index%>
[[each contentData.data.list as item index]]
<li>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<tbody>
<tr>
<td align="center">
<input type="file" name="file" value="<%item.src%>" class="observe" data-field="list.<%index%>.src"/>
<input type="file" name="file" value="[[item.src]]" class="observe" data-field="list.[[index]].src"/>
</td>
<td align="center">
<div class="form-group">
<%if contentData.template_name=='kidsBrands'%>
<input class="form-control observe" type="text" value="<%item.title%>" data-field="list.<%index%>.title">
<%else%>
<input class="form-control observe" type="text" value="<%item.name%>" data-field="list.<%index%>.name">
<%/if%>
[[if contentData.template_name=='kidsBrands']]
<input class="form-control observe" type="text" value="[[item.title]]" data-field="list.[[index]].title">
[[else]]
<input class="form-control observe" type="text" value="[[item.name]]" data-field="list.[[index]].name">
[[/if]]
</div>
</td>
<td>
<a class="btn btn-danger delBtn" data-event="brands.list" data-index="<%index%>">删除</a>
<a class="btn btn-danger delBtn" data-event="brands.list" data-index="[[index]]">删除</a>
</td>
</tr>
</tbody>
</table>
</li>
<%/each%>
[[/each]]
</ul>
</div>
... ... @@ -185,7 +185,7 @@
</div>
<div class="panel-body">
<%if contentData.template_name=='appHotBrands'%>
[[if contentData.template_name=='appHotBrands']]
<div class="form-group">
<table class="table table-hover table-bordered responsive dataTable no-footer">
<thead>
... ... @@ -197,27 +197,27 @@
<tbody>
<tr>
<td>
<input type="file" name="file" value="<%contentData.data.image.src%>"
<input type="file" name="file" value="[[contentData.data.image.src]]"
class="observe" required="required"
data-field="image.src"/>
</td>
<td>
<div class="form-group ">
<select name="goTo" class="form-control observe"
value="<%contentData.data.image.url.action%>"
value="[[contentData.data.image.url.action]]"
data-field="image.url.action">
<%layout action_template%>
[[layout action_template]]
</select>
</div>
<div class="form-group ">
<input value="<%contentData.data.image.url.url%>"
<input value="[[contentData.data.image.url.url]]"
class="form-control observe"
data-field="image.url.url" placeholder="图片链接"/>
<p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
</div>
<div class="form-group ">
<input value="<%contentData.data.image.alt%>"
<input value="[[contentData.data.image.alt]]"
class="form-control observe"
data-field="image.alt" placeholder="图片描述"/>
</div>
... ... @@ -226,7 +226,7 @@
</tbody>
</table>
</div>
<%/if%>
[[/if]]
</div>
</script>
... ... @@ -234,23 +234,23 @@
<script type="text/template" id="template5">
<div class="row" id="brandForm">
<div class="form-group">
<%each Brands as brand index%>
<a class="btn brand-index" href="#<%brand.name%>"><%brand.name%></a>
<%/each%>
[[each Brands as brand index]]
<a class="btn brand-index" href="#[[brand.name]]">[[brand.name]]</a>
[[/each]]
</div>
<div class="form-group brand-wrap" style="height: 400px;overflow: auto;">
<%each Brands as brand index%>
<div class="form-group" name="<%brand.name%>">
<%each brand.items as item __index %>
[[each Brands as brand index]]
<div class="form-group" name="[[brand.name]]">
[[each brand.items as item __index ]]
<a class="btn">
<input type="checkbox" value="<%item.id%>" name="brandCheckBox">
<label><%item.brand_name%></label>
<input type="checkbox" value="[[item.id]]" name="brandCheckBox">
<label>[[item.brand_name]]</label>
</a>
<%/each%>
[[/each]]
</div>
<%/each%>
[[/each]]
</div>
<input type="hidden" id="brandCheckBox" for="checkbox" value="<%Brdata%>"/>
<input type="hidden" id="brandCheckBox" for="checkbox" value="[[Brdata]]"/>
</div>
</script>
<!--自定义品牌附加参数-->
... ... @@ -269,23 +269,23 @@
<div class="form-group ">
<div class="col-sm-6">
<label>标题名称</label>&emsp;&emsp;
<input class="form-control observe input-form" placeholder="标题名称" type="text" value="<%contentData.data.title_name%>" data-field="title_name" required>
<input class="form-control observe input-form" placeholder="标题名称" type="text" value="[[contentData.data.title_name]]" data-field="title_name" required>
</div>
<div class="col-sm-6">
<label>更多名称</label>&emsp;&emsp;
<input class="form-control observe input-form" type="text" placeholder="更多名称" value="<%contentData.data.more_name%>" data-field="more_name">
<input class="form-control observe input-form" type="text" placeholder="更多名称" value="[[contentData.data.more_name]]" data-field="more_name">
</div>
</div>
<div class="form-group ">
<div class="col-sm-6">
<label>跳转目的</label>&emsp;&emsp;
<select name="goTo" class="form-control observe input-form" value="<%contentData.data.more_link.action%>" data-field="more_link.action">
<%layout action_template%>
<select name="goTo" class="form-control observe input-form" value="[[contentData.data.more_link.action]]" data-field="more_link.action">
[[layout action_template]]
</select>
</div>
<div class="col-sm-6">
<label>链接</label>&emsp;&emsp;&emsp;&emsp;
<input value="<%contentData.data.more_link.url%>" class="form-control observe input-form" data-field="more_link.url" placeholder="url"/>
<input value="[[contentData.data.more_link.url]]" class="form-control observe input-form" data-field="more_link.url" placeholder="url"/>
<p style="color:#999;margin-top: 5px;">注:链接中不能有英文单引号</p>
</div>
</div>
... ... @@ -301,15 +301,15 @@
</tr>
</thead>
<tbody>
<%each contentData.data.nav as item index%>
[[each contentData.data.nav as item index]]
<tr>
<td align="center">
<%index+1%>
[[index+1]]
</td>
<td align="center">
<div class="form-group">
<div class="col-sm-10">
<input value="<%item.name%>" class="form-control observe" required="required" data-field="nav.<%index%>.name" placeholder="标签名称"/>
<input value="[[item.name]]" class="form-control observe" required="required" data-field="nav.[[index]].name" placeholder="标签名称"/>
</div>
</div>
... ... @@ -317,23 +317,23 @@
<td>
<div class="form-group">
<div class="col-sm-10">
<select name="goTo" class="form-control observe" value="<%item.url.action%>"
data-field="nav.<%index%>.url.action">
<%layout action_template%>
<select name="goTo" class="form-control observe" value="[[item.url.action]]"
data-field="nav.[[index]].url.action">
[[layout action_template]]
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input value="<%item.url.url%>" class=" form-control observe" required="required"
data-field="nav.<%index%>.url.url" placeholder="链接"/>
<input value="[[item.url.url]]" class=" form-control observe" required="required"
data-field="nav.[[index]].url.url" placeholder="链接"/>
<p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
</div>
</div>
</td>
</tr>
<%/each%>
[[/each]]
</tbody>
</table>
</div>
... ... @@ -345,38 +345,38 @@
<div class="panel-body">
<div>
<ul class="draggable" data-array="data">
<%each contentData.data as item index%>
[[each contentData.data as item index]]
<li>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<tbody>
<tr>
<td align="center">
<%index+1%>
[[index+1]]
</td>
<td align="center">
<div class="form-group">
<div class="col-sm-10">
<input type="file" name="file" value="<%item.image.src%>" class="form-control observe" data-field="<%index%>.image.src" required placeholder="图片"/>
<input type="file" name="file" value="[[item.image.src]]" class="form-control observe" data-field="[[index]].image.src" required placeholder="图片"/>
</div>
</div>
</td>
<td>
<div class="form-group">
<div class="col-sm-10">
<input value="<%item.couponID%>" id="couponID" class="form-control observe" required="required" data-field="<%index%>.couponID" placeholder="领券码"/>
<input value="[[item.couponID]]" id="couponID" class="form-control observe" required="required" data-field="[[index]].couponID" placeholder="领券码"/>
<p style="color:#999;margin-top: 5px;">多个领券码以英文逗号隔开</p>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<select name="goTo" class="form-control observe" value="<%item.image.url.action%>" data-field="<%index%>.image.url.action">
<%layout action_template%>
<select name="goTo" class="form-control observe" value="[[item.image.url.action]]" data-field="[[index]].image.url.action">
[[layout action_template]]
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input value="<%item.image.url.url%>" class="form-control observe" required="required" data-field="<%index%>.image.url.url" placeholder="图片链接" type="text"/>
<input value="[[item.image.url.url]]" class="form-control observe" required="required" data-field="[[index]].image.url.url" placeholder="图片链接" type="text"/>
<p style="color:#999;margin-top: 5px;">链接中不能有英文单引号</p>
</div>
</div>
... ... @@ -385,7 +385,7 @@
</tbody>
</table>
</li>
<%/each%>
[[/each]]
</ul>
</div>
<a href="JavaScript:;" id="coupon-addOne" data-event="getCoupon.data" class="btn btn-primary btn-xs addBtn">添加一个</a>
... ...
This diff could not be displayed because it is too large.
<%else if module.contentData.template_name=='focus'%>
[[else if module.contentData.template_name=='focus']]
<div class="focus">
<div class="focus-pic-list">
<img src="<%module.contentData.data[0].src%>">
<img src="[[module.contentData.data[0].src]]">
</div>
</div>
<%else if module.contentData.template_name=='appIconList'%>
[[else if module.contentData.template_name=='appIconList']]
<div class="custom-pic">
<ul class="custom-pic clearfix image-list-box resource-row li<%module.contentData.number%>">
<%each module.contentData.data as item index%>
<li><img src="<%item.src%>" class="custom-pic-img" style="margin:2px;"></li>
<%/each%>
<ul class="custom-pic clearfix image-list-box resource-row li[[module.contentData.number]]">
[[each module.contentData.data as item index]]
<li><img src="[[item.src]]" class="custom-pic-img" style="margin:2px;"></li>
[[/each]]
</ul>
<%else if module.contentData.template_name=='recommendContentOne'%>
[[else if module.contentData.template_name=='recommendContentOne']]
<div class="recommend_content_one">
<div class="recommend-info">
<p class="title"><%module.contentData.data.title.name%><a class="more" href="#"><%module.contentData.data.title.more_name%></a>
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a>
</p>
<p class="big-pic"><img src="<%module.contentData.data.big_image[0].src%>"></p>
<p class="big-pic"><img src="[[module.contentData.data.big_image[0].src]]"></p>
<ul class="small-pic">
<%each module.contentData.data.list as item index%>
<li class="li_<%index%>"><img src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data.list as item index]]
<li class="li_[[index]]"><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
</div>
<%else if module.contentData.template_name=='recommendContentTwo'%>
[[else if module.contentData.template_name=='recommendContentTwo']]
<div class="recommend_content_two">
<div class="recommend-info">
<p class="title"><%module.contentData.data.title.name%><a class="more" href="#"><%module.contentData.data.title.more_name%></a>
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a>
</p>
<p class="big-pic"><img src="<%module.contentData.data.big_image[0].src%>"></p>
<p class="big-pic"><img src="[[module.contentData.data.big_image[0].src]]"></p>
<ul class="small-pic">
<%each module.contentData.data.list as item index%>
<li class="li_<%index%>"><img src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data.list as item index]]
<li class="li_[[index]]"><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
</div>
<%else if module.contentData.template_name=='singleNameImage'%>
[[else if module.contentData.template_name=='singleNameImage']]
<div class="single_name_image">
<div class="single-info">
<span class="title"
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;"><%module.contentData.data.title%></span>
<img src="<%module.contentData.data.src%>" style="width:100%">
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title]]</span>
<img src="[[module.contentData.data.src]]" style="width:100%">
</div>
</div>
<%else if module.contentData.template_name=='recommendContentThree'%>
[[else if module.contentData.template_name=='recommendContentThree']]
<div class="recommend_content_three">
<div class="recommend-info">
<p class="big-pic"><img src="<%module.contentData.data.big_image[0].src%>"></p>
<p class="big-pic"><img src="[[module.contentData.data.big_image[0].src]]"></p>
<ul class="small-pic">
<%each module.contentData.data.list as item index%>
<li class="li_<%index%>"><img src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data.list as item index]]
<li class="li_[[index]]"><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
</div>
<%else if module.contentData.template_name=='recommendContentThree'%>
[[else if module.contentData.template_name=='recommendContentThree']]
<div class="recommend_content_three">
<div class="recommend-info">
<p class="big-pic"><img src="<%module.contentData.data.big_image[0].src%>"></p>
<p class="big-pic"><img src="[[module.contentData.data.big_image[0].src]]"></p>
<ul class="small-pic">
<%each module.contentData.data.list as item index%>
<li class="li_<%index%>"><img src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data.list as item index]]
<li class="li_[[index]]"><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
</div>
<%else if module.contentData.template_name=='trendsetterCollocation'%>
[[else if module.contentData.template_name=='trendsetterCollocation']]
<div class="big-pic">
<div class="wordText">
<span>潮人搭配</span>
</div>
</div>
<%else if module.contentData.template_name=='trendgoodsTopic'%>
[[else if module.contentData.template_name=='trendgoodsTopic']]
<div class="big-pic">
<div class="wordText">
<span>潮品话题</span>
</div>
</div>
<%else if module.contentData.template_name=='appHotBrands'%>
[[else if module.contentData.template_name=='appHotBrands']]
<div class="form-group">
<div class="row title">
<%module.contentData.data.title.title%>
[[module.contentData.data.title.title]]
</div>
<div class="col-sm-12">
<ul class="custom-pic clearfix">
<%each module.contentData.data.list as item index%>
[[each module.contentData.data.list as item index]]
<li>
<img src="<%item.src%>" class="custom-pic-img" style="margin:2px;">
<img src="[[item.src]]" class="custom-pic-img" style="margin:2px;">
</li>
<%/each%>
<%if module.contentData.data.image.src!=''%>
[[/each]]
[[if module.contentData.data.image.src!='']]
<li>
<img src="<%module.contentData.data.image.src%>" class="custom-pic-img" style="margin:2px;">
<img src="[[module.contentData.data.image.src]]" class="custom-pic-img" style="margin:2px;">
</li>
<%/if%>
[[/if]]
</ul>
</div>
</div>
<%else if module.contentData.template_name=='customBrands'%>
[[else if module.contentData.template_name=='customBrands']]
<div class="custom-pic">
<div class="custom-brand-title row title"><%module.contentData.data.title.title%></div>
<div class="custom-brand-title row title">[[module.contentData.data.title.title]]</div>
<ul class="custom-pic clearfix">
<%each module.contentData.data.list as item index%>
<li><img src="<%item.src%>" class="custom-pic-img" style="margin:2px;"></li>
<%/each%>
[[each module.contentData.data.list as item index]]
<li><img src="[[item.src]]" class="custom-pic-img" style="margin:2px;"></li>
[[/each]]
</ul>
</div>
<%else if module.contentData.template_name=='promotion'%>
[[else if module.contentData.template_name=='promotion']]
<div class="link">
<div class="wordText">
<span>促销专区</span>
</div>
</div>
<%else if module.contentData.template_name=='carouselBanner'%>
[[else if module.contentData.template_name=='carouselBanner']]
<div class="focus">
<div class="focus-pic-list"><img src="<%module.contentData.data.list[0].src%>"></div>
<div class="focus-pic-list"><img src="[[module.contentData.data.list[0].src]]"></div>
</div>
<%else if module.contentData.template_name=='kidsBrands'%>
[[else if module.contentData.template_name=='kidsBrands']]
<div class="hot-brand-list">
<div class="hot-brand-title row title">kids推荐品牌</div>
<ul class="hot-brand-list">
<%each module.contentData.data.list as item index%>
<li data-toggle="brands"><img src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data.list as item index]]
<li data-toggle="brands"><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
<%else if module.contentData.template_name=='recommendContentFour'%>
[[else if module.contentData.template_name=='recommendContentFour']]
<div class="recommend_content_four">
<div class="recommend-info">
<div class="left" style="width:50%;float:left">
<img src="<%module.contentData.data.left.list[0].src%>" width="100%" height="200">
<img src="[[module.contentData.data.left.list[0].src]]" width="100%" height="200">
<p class="left_title"><%module.contentData.data.left.title%></p>
<p class="left_title">[[module.contentData.data.left.title]]</p>
</div>
<div class="right" style="width:50%;float:left">
<ul class="right-pic">
<%each module.contentData.data.right.list as item index%>
<li class="li_<%index%>"><img src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data.right.list as item index]]
<li class="li_[[index]]"><img src="[[item.src]]"></li>
[[/each]]
</ul>
<p class="right_title"><%module.contentData.data.right.title%></p>
<p class="right_title">[[module.contentData.data.right.title]]</p>
</div>
</div>
</div>
<%else if module.contentData.template_name=='addfloor'%>
[[else if module.contentData.template_name=='addfloor']]
<div class="app_icon_list">
<ul class="icon-list clearfix">
<%each module.contentData.data as item index%>
<li style="width:75px; float:left;margin-left:5px;"><img src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data as item index]]
<li style="width:75px; float:left;margin-left:5px;"><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
<%else if module.contentData.template_name=='recommendContentFive'%>
[[else if module.contentData.template_name=='recommendContentFive']]
<div class="recommend_content_five">
<div class="recommend-info">
<span class="title"
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;"><%module.contentData.data.title.title%></span>
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title.title]]</span>
<ul class="small-pic">
<%each module.contentData.data.list as item index%>
<li class="li_<%index%>"><img src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data.list as item index]]
<li class="li_[[index]]"><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
</div>
<%else if module.contentData.template_name=='textNav'%>
[[else if module.contentData.template_name=='textNav']]
<div class="textNav">
<div class="wordText">
<span>文本导航</span>
</div>
</div>
<%else if module.contentData.template_name=='imageList'%>
[[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 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<%module.contentData.data.title.column_num%>">
<%each module.contentData.data.list as item index%>
<li><img src="<%item.src%>"></li>
<%/each%>
<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]]
</ul>
</div>
<%else if module.contentData.template_name=='title'%>
[[else if module.contentData.template_name=='title']]
<div class="custom-pic">
<div class="wordText">
<span>标题标签</span>
</div>
</div>
<%else if module.contentData.template_name=='editorTalk'%>
[[else if module.contentData.template_name=='editorTalk']]
<div class="editorTalk_content">
<div class="editor-info">
<span class="title"
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;"><%module.contentData.data.title.title%></span>
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title.title]]</span>
<ul class="nav nav-tabs">
<%each module.contentData.data.list as item index%>
<li class="li_<%index%>">
[[each module.contentData.data.list as item index]]
<li class="li_[[index]]">
<a href="javascript:void(0);" data-toggle="tab"></a>
</li>
<%/each%>
[[/each]]
</ul>
<div class="tab-content">
<%each module.contentData.data.list as item index%>
<div class="tab-pane fade tab_<%index%>">
<img src="<%item.src%>" style="width:23%">
[[each module.contentData.data.list as item index]]
<div class="tab-pane fade tab_[[index]]">
<img src="[[item.src]]" style="width:23%">
</div>
<%/each%>
[[/each]]
</div>
</div>
</div>
<%else if module.contentData.template_name=='hotCategory'%>
[[else if module.contentData.template_name=='hotCategory']]
<div class="hotCategory-info">
<div style="width:100%;height:100%;background-color: #fff;padding-top:3px" ;="">
<div style="margin:0 auto;border:1px solid #000;width:40%;font-size:1px;text-align:center;margin-bottom:10px;"><%module.contentData.data.title.name%></div>
<div style="margin-right:10px;float:right;width:40px;margin-top:-27px;font-size:1px;"><%module.contentData.data.title.more_name%></div>
<div style="margin:0 auto;border:1px solid #000;width:40%;font-size:1px;text-align:center;margin-bottom:10px;">[[module.contentData.data.title.name]]</div>
<div style="margin-right:10px;float:right;width:40px;margin-top:-27px;font-size:1px;">[[module.contentData.data.title.more_name]]</div>
<div style="clear:both;"></div>
<div style="width:150px;float:right;">
<%each module.contentData.data.imgs as item index%>
<%if (index != 0 && module.contentData.data.imgs.length == 7) || (index % 4 != 0 && module.contentData.data.imgs.length == 8)%>
<img style="width:45px;height:90px;margin-left:5px;margin-bottom:10px;float:left;" src="<%item.src%>">
<%/if%>
<%/each%>
[[each module.contentData.data.imgs as item index]]
[[if (index != 0 && module.contentData.data.imgs.length == 7) || (index % 4 != 0 && module.contentData.data.imgs.length == 8)]]
<img style="width:45px;height:90px;margin-left:5px;margin-bottom:10px;float:left;" src="[[item.src]]">
[[/if]]
[[/each]]
<div style="clear:both"></div>
</div>
<div style="width:5px;height:100%;float:right;">
</div>
<div style="width:100px;height:100%;float:right;">
<%each module.contentData.data.imgs as item index%>
<%if (index == 0 && module.contentData.data.imgs.length == 7) || (index % 4 == 0 && module.contentData.data.imgs.length == 8)%>
<img style="width:100px;height:100%;" src="<%module.contentData.data.imgs[index].src%>">
<%/if%>
<%/each%>
[[each module.contentData.data.imgs as item index]]
[[if (index == 0 && module.contentData.data.imgs.length == 7) || (index % 4 == 0 && module.contentData.data.imgs.length == 8)]]
<img style="width:100px;height:100%;" src="[[module.contentData.data.imgs[index].src]]">
[[/if]]
[[/each]]
</div>
<div style="width:5px;height:100%;float:right;">
</div>
<div style="width:70px;float:left;">
<div style="height:70px;width:100%">
<%each module.contentData.data.blocks as item index%>
<img style="height:22px;width:100%;margin-bottom:2px;" src="<%item.src%>">
<%/each%>
[[each module.contentData.data.blocks as item index]]
<img style="height:22px;width:100%;margin-bottom:2px;" src="[[item.src]]">
[[/each]]
</div>
<div style="height:70px;width:100%">
<%each module.contentData.data.list as item index%>
<div style="height:22px;width:50%;margin-bottom:2px;font-size:1px;float:left"><%item.name.length>2?item.name.substring(0,2):item.name%></div>
<%/each%>
[[each module.contentData.data.list as item index]]
<div style="height:22px;width:50%;margin-bottom:2px;font-size:1px;float:left">[[item.name.length>2?item.name.substring(0,2):item.name]]</div>
[[/each]]
<div style="clear:both"></div>
</div>
</div>
<div style="clear:both"></div>
</div>
</div>
<%else if module.contentData.template_name=='debrisSlider'%>
[[else if module.contentData.template_name=='debrisSlider']]
<div class="debris_slider">
<div class="debris-info">
<ul style="float:left;width:80px;">
<%each module.contentData.data.left as item index%>
<li><img width="80px" height="76px" src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data.left as item index]]
<li><img width="80px" height="76px" src="[[item.src]]"></li>
[[/each]]
</ul>
<div style="float:left;width:160px;">
<img width="160px" height="180px" src="<%module.contentData.data.big_image[0].src%>">
<img width="160px" height="180px" src="[[module.contentData.data.big_image[0].src]]">
</div>
<ul style="float:left;width:80px;">
<%each module.contentData.data.right as item index%>
<li><img width="80px" height="76px" src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data.right as item index]]
<li><img width="80px" height="76px" src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
</div>
<%else if module.contentData.template_name=='newUserFloor'%>
[[else if module.contentData.template_name=='newUserFloor']]
<div class="new_user_floor">
<div class="user_floor">
<p class="title"><%module.contentData.data.title.name%><a class="more" href="#"><%module.contentData.data.title.more_name%></a>
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a>
</p>
<p class="banner-pic"><img src="<%module.contentData.data.banner_image[0].src%>" width="96%"></p>
<p class="banner-pic"><img src="[[module.contentData.data.banner_image[0].src]]" width="96%"></p>
</div>
</div>
<%else if module.contentData.template_name=='imageGroup'%>
[[else if module.contentData.template_name=='imageGroup']]
<div class="custom-pic">
<ul class="custom-pic clearfix image-list-box resource-row li<%module.contentData.data.show_num%>">
<%each module.contentData.data.list as item index%>
<li><img src="<%item.src%>" class="custom-pic-img" style="margin:2px;"></li>
<%/each%>
<ul class="custom-pic clearfix image-list-box resource-row li[[module.contentData.data.show_num]]">
[[each module.contentData.data.list as item index]]
<li><img src="[[item.src]]" class="custom-pic-img" style="margin:2px;"></li>
[[/each]]
</ul>
</div>
<%else if module.contentData.template_name=='paramsGroup'%>
[[else if module.contentData.template_name=='paramsGroup']]
<div class="custom-group-list">
<div class="wordText">
<span>自定义参数</span>
</div>
</div>
<%else if module.contentData.template_name=='自定义参数图片'%>
[[else if module.contentData.template_name=='自定义参数图片']]
<div class="custom-group-list">
</div>
<%else if module.contentData.template_name=='announcement'%>
[[else if module.contentData.template_name=='announcement']]
<div class="custom-group-list">
<div class="wordText">
<span>站内公告</span>
</div>
</div>
<%else if module.contentData.template_name=='titleImage'%>
[[else if module.contentData.template_name=='titleImage']]
<div class="editorTalk_content">
<div class="editor-info">
<span class="title"
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;"><%module.contentData.data.title%></span>
<img src="<%module.contentData.data.image.src%>" style="width:99%">
style="min-height:50px; display:block; border-radius:5px; border:1px solid #ccc; margin-top:10px;">[[module.contentData.data.title]]</span>
<img src="[[module.contentData.data.image.src]]" style="width:99%">
</div>
</div>
<%else if module.contentData.template_name=='multiLabelImage'%>
[[else if module.contentData.template_name=='multiLabelImage']]
<div class="editorTalk_content">
<div class="editor-info">
<%each module.contentData.data.label as item index%>
<span class="title"><%item.title%></span>
<%/each%>
<img src="<%module.contentData.data.image[0].src%>" style="width:99%">
[[each module.contentData.data.label as item index]]
<span class="title">[[item.title]]</span>
[[/each]]
<img src="[[module.contentData.data.image[0].src]]" style="width:99%">
</div>
</div>
<%else if module.contentData.template_name=='matchImage'%>
[[else if module.contentData.template_name=='matchImage']]
<div class="match_image">
<div class='row title'><%module.contentData.data.title.name%></div>
<div class='row title'>[[module.contentData.data.title.name]]</div>
<div class='row'>
<%each module.contentData.data.top_image as item index%>
<div class='col-sm-6 matchImage'><img src="<%item.src%>"></div>
<%/each%>
[[each module.contentData.data.top_image as item index]]
<div class='col-sm-6 matchImage'><img src="[[item.src]]"></div>
[[/each]]
</div>
<div class='row'>
<%each module.contentData.data.list as item index%>
<div class='col-sm-4 matchImage'><img src="<%item.src%>"></div>
<%/each%>
[[each module.contentData.data.list as item index]]
<div class='col-sm-4 matchImage'><img src="[[item.src]]"></div>
[[/each]]
</div>
</div>
<%else if module.contentData.template_name=='getCoupon'%>
[[else if module.contentData.template_name=='getCoupon']]
<div class="getCoupon">
<div class='row title'><%module.contentData.template_intro%></div>
<div class='row title'>[[module.contentData.template_intro]]</div>
<div class='row'>
<%each module.contentData.data as item index%>
<div class='col-sm-6 matchImage'><img src="<%item.image.src%>"></div>
<%/each%>
[[each module.contentData.data as item index]]
<div class='col-sm-6 matchImage'><img src="[[item.image.src]]"></div>
[[/each]]
</div>
</div>
<%else if module.contentData.template_name=='NL2R'%>
[[else if module.contentData.template_name=='NL2R']]
<div class="NL2R">
<div class="row">
<div class="col-sm-8 matchImage" style="margin-bottom: 0;padding: 0">
<img src="<%module.contentData.data.left.length ? module.contentData.data.left[0].src : ''%>">
<img src="[[module.contentData.data.left.length ? module.contentData.data.left[0].src : '']]">
<p class="clearfix" style="position: absolute;bottom: -10px;right: 10px;">
<%each module.contentData.data.left as item index%>
[[each module.contentData.data.left as item index]]
<a style="box-sizing: border-box;display: block;width: 5px;height: 5px;background: #f00;border-radius: 5px;float: left;margin: 3px;"></a>
<%/each%>
[[/each]]
</p>
</div>
<div class="col-sm-4 matchImage" style="margin-bottom: 0;padding: 0">
<%each module.contentData.data.right as item index%>
<img style="height: 50%;width: 100%" src="<%item.src%>">
<%/each%>
[[each module.contentData.data.right as item index]]
<img style="height: 50%;width: 100%" src="[[item.src]]">
[[/each]]
</div>
</div>
</div>
<%else if module.contentData.template_name=='outletsHotBrands'%>
[[else if module.contentData.template_name=='outletsHotBrands']]
<div class="outletsHotBrands">
</div>
<%else if module.contentData.template_name=='threePicture'%>
[[else if module.contentData.template_name=='threePicture']]
<div class="threePicture">
<div class="row">
<ul class="custom-pic clearfix image-list-box resource-row li3">
<%each module.contentData.data as item index%>
<li><img src="<%item.src%>"></li>
<%/each%>
[[each module.contentData.data as item index]]
<li><img src="[[item.src]]"></li>
[[/each]]
</ul>
</div>
</div>
<%else if module.contentData.template_name=='recommendCategory'%>
[[else if module.contentData.template_name=='recommendCategory']]
<div class="custom-pic">
<p class="title"><%module.contentData.data.title%></p>
<p class="title">[[module.contentData.data.title]]</p>
<ul class="custom-pic clearfix image-list-box resource-row li4">
<%each module.contentData.data.categoryList as item index%>
<li><img src="<%item.navigateImageSrcApp%>"></li>
<%/each%>
[[each module.contentData.data.categoryList as item index]]
<li><img src="[[item.navigateImageSrcApp]]"></li>
[[/each]]
</ul>
</div>
<%else if module.contentData.template_name=='categoryNavigation'%>
[[else if module.contentData.template_name=='categoryNavigation']]
<div class="categoryNavigation">
<%each module.contentData.data as item index%>
<label style="background-color: white;padding: 5px"><%item.categoryName%></label>
<%/each%>
[[each module.contentData.data as item index]]
<label style="background-color: white;padding: 5px">[[item.categoryName]]</label>
[[/each]]
</div>
<%else if module.contentData.template_name=='discountActivity'%>
[[else if module.contentData.template_name=='discountActivity']]
<div class="discountActivity">
<div class="recommend-info">
<%if module.contentData.data.title.name%>
<p class="title"><%module.contentData.data.title.name%><a class="more" href="#"><%module.contentData.data.title.more_name%></a></p>
<%/if%>
<%each module.activities as item index%>
[[if module.contentData.data.title.name]]
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a></p>
[[/if]]
[[each module.activities as item index]]
<div class="col-sm-12 matchImage" style="margin-bottom: 15px">
<img src="<%item.coverUrl%>">
<p><%item.promotionName%></p>
<img src="[[item.coverUrl]]">
<p>[[item.promotionName]]</p>
</div>
<%/each%>
[[/each]]
</div>
</div>
<%else if module.contentData.template_name=='vipFloor'%>
[[else if module.contentData.template_name=='vipFloor']]
<div class="vipFloor">
<div class="recommend-info">
<%if module.contentData.data.title.name%>
<p class="title"><%module.contentData.data.title.name%>(商品池:<%module.contentData.data.title.productPoolId%>)<a class="more" href="#"><%module.contentData.data.title.more_name%></a></p>
<%/if%>
[[if module.contentData.data.title.name]]
<p class="title">[[module.contentData.data.title.name]](商品池:[[module.contentData.data.title.productPoolId]])<a class="more" href="#">[[module.contentData.data.title.more_name]]</a></p>
[[/if]]
<p class="big-pic"><img src="<%module.contentData.data.image[0].src%>"></p>
<p class="big-pic"><img src="[[module.contentData.data.image[0].src]]"></p>
</div>
</div>
<%else if module.contentData.template_name=='offCodeArea'%>
[[else if module.contentData.template_name=='offCodeArea']]
<div class="offCodeArea">
<div class="recommend-info">
<%if module.contentData.data.title.name%>
<p class="title"><%module.contentData.data.title.name%><a class="more" href="#"><%module.contentData.data.title.more_name%></a></p>
<%/if%>
[[if module.contentData.data.title.name]]
<p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a></p>
[[/if]]
<p class="big-pic"><img src="<%module.contentData.data.list[0].src%>"></p>
<p class="big-pic"><img src="[[module.contentData.data.list[0].src]]"></p>
<div class="col-sm-6 matchImage" style="padding-left: 3px">
<img src="<%module.contentData.data.list[1].src%>">
<img src="[[module.contentData.data.list[1].src]]">
</div>
<div class="col-sm-6 matchImage">
<img style="height: 50%;width: 100%" src="<%module.contentData.data.list[2].src%>">
<img style="height: 50%;width: 100%" src="<%module.contentData.data.list[3].src%>">
<img style="height: 50%;width: 100%" src="[[module.contentData.data.list[2].src]]">
<img style="height: 50%;width: 100%" src="[[module.contentData.data.list[3].src]]">
</div>
</div>
</div>
\ No newline at end of file
... ...
<script type="text/template" id="template_content">
<!-- 文本内容 -->
<%each modules as module index%>
<li class="form-group custom-group dragItem" 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'%>
[[each modules as module index]]
<li class="form-group custom-group dragItem" 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']]
<div class="col-sm-12">
<img src="<%module.contentData.data[0].src%>" title="<%module.contentData.data[0].title%>">
<img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
</div>
<%else if module.contentData.template_name=='smallPic'%>
<%each module.contentData.data as item i%>
[[else if module.contentData.template_name=='smallPic']]
[[each module.contentData.data as item i]]
<div class="col-sm-6">
<img src="<%item.src%>" title="<%item.title%>">
<img src="[[item.src]]" title="[[item.title]]">
</div>
<%/each%>
<%else if module.contentData.template_name=='goods'%>
<%each module.contentData.data as item i%>
[[/each]]
[[else if module.contentData.template_name=='goods']]
[[each module.contentData.data as item i]]
<div class="col-sm-6">
<img src="<%item.src%>" title="<%item.title%>">
<img src="[[item.src]]" title="[[item.title]]">
</div>
<%/each%>
<%else if module.contentData.template_name=='link'%>
[[/each]]
[[else if module.contentData.template_name=='link']]
<div class="col-sm-12">
<div class="wordText">
<span>一个链接</span>
</div>
</div>
<%else if module.contentData.template_name=='goodsGroup'%>
[[else if module.contentData.template_name=='goodsGroup']]
<div class="form-group">
<%each module.contentData.data as items i%>
[[each module.contentData.data as items i]]
<div class="col-sm-3">
<img src="<%items.cover.cover%>" >
<img src="[[items.cover.cover]]" >
</div>
<%/each%>
[[/each]]
</div>
<%each module.contentData.data[0].list as item index%>
[[each module.contentData.data[0].list as item index]]
<div class="col-sm-6">
<img src="<%item.src%>" title="<%item.id%>">
<img src="[[item.src]]" title="[[item.id]]">
</div>
<%/each%>
[[/each]]
</div>
<%include 'taoyu2'%>
<%/if%>
[[/if]]
<div class="actions-box">
<div class="actions-wrap">
<span class="edit" data-index="<%index%>">编辑</span>
<span class="del" data-index="<%index%>">删除</span>
<span class="edit" data-index="[[index]]">编辑</span>
<span class="del" data-index="[[index]]">删除</span>
</div>
</div>
</li>
<%/each%>
[[/each]]
</script>
<!-- 文本弹层 -->
<script type="text/template" id="template_dialog_text">
<div class="rows">
<textarea rows="2" class="form-control observe" placeholder="文章摘要" data-field="text" style="resize: none"><%contentData.data.text%></textarea>
<textarea rows="2" class="form-control observe" placeholder="文章摘要" data-field="text" style="resize: none">[[contentData.data.text]]</textarea>
</div>
</script>
... ... @@ -67,36 +67,36 @@
<div class="rows">
<div id="grid-baseFrom">
<ul class="draggable" data-array="data">
<%each contentData.data as item index%>
[[each contentData.data as item index]]
<li>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<tbody>
<tr>
<td align="center"><%index+1%></td>
<td align="center">[[index+1]]</td>
<td align="center">
<input type="file" name="file" id="src-<%index%>" value="<%item.src%>"
data-field="<%index%>.src" data-index="<%index%>" required/>
<input type="file" name="file" id="src-[[index]]" value="[[item.src]]"
data-field="[[index]].src" data-index="[[index]]" required/>
</td>
<td>
<div class="form-group">
<div class="col-sm-10">
<select class="form-control observe" data-field="<%index%>.url.action"
value='<%item.url?item.url.action:""%>'>
<%layout action_template%>
<select class="form-control observe" data-field="[[index]].url.action"
value='[[item.url?item.url.action:""]]'>
[[layout action_template]]
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input class="form-control observe" placeholder="跳转地址" data-field="<%index%>.url.url"
value="<%item.url?item.url.url:''%>"/>
<input class="form-control observe" placeholder="跳转地址" data-field="[[index]].url.url"
value="[[item.url?item.url.url:'']]"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input class="form-control observe" value="<%item.alt?item.alt:''%>" placeholder="图片描述"
data-field='<%index%>.alt'/>
<input class="form-control observe" value="[[item.alt?item.alt:'']]" placeholder="图片描述"
data-field='[[index]].alt'/>
</div>
</div>
</td>
... ... @@ -104,56 +104,56 @@
</tbody>
</table>
</li>
<%/each%>
[[/each]]
</ul>
</div>
</div>
</script>
<!--多张小图-->
<script type="text/template" id="smallPic-template">
<%if contentData.data.length%>
[[if contentData.data.length]]
<ul class="draggable" data-array="data">
<%each contentData.data as item index%>
[[each contentData.data as item index]]
<li>
<table class="table table-hover table-bordered responsive dataTable no-footer">
<tbody>
<tr>
<td align="center"><%index+1%></td>
<td align="center">[[index+1]]</td>
<td align="center">
<input type="file" name="file" id="src-<%index%>" value="<%item.src%>"
data-field="<%index%>.src" data-index="<%index%>" required/>
<input type="file" name="file" id="src-[[index]]" value="[[item.src]]"
data-field="[[index]].src" data-index="[[index]]" required/>
</td>
<td>
<div class="form-group">
<div class="col-sm-10">
<select class="form-control observe" data-field="<%index%>.url.action"
value='<%item.url?item.url.action:""%>'>
<%layout action_template%>
<select class="form-control observe" data-field="[[index]].url.action"
value='[[item.url?item.url.action:""]]'>
[[layout action_template]]
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input class="form-control observe" placeholder="跳转地址" data-field="<%index%>.url.url"
value="<%item.url?item.url.url:''%>"/>
<input class="form-control observe" placeholder="跳转地址" data-field="[[index]].url.url"
value="[[item.url?item.url.url:'']]"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<input class="form-control observe" value="<%item.alt?item.alt:''%>" placeholder="图片描述"
data-field='<%index%>.alt'/>
<input class="form-control observe" value="[[item.alt?item.alt:'']]" placeholder="图片描述"
data-field='[[index]].alt'/>
</div>
</div>
</td>
<td><button class="btn btn-danger btn-sm delBtn" data-event="smallPic.data" type="button" data-index="<%index%>">删除</button></td>
<td><button class="btn btn-danger btn-sm delBtn" data-event="smallPic.data" type="button" data-index="[[index]]">删除</button></td>
</tr>
</tbody>
</table>
</li>
<%/each%>
[[/each]]
</ul>
<%/if%>
[[/if]]
<p><input type="button" name="select-pic" class="btn btn-info btn-xs addBtn" value="继续添加" style="margin:10px;" data-event="smallPic.data"></p>
</ul>
</script>
... ... @@ -163,17 +163,17 @@
<div class="form-group">
<div class="col-sm-12">
<ul class="cover-image-list col-sm-10 imagegroup" id="goodspic">
<%each contentData.data as item index%>
[[each contentData.data as item index]]
<li class="cover-image-item image-list" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="<%item.src%>">
<img src="[[item.src]]">
</a>
<i class="remove-item-btn removepic glyphicon glyphicon-remove-circle"
data-index="<%index%>"></i>
data-index="[[index]]"></i>
</div>
</li>
<%/each%>
[[/each]]
</ul>
</div>
... ... @@ -187,16 +187,16 @@
</script>
<script type="text/template" id="template_dialog_goodsimgs">
<%each datas as data index%>
[[each datas as data index]]
<li class="cover-image-item image-list" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="<%data.src%>">
<img src="[[data.src]]">
</a>
<i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="<%index%>"></i>
<i class="remove-item-btn removepic glyphicon glyphicon-remove-circle" data-index="[[index]]"></i>
</div>
</li>
<%/each%>
[[/each]]
</script>
<!--添加商品/商品组--选择标签界面模板-->
... ... @@ -236,7 +236,7 @@
<!-- 推荐商品 -->
<script type="text/tempalte" id="template_dialog_remgoods">
<div class="rows" id="groupsgoods">
<%layout template_dialog_remgoodsgroup%>
[[layout template_dialog_remgoodsgroup]]
</div>
<div class="rows">
<div class="form-group">
... ... @@ -248,28 +248,28 @@
</script>
<script type="text/template" id="template_dialog_remgoodsgroup">
<%each contentData.data as items i%>
[[each contentData.data as items i]]
<div class="form-group">
<div class="col-sm-10">
<ul class="cover-image-list col-sm-10 imagegroup" data-i="<%i%>">
<%each items.list as item index%>
<ul class="cover-image-list col-sm-10 imagegroup" data-i="[[i]]">
[[each items.list as item index]]
<li class="cover-image-item image-list" data-index="2">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">
<img src="<%item.src%>">
<img src="[[item.src]]">
</a>
<i class="remove-item-btn removepic glyphicon glyphicon-remove-circle"
data-index="<%index%>"></i>
data-index="[[index]]"></i>
</div>
</li>
<%/each%>
[[/each]]
</ul>
</div>
<div class="col-sm-2">
<button class="btn btn-info goodsSelectBtn" type="button" data-index="<%i%>">选择标签</button>
<button class="btn btn-info goodsSelectBtn" type="button" data-index="[[i]]">选择标签</button>
</div>
</div>
<%/each%>
[[/each]]
</script>
<!-- 一个连接 -->
<script type="text/template" id="template_dialog_link">
... ... @@ -277,8 +277,8 @@
<div class="form-group">
<label class="col-sm-2 control-label">选择跳转目的地:</label>
<div class="col-sm-8">
<select class="form-control observe" data-field="0.url.action" value='<%contentData.data[0].url.action%>'>
<%layout action_template%>
<select class="form-control observe" data-field="0.url.action" value='[[contentData.data[0].url.action]]'>
[[layout action_template]]
</select>
</div>
... ... @@ -287,7 +287,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">跳转地址:</label>
<div class="col-sm-8">
<textarea rows="2" class="form-control observe" placeholder="跳转地址" data-field="0.url.url" style="resize: none;"><%contentData.data[0].url.url%></textarea>
<textarea rows="2" class="form-control observe" placeholder="跳转地址" data-field="0.url.url" style="resize: none;">[[contentData.data[0].url.url]]</textarea>
</div>
</div>
... ...
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="/resource/index/index">资源管理</a></li>
<li>资源内容管理</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>资源内容管理</h4>
</div>
</div>
</div>
</div>
</div>
<div class="allContents">
<div id="times-list">
... ... @@ -44,12 +23,12 @@
<div class="dataTab_wrapper" id="resourcePre">
<ul class="nav" style="padding: 0; margin: 0">
<input type="hidden" class="form-control"id="dateFromInfinity"value="1970-01-01 08:00:00">
<%each times as item index%>
<li class="<%index==selected?'active':''%> timesLi" data-index="<%index%>">
<input type="text" <%(item.time=="" || item.status == "进行中") ? "disabled" : (index==selected?"":"disabled")%> class="form-control preTimes" data-index="<%index%>" jsaction="time" id="dateFrom<%index%>" prompt="时间" value="<%item.time%>" readonly required>
<span style="display: block; line-height: 20px"><%item.status||"默认"%></span>
[[each times as item index]]
<li class="[[index==selected?'active':'']] timesLi" data-index="[[index]]">
<input type="text" [[(item.time=="" || item.status == "进行中") ? "disabled" : (index==selected?"":"disabled")]] class="form-control preTimes" data-index="[[index]]" jsaction="time" id="dateFrom[[index]]" prompt="时间" value="[[item.time]]" readonly required>
<span style="display: block; line-height: 20px">[[item.status||"默认"]]</span>
</li>
<%/each%>
[[/each]]
<input type="hidden" class="form-control"id="dateFromInfinity1"value="2970-01-01 08:00:00">
</ul>
</div>
... ... @@ -61,7 +40,7 @@
<div class="source-content" id="source-m">
<!-- left -->
<div class="content-left" id="contentLeft">
<h4 class="title" data-type="title" style="text-align: center"><%resource.name%></h4>
<h4 class="title" data-type="title" style="text-align: center">[[resource.name]]</h4>
<ul class="add-box showContain ui-sortable" id="add-content">
</ul>
<nav>
... ... @@ -77,9 +56,9 @@
</script>
<!-- 按钮 -->
<script type="text/template" id="template_content_btns">
<%each btns as btn index%>
<li><a href="javascript:void(0)" name="text" class="add_btn" data-index="<%index%>"><%btn.button_name%></a></li>
<%/each%>
[[each btns as btn index]]
<li><a href="javascript:void(0)" name="text" class="add_btn" data-index="[[index]]">[[btn.button_name]]</a></li>
[[/each]]
</script>
<%include '../__partail/actions'%>
... ...
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">资源管理</a></li>
<li>资源管理</li>
</ul>
<div>
<div style="width: 30%;float: left;">
<h4>资源管理</h4>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-heading">
<a class="btn btn-success " id="add-resource"><i class="fa fa-plus"></i> 添加资源位</a>
... ... @@ -54,18 +34,18 @@
<script type="text/template" id="search-category">
<select id="choose-category" title="" class="select2-offscreen brandBtn-group">
<option value="">选择分类</option>
<%each data as item index%>
<option value="<%item.sortId%>"><%item.sortName%></option>
<%/each%>
[[each data as item index]]
<option value="[[item.sortId]]">[[item.sortName]]</option>
[[/each]]
</select>
</script>
<script type="text/template" id="search-platform">
<select id="choose-platform" title="" class="select2-offscreen brandBtn-group">
<option value="">选择平台</option>
<%each data as item index%>
<option value="<%item.platformId%>"><%item.platformName%></option>
<%/each%>
[[each data as item index]]
<option value="[[item.platformId]]">[[item.platformName]]</option>
[[/each]]
</select>
</script>
... ... @@ -74,17 +54,17 @@
<div class="form-group">
<label class="col-sm-2 control-label">名称</label>
<div class="col-sm-8">
<input type="text" id="name" name="name" value="<%name%>" class="form-control" required>
<input type="text" id="name" name="name" value="[[name]]" class="form-control" required>
</div>
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-2 control-label">分类</label>
<div class="col-sm-8">
<select id="sortId" name="sortId" style="width: 160px;" value="<%sortId%>" required>
<select id="sortId" name="sortId" style="width: 160px;" value="[[sortId]]" required>
<option value="">请选择资源分类</option>
<%each resSorts as item index%>
<option value="<%item.sortId%>"><%item.sortName%></option>
<%/each%>
[[each resSorts as item index]]
<option value="[[item.sortId]]">[[item.sortName]]</option>
[[/each]]
</select>
</div>
</div><!-- form-group -->
... ... @@ -92,11 +72,11 @@
<div class="form-group">
<label class="col-sm-2 control-label">平台</label>
<div class="col-sm-8">
<select id="platformId" name="platformId" style="width: 160px;" value="<%platformId%>" required>
<select id="platformId" name="platformId" style="width: 160px;" value="[[platformId]]" required>
<option value="">请选择资源平台</option>
<%each resPlatforms as item index%>
<option value="<%item.platformId%>"><%item.platformName%></option>
<%/each%>
[[each resPlatforms as item index]]
<option value="[[item.platformId]]">[[item.platformName]]</option>
[[/each]]
</select>
</div>
</div><!-- form-group -->
... ... @@ -104,17 +84,17 @@
<div class="form-group" hidden id="code-content">
<label class="col-sm-2 control-label">位置码</label>
<div class="col-sm-8">
<input type="text" disabled="disabled" value="<%code%>" class="form-control">
<input type="text" disabled="disabled" value="[[code]]" class="form-control">
</div>
</div><!-- form-group -->
<div class="form-group">
<label class="col-sm-2 control-label">匹配码</label>
<div class="col-sm-8">
<input type="text" id="matchCode" value="<%matchCode%>" class="form-control">
<input type="text" id="matchCode" value="[[matchCode]]" class="form-control">
</div>
</div><!-- form-group -->
<input type="hidden" id="id" value="<%id%>">
<input type="hidden" id="id" value="[[id]]">
</div>
</script>
\ No newline at end of file
... ...
/**
* Created by JiangMin on 2016/4/18.
*/
var common=require('../../common/common');
var common=require('../../../common/common');
var Validate1 = {
"getCoupon": [
{
... ...
var $ = require('jquery'),
common = require('../common/common');
var Button = require('./partials/Button1');
var resourceObj = require('./partials/resourceObj');
var Validate = require('./partials/Validate1');
var addObj = require('./partials/addObj');
common = require('../../../common/common');
var Button = require('./../partials/Button1');
var resourceObj = require('./../partials/resourceObj');
var Validate = require('./../partials/Validate1');
var addObj = require('./../partials/addObj');
/*获取数据*/
var resources = [];
... ...
... ... @@ -4,8 +4,8 @@
*/
var $ = require('jquery'),
common = require('../common/common'),
util = require('../common/util');
common = require('../../../common/common'),
util = require('../../../common/util');
var resSorts = {},
resPlatforms = {};
... ...