Authored by 马力

Merge branch 'dev5.2' into test5.2

... ... @@ -14,6 +14,7 @@ module.exports={
{name: "name", type: "string"},
{name: "sortId", type: "number"},
{name: "platformId", type: "number"},
{name: "code", type: "string"},
{name: "page", type: "number"}
]
},
... ...
... ... @@ -8,6 +8,10 @@
<div class="col-sm-12">
<img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
</div>
[[else if module.contentData.template_name=='divideImage']]
<div class="col-sm-12">
<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]]
<div class="col-sm-6">
... ... @@ -69,19 +73,23 @@
</div>
[[/each]]
[[else if module.contentData.template_name=='shopRecommend']]
[[each module.contentData.data.list as item i]]
<div class="shopRecommend">
<div class="recommend-info">
<p class="title"><span>[[module.contentData.data.title.name]]</span>
</p>
[[each module.contentData.data.list as item i]]
[[if i == 0]]
<div class="recommend-info">
<p class="big-pic"><img src="[[item.src]]"></p>
<ul class="small-pic">
<li class="li_[[0]]"><img src="[[item.goods0.src]]"></li>
<li class="li_[[1]]"><img src="[[item.goods1.src]]"></li>
</ul>
</div>
</div>
[[/if]]
[[/each]]
</div>
<%include 'taoyu2'%>
[[/if]]
<div class="actions-box">
... ... @@ -178,6 +186,52 @@
</div>
</div>
</script>
<script type="text/template" id="divideImage-template">
<div class="rows">
<div id="baseForm">
<ul class="draggable" data-array="data">
[[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">
<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>
</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:'']]"/>
</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'/>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</li>
[[/each]]
</ul>
</div>
</div>
</script>
<!--多张小图-->
<script type="text/template" id="smallPic-template">
[[if contentData.data.length]]
... ...
... ... @@ -14,6 +14,9 @@
<div class="panel-col">
<input type="text" id="inputResourceName" placeholder="请输入资源名" class="form-control" />
</div>
<div class="panel-col">
<input type="text" id="inputResourceCode" placeholder="请输入位置码" class="form-control" />
</div>
<div class="panel-col" id="category-content">
</div>
... ...
... ... @@ -278,6 +278,20 @@ var Button = [
}]
},
{
template_intro: "分隔图",
dialog: "template_dialog_grid",
template_name: "deviceImage",
data: [{
"url": {
action: "",
url: ""
},
"alt": "",
"src": "",
"imgId": ""
}]
},
{
template_intro: "两张小图",
dialog: "template_dialog_grid",
template_name: "smallPic",
... ...
... ... @@ -82,7 +82,7 @@ $(document).on("click", ".edit-btn", function () {
new common.dialog({
title: "温馨提示",
width: "360px",
content:newData.displayFirstSight == 1 ? "你确认将这个支付方式<font color='#5cb85c'>首次显示</font>在确认订单页面么?" : "你确认<font color='#ff0000'>取消</font>将这个支付方式首次显示在确认订单页面么?",
content:newData.displayFirstSight == 1 ? "你确认将这个支付方式<font color='#5cb85c'>首次显示</font>吗?" : "你确认<font color='#ff0000'>取消</font>将这个支付方式首次显示吗?",
zIndex: 52,
button:[
{value: "确认", css:"btn-primary", callback: function () {
... ...
... ... @@ -21,6 +21,20 @@ var Button = [
}]
},
{
template_intro: "分隔图",
button_name: "分隔图",
dialog: "divideImage-template",
template_name: "divideImage",
data: [{
"url": {
"action": "",
"url": ""
},
"alt": "",
"src": "",
}]
},
{
button_name: "添加小图",
template_name: "smallPic",
dialog:"smallPic-template",
... ...
... ... @@ -157,6 +157,14 @@ var addObj = {
"src": "",
"imgId": "0"
},
divideImage_data:{
"url": {
"action": "",
"url": ""
},
"alt": "",
"src": "",
},
carouselBanner_list: {//轮播banner->banner
"src": "",
"url": {}
... ...
... ... @@ -37,7 +37,8 @@ var g = new common.grid({
id: common.util.__input('inputResourceId'),
name: common.util.__input('inputResourceName'),
sortId: common.util.__input('choose-category'),
platformId: common.util.__input('choose-platform')
platformId: common.util.__input('choose-platform'),
code:common.util.__input('inputResourceCode')
};
},
columns:[
... ...
... ... @@ -368,7 +368,8 @@ ul li, ol li{
#source-m .content-right .shopRecommend .small-list{}
#source-m .content-right .shopRecommend .small-list li{float:left; width:180px;}
#source-m .content-right .shopRecommend .small-list li img{width:130px; height:130px;}
#source-m .content-left .shopRecommend .big-pic {margin:0px}
#source-m .content-left .shopRecommend .recommend-info {margin:0 0 10px;}
/*锟斤拷銊拷锟介敍锟�1T-12F閿涳拷*/
#source-m .content-left .recommend_content_three .small-pic {}
#source-m .content-left .recommend_content_three .small-pic li{ float:left;}
... ...