Authored by liqingzhong

人气单品

@@ -1037,7 +1037,7 @@ @@ -1037,7 +1037,7 @@
1037 </div> 1037 </div>
1038 <div class="col-sm-2"> 1038 <div class="col-sm-2">
1039 <label>更多名称</label>&emsp;&emsp; 1039 <label>更多名称</label>&emsp;&emsp;
1040 - <input type="text" placeholder="更多名称" value="[[contentData.data.title.more_name]]" style="width:57px;" class="observe form-control input-form" data-field="title.more_name"> 1040 + <input type="text" placeholder="" value="[[contentData.data.title.more_name]]" style="width:57px;" class="observe form-control input-form" data-field="title.more_name">
1041 </div> 1041 </div>
1042 <div class="col-sm-3"> 1042 <div class="col-sm-3">
1043 <label style="line-height: 40px; float: left; padding-right: 30px;">添加皮肤</label>&emsp;&emsp; 1043 <label style="line-height: 40px; float: left; padding-right: 30px;">添加皮肤</label>&emsp;&emsp;
@@ -1102,6 +1102,80 @@ @@ -1102,6 +1102,80 @@
1102 </ul> 1102 </ul>
1103 </div> 1103 </div>
1104 </script> 1104 </script>
  1105 +<!-- 人气单品 -->
  1106 +<script type="text/template" id="popularSingleProduct-template">
  1107 + <div class="form-group">
  1108 + <div class="col-sm-4">
  1109 + <label>标题</label>&emsp;&emsp;&emsp;&emsp;
  1110 + <input type="text" placeholder="标题" value="[[contentData.data.title.name]]" class="observe form-control input-form" data-field="title.name" required>
  1111 + </div>
  1112 + <div class="col-sm-2">
  1113 + <label>更多名称</label>&emsp;&emsp;
  1114 + <input type="text" placeholder="" value="[[contentData.data.title.more_name]]" style="width:57px;" class="observe form-control input-form" data-field="title.more_name">
  1115 + </div>
  1116 + <div class="col-sm-3">
  1117 + <label style="line-height: 40px; float: left; padding-right: 30px;">添加皮肤</label>&emsp;&emsp;
  1118 + <div style="float: left;">
  1119 + <input type="file" name="file" value="[[contentData.data.background?contentData.data.background.src:'']]" class="observe" data-field="background.src"/>
  1120 + </div>
  1121 + </div>
  1122 + <div class="col-sm-3">
  1123 + <label>背景色</label>&emsp;
  1124 + <input type="text" placeholder="#FFFFFF" value="[[contentData.data.background?contentData.data.background.color:'']]" style="width:100px;" class="observe form-control input-form" data-field="background.color">
  1125 + </div>
  1126 + </div>
  1127 + <div class="form-group">
  1128 + <div class="col-sm-12">
  1129 + <label>更多链接</label>&emsp;&emsp;
  1130 + <select name="goTo" class="observe form-control input-form" value="[[contentData.data.title.more_url.action]]" data-field="title.more_url.action">
  1131 + [[layout action_template]]
  1132 + </select>
  1133 + <input type="text" placeholder="更多链接" value="[[contentData.data.title.more_url.url]]" class="observe form-control input-form" data-field="title.more_url.url"/>
  1134 + </div>
  1135 + </div>
  1136 + <div class="form-group">
  1137 + <div class="col-sm-10">
  1138 + <label>活动ID</label>&emsp;&emsp;&emsp;
  1139 + <input type="text" placeholder="活动id" class="observe form-control input-form" value="[[contentData.data.title.active_id]]" data-field="title.active_id">
  1140 + </div>
  1141 + </div>
  1142 + <p><input type="button" class="btn btn-info btn-xs addBtn" value="添加banner" style="margin:10px;" data-event="popularSingleProduct.banner_image"></p>
  1143 + <div id="popularSingleProduct-bottom">
  1144 + <ul class="draggable" data-array="data.banner_image">
  1145 + [[each contentData.data.banner_image as item index]]
  1146 + <li>
  1147 + <table class="table table-hover table-bordered responsive dataTable no-footer">
  1148 + <tbody>
  1149 + <tr>
  1150 + <td align="center">[[index+1]]</td>
  1151 + <td align="center"><input type="file" name="file" value="[[item.src]]" class="observe" data-field="banner_image.[[index]].src"/></td>
  1152 + <td>
  1153 + <div class="form-group">
  1154 + <div class="col-sm-10">
  1155 + <select name="goTo" class="form-control observe" value="[[item.url.action]]" data-field="banner_image.[[index]].url.action">
  1156 + [[layout action_template]]
  1157 + </select>
  1158 + </div>
  1159 + </div>
  1160 + <div class="form-group">
  1161 + <div class="col-sm-10">
  1162 + <input type="text" placeholder="url" value="[[item.url.url]]" class="form-control observe" required="required" data-field="banner_image.[[index]].url.url"/>
  1163 + </div>
  1164 + </div>
  1165 + <div class="form-group">
  1166 + <div class="col-sm-10">
  1167 + <input type="text" placeholder="图片描述" value="[[item.title]]" class="form-control observe" data-field="banner_image.[[index]].title"/>
  1168 + </div>
  1169 + </div>
  1170 + </td>
  1171 + </tr>
  1172 + </tbody>
  1173 + </table>
  1174 + </li>
  1175 + [[/each]]
  1176 + </ul>
  1177 + </div>
  1178 +</script>
