Authored by wangwei

Merge branch 'dev5.2' of http://git.yoho.cn/fe/yohobuy-portal-fe2 into dev5.2

# Conflicts:
#	code/apps/resource/views/__partail/taoyu.html
@@ -1031,13 +1031,23 @@ @@ -1031,13 +1031,23 @@
1031 <!--新人专享--> 1031 <!--新人专享-->
1032 <script type="text/template" id="newUserFloor-template"> 1032 <script type="text/template" id="newUserFloor-template">
1033 <div class="form-group"> 1033 <div class="form-group">
1034 - <div class="col-sm-6"> 1034 + <div class="col-sm-4">
1035 <label>标题</label>&emsp;&emsp;&emsp;&emsp; 1035 <label>标题</label>&emsp;&emsp;&emsp;&emsp;
1036 <input type="text" placeholder="标题" value="[[contentData.data.title.name]]" class="observe form-control input-form" data-field="title.name" required> 1036 <input type="text" placeholder="标题" value="[[contentData.data.title.name]]" class="observe form-control input-form" data-field="title.name" required>
1037 </div> 1037 </div>
1038 - <div class="col-sm-6"> 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:100px;" 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>
  1042 + <div class="col-sm-3">
  1043 + <label style="line-height: 40px; float: left; padding-right: 30px;">添加皮肤</label>&emsp;&emsp;
  1044 + <div style="float: left;">
  1045 + <input type="file" name="file" value="[[contentData.data.background?contentData.data.background.src:'']]" class="observe" data-field="background.src"/>
  1046 + </div>
  1047 + </div>
  1048 + <div class="col-sm-3">
  1049 + <label>背景色</label>&emsp;
  1050 + <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">
1041 </div> 1051 </div>
1042 </div> 1052 </div>
1043 <div class="form-group"> 1053 <div class="form-group">
@@ -1092,6 +1102,80 @@ @@ -1092,6 +1102,80 @@
1092 </ul> 1102 </ul>
1093 </div> 1103 </div>
1094 </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>
1095 <!--有序焦点--> 1179 <!--有序焦点-->
1096 <script type="text/template" id="debrisSlider-template"> 1180 <script type="text/template" id="debrisSlider-template">
1097 <div class="panel-body" id="debrisSlider-baseFrom"> 1181 <div class="panel-body" id="debrisSlider-baseFrom">
@@ -277,8 +277,25 @@ @@ -277,8 +277,25 @@
277 <div class="user_floor"> 277 <div class="user_floor">
278 <p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a> 278 <p class="title">[[module.contentData.data.title.name]]<a class="more" href="#">[[module.contentData.data.title.more_name]]</a>
279 </p> 279 </p>
280 -  
281 - <p class="banner-pic"><img src="[[module.contentData.data.banner_image[0].src]]" width="96%"></p> 280 + <p class="banner-pic">
  281 + <img src="[[module.contentData.data.banner_image[0].src]]" width="96%">
  282 + [[if module.contentData.data.background]]
  283 + <img src="[[module.contentData.data.background.src]]" width="96%">
  284 + [[/if]]
  285 + </p>
  286 + </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>
282 </div> 299 </div>
283 </div> 300 </div>
284 [[else if module.contentData.template_name=='imageGroup']] 301 [[else if module.contentData.template_name=='imageGroup']]
@@ -451,4 +468,4 @@ @@ -451,4 +468,4 @@
451 </div> 468 </div>
452 </div> 469 </div>
453 </div> 470 </div>
454 -</div>  
  471 +</div>
@@ -596,6 +596,41 @@ var Button = [ @@ -596,6 +596,41 @@ var Button = [
596 template_name: "newUserFloor", 596 template_name: "newUserFloor",
597 dialog: "newUserFloor-template", 597 dialog: "newUserFloor-template",
598 data: { 598 data: {
  599 + "background": {
  600 + "src":"",
  601 + "color":""
  602 + },
  603 + "title": {
  604 + "name": "",
  605 + "more_name": "",
  606 + "more_url": {
  607 + "action": "",
  608 + "url": ""
  609 + },
  610 + "active_id": ""
  611 + },
  612 + "banner_image": [
  613 + {
  614 + "src": "",
  615 + "url": {
  616 + "action": "",
  617 + "url": ""
  618 + },
  619 + "title": ""
  620 + }
  621 + ]
  622 + }
  623 + },
  624 + {
  625 + button_name: "人气单品",
  626 + template_intro: "人气单品",
  627 + template_name: "popularSingleProduct",
  628 + dialog: "popularSingleProduct-template",
  629 + data: {
  630 + "background": {
  631 + "src":"",
  632 + "color":""
  633 + },
599 "title": { 634 "title": {
600 "name": "", 635 "name": "",
601 "more_name": "", 636 "more_name": "",
@@ -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": {
@@ -307,4 +315,4 @@ var addObj = { @@ -307,4 +315,4 @@ var addObj = {
307 } 315 }
308 }; 316 };
309 317
310 -module.exports = addObj;  
  318 +module.exports = addObj;