Authored by 马力

Merge branch 'dev5.2' into test5.2

@@ -14,6 +14,7 @@ module.exports={ @@ -14,6 +14,7 @@ module.exports={
14 {name: "name", type: "string"}, 14 {name: "name", type: "string"},
15 {name: "sortId", type: "number"}, 15 {name: "sortId", type: "number"},
16 {name: "platformId", type: "number"}, 16 {name: "platformId", type: "number"},
  17 + {name: "code", type: "string"},
17 {name: "page", type: "number"} 18 {name: "page", type: "number"}
18 ] 19 ]
19 }, 20 },
@@ -8,6 +8,10 @@ @@ -8,6 +8,10 @@
8 <div class="col-sm-12"> 8 <div class="col-sm-12">
9 <img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]"> 9 <img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
10 </div> 10 </div>
  11 + [[else if module.contentData.template_name=='divideImage']]
  12 + <div class="col-sm-12">
  13 + <img src="[[module.contentData.data[0].src]]" title="[[module.contentData.data[0].title]]">
  14 + </div>
11 [[else if module.contentData.template_name=='smallPic']] 15 [[else if module.contentData.template_name=='smallPic']]
12 [[each module.contentData.data as item i]] 16 [[each module.contentData.data as item i]]
13 <div class="col-sm-6"> 17 <div class="col-sm-6">
@@ -69,19 +73,23 @@ @@ -69,19 +73,23 @@
69 </div> 73 </div>
70 [[/each]] 74 [[/each]]
71 [[else if module.contentData.template_name=='shopRecommend']] 75 [[else if module.contentData.template_name=='shopRecommend']]
72 - [[each module.contentData.data.list as item i]]  
73 <div class="shopRecommend"> 76 <div class="shopRecommend">
74 - <div class="recommend-info">  
75 <p class="title"><span>[[module.contentData.data.title.name]]</span> 77 <p class="title"><span>[[module.contentData.data.title.name]]</span>
76 </p> 78 </p>
  79 + [[each module.contentData.data.list as item i]]
  80 + [[if i == 0]]
  81 + <div class="recommend-info">
77 <p class="big-pic"><img src="[[item.src]]"></p> 82 <p class="big-pic"><img src="[[item.src]]"></p>
78 <ul class="small-pic"> 83 <ul class="small-pic">
79 <li class="li_[[0]]"><img src="[[item.goods0.src]]"></li> 84 <li class="li_[[0]]"><img src="[[item.goods0.src]]"></li>
80 <li class="li_[[1]]"><img src="[[item.goods1.src]]"></li> 85 <li class="li_[[1]]"><img src="[[item.goods1.src]]"></li>
81 </ul> 86 </ul>
82 </div> 87 </div>
83 - </div> 88 + [[/if]]
84 [[/each]] 89 [[/each]]
  90 +
  91 + </div>
  92 +
85 <%include 'taoyu2'%> 93 <%include 'taoyu2'%>
86 [[/if]] 94 [[/if]]
87 <div class="actions-box"> 95 <div class="actions-box">
@@ -178,6 +186,52 @@ @@ -178,6 +186,52 @@
178 </div> 186 </div>
179 </div> 187 </div>
180 </script> 188 </script>
  189 +<script type="text/template" id="divideImage-template">
  190 + <div class="rows">
  191 + <div id="baseForm">
  192 + <ul class="draggable" data-array="data">
  193 + [[each contentData.data as item index]]
  194 + <li>
  195 + <table class="table table-hover table-bordered responsive dataTable no-footer">
  196 + <tbody>
  197 + <tr>
  198 + <td align="center">[[index+1]]</td>
  199 + <td align="center">
  200 + <input type="file" name="file" id="src-[[index]]" value="[[item.src]]"
  201 + data-field="[[index]].src" data-index="[[index]]" required/>
  202 + </td>
  203 + <td>
  204 + <div class="form-group">
  205 + <div class="col-sm-10">
  206 + <select class="form-control observe" data-field="[[index]].url.action"
  207 + value='[[item.url?item.url.action:""]]'>
  208 + [[layout action_template]]
  209 + </select>
  210 + </div>
  211 + </div>
  212 +
  213 + <div class="form-group">
  214 + <div class="col-sm-10">
  215 + <input class="form-control observe" placeholder="跳转地址" data-field="[[index]].url.url"
  216 + value="[[item.url?item.url.url:'']]"/>
  217 + </div>
  218 + </div>
  219 + <div class="form-group">
  220 + <div class="col-sm-10">
  221 + <input class="form-control observe" value="[[item.alt?item.alt:'']]" placeholder="图片描述"
  222 + data-field='[[index]].alt'/>
  223 + </div>
  224 + </div>
  225 + </td>
  226 + </tr>
  227 + </tbody>
  228 + </table>
  229 + </li>
  230 + [[/each]]
  231 + </ul>
  232 + </div>
  233 + </div>
  234 + </script>
181 <!--多张小图--> 235 <!--多张小图-->
182 <script type="text/template" id="smallPic-template"> 236 <script type="text/template" id="smallPic-template">
183 [[if contentData.data.length]] 237 [[if contentData.data.length]]
@@ -14,6 +14,9 @@ @@ -14,6 +14,9 @@
14 <div class="panel-col"> 14 <div class="panel-col">
15 <input type="text" id="inputResourceName" placeholder="请输入资源名" class="form-control" /> 15 <input type="text" id="inputResourceName" placeholder="请输入资源名" class="form-control" />
16 </div> 16 </div>
  17 + <div class="panel-col">
  18 + <input type="text" id="inputResourceCode" placeholder="请输入位置码" class="form-control" />
  19 + </div>