1105 <!--有序焦点--> 1179 <!--有序焦点-->
1106 <script type="text/template" id="debrisSlider-template"> 1180 <script type="text/template" id="debrisSlider-template">
1107 <div class="panel-body" id="debrisSlider-baseFrom"> 1181 <div class="panel-body" id="debrisSlider-baseFrom">
@@ -285,6 +285,19 @@ @@ -285,6 +285,19 @@
285 </p> 285 </p>
286 </div> 286 </div>
287 </div> 287 </div>
  288 +[[else if module.contentData.template_name=='popularSingleProduct']]
  289 +<div class="popular_single_product">
  290 + <div class="single_floor">
  291 + <p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a>
  292 + </p>
  293 + <p class="banner-pic">
  294 + <img src="[[module.contentData.data.banner_image[0].src]]" width="96%">
  295 + [[if module.contentData.data.background]]
  296 + <img src="[[module.contentData.data.background.src]]" width="96%">
  297 + [[/if]]
  298 + </p>
  299 + </div>
  300 +</div>
288 [[else if module.contentData.template_name=='imageGroup']] 301 [[else if module.contentData.template_name=='imageGroup']]
289 <div class="custom-pic"> 302 <div class="custom-pic">
290 <ul class="custom-pic clearfix image-list-box resource-row li[[module.contentData.data.show_num]]"> 303 <ul class="custom-pic clearfix image-list-box resource-row li[[module.contentData.data.show_num]]">
@@ -622,6 +622,37 @@ var Button = [ @@ -622,6 +622,37 @@ var Button = [
622 } 622 }
623 }, 623 },
624 { 624 {
  625 + button_name: "人气单品",
  626 + template_intro: "人气单品",
  627 + template_name: "popularSingleProduct",
  628 + dialog: "popularSingleProduct-template",
  629 + data: {
  630 + "background": {
  631 + "src":"",
  632 + "color":""
  633 + },
  634 + "title": {
  635 + "name": "",
  636 + "more_name": "",
  637 + "more_url": {
  638 + "action": "",
  639 + "url": ""
  640 + },
  641 + "active_id": ""
  642 + },
  643 + "banner_image": [
  644 + {
  645 + "src": "",
  646 + "url": {
  647 + "action": "",
  648 + "url": ""
  649 + },
  650 + "title": ""
  651 + }
  652 + ]
  653 + }
  654 + },
  655 + {
625 button_name: "图片广告", 656 button_name: "图片广告",
626 template_intro: "带标题的图片广告", 657 template_intro: "带标题的图片广告",
627 template_name: "imageGroup", 658 template_name: "imageGroup",
@@ -78,6 +78,14 @@ var addObj = { @@ -78,6 +78,14 @@ var addObj = {
78 }, 78 },
79 "title": "" 79 "title": ""
80 }, 80 },
  81 + popularSingleProduct_banner_image: {// 人气单品->banner
  82 + "src": "",
  83 + "url": {
  84 + "action": "",
  85 + "url": ""
  86 + },
  87 + "title": ""
  88 + },
81 debrisSlider_left: {//有序焦点->左边的图 89 debrisSlider_left: {//有序焦点->左边的图
82 "src": "", 90 "src": "",
83 "url": { 91 "url": {
@@ -286,4 +294,4 @@ var addObj = { @@ -286,4 +294,4 @@ var addObj = {
286 } 294 }
287 }; 295 };
288 296
289 -module.exports = addObj;  
  297 +module.exports = addObj;