17 <div class="panel-col" id="category-content"> 20 <div class="panel-col" id="category-content">
18 21
19 </div> 22 </div>
@@ -278,6 +278,20 @@ var Button = [ @@ -278,6 +278,20 @@ var Button = [
278 }] 278 }]
279 }, 279 },
280 { 280 {
  281 + template_intro: "分隔图",
  282 + dialog: "template_dialog_grid",
  283 + template_name: "deviceImage",
  284 + data: [{
  285 + "url": {
  286 + action: "",
  287 + url: ""
  288 + },
  289 + "alt": "",
  290 + "src": "",
  291 + "imgId": ""
  292 + }]
  293 + },
  294 + {
281 template_intro: "两张小图", 295 template_intro: "两张小图",
282 dialog: "template_dialog_grid", 296 dialog: "template_dialog_grid",
283 template_name: "smallPic", 297 template_name: "smallPic",
@@ -82,7 +82,7 @@ $(document).on("click", ".edit-btn", function () { @@ -82,7 +82,7 @@ $(document).on("click", ".edit-btn", function () {
82 new common.dialog({ 82 new common.dialog({
83 title: "温馨提示", 83 title: "温馨提示",
84 width: "360px", 84 width: "360px",
85 - content:newData.displayFirstSight == 1 ? "你确认将这个支付方式<font color='#5cb85c'>首次显示</font>在确认订单页面么?" : "你确认<font color='#ff0000'>取消</font>将这个支付方式首次显示在确认订单页面么?", 85 + content:newData.displayFirstSight == 1 ? "你确认将这个支付方式<font color='#5cb85c'>首次显示</font>吗?" : "你确认<font color='#ff0000'>取消</font>将这个支付方式首次显示吗?",
86 zIndex: 52, 86 zIndex: 52,
87 button:[ 87 button:[
88 {value: "确认", css:"btn-primary", callback: function () { 88 {value: "确认", css:"btn-primary", callback: function () {
@@ -21,6 +21,20 @@ var Button = [ @@ -21,6 +21,20 @@ var Button = [
21 }] 21 }]
22 }, 22 },
23 { 23 {
  24 + template_intro: "分隔图",
  25 + button_name: "分隔图",
  26 + dialog: "divideImage-template",
  27 + template_name: "divideImage",
  28 + data: [{
  29 + "url": {
  30 + "action": "",
  31 + "url": ""
  32 + },
  33 + "alt": "",
  34 + "src": "",
  35 + }]
  36 + },
  37 + {
24 button_name: "添加小图", 38 button_name: "添加小图",
25 template_name: "smallPic", 39 template_name: "smallPic",
26 dialog:"smallPic-template", 40 dialog:"smallPic-template",
@@ -157,6 +157,14 @@ var addObj = { @@ -157,6 +157,14 @@ var addObj = {
157 "src": "", 157 "src": "",
158 "imgId": "0" 158 "imgId": "0"
159 }, 159 },
  160 + divideImage_data:{
  161 + "url": {
  162 + "action": "",
  163 + "url": ""
  164 + },
  165 + "alt": "",
  166 + "src": "",
  167 + },
160 carouselBanner_list: {//轮播banner->banner 168 carouselBanner_list: {//轮播banner->banner
161 "src": "", 169 "src": "",
162 "url": {} 170 "url": {}
@@ -37,7 +37,8 @@ var g = new common.grid({ @@ -37,7 +37,8 @@ var g = new common.grid({
37 id: common.util.__input('inputResourceId'), 37 id: common.util.__input('inputResourceId'),
38 name: common.util.__input('inputResourceName'), 38 name: common.util.__input('inputResourceName'),
39 sortId: common.util.__input('choose-category'), 39 sortId: common.util.__input('choose-category'),
40 - platformId: common.util.__input('choose-platform') 40 + platformId: common.util.__input('choose-platform'),
  41 + code:common.util.__input('inputResourceCode')
41 }; 42 };
42 }, 43 },
43 columns:[ 44 columns:[
@@ -368,7 +368,8 @@ ul li, ol li{ @@ -368,7 +368,8 @@ ul li, ol li{
368 #source-m .content-right .shopRecommend .small-list{} 368 #source-m .content-right .shopRecommend .small-list{}
369 #source-m .content-right .shopRecommend .small-list li{float:left; width:180px;} 369 #source-m .content-right .shopRecommend .small-list li{float:left; width:180px;}
370 #source-m .content-right .shopRecommend .small-list li img{width:130px; height:130px;} 370 #source-m .content-right .shopRecommend .small-list li img{width:130px; height:130px;}
371 - 371 +#source-m .content-left .shopRecommend .big-pic {margin:0px}
  372 +#source-m .content-left .shopRecommend .recommend-info {margin:0 0 10px;}
372 /*锟斤拷銊拷锟介敍锟�1T-12F閿涳拷*/ 373 /*锟斤拷銊拷锟介敍锟�1T-12F閿涳拷*/
373 #source-m .content-left .recommend_content_three .small-pic {} 374 #source-m .content-left .recommend_content_three .small-pic {}
374 #source-m .content-left .recommend_content_three .small-pic li{ float:left;} 375 #source-m .content-left .recommend_content_three .small-pic li{ float:left;}