Authored by xuhongyun

build

@@ -531,12 +531,29 @@ webpackJsonp([137],{ @@ -531,12 +531,29 @@ webpackJsonp([137],{
531 $(document).on("click", ".edit", function () { 531 $(document).on("click", ".edit", function () {
532 var index = $(this).data("index"); 532 var index = $(this).data("index");
533 var item = Bll.contentDatas[currIndex][index]; 533 var item = Bll.contentDatas[currIndex][index];
534 - Bll.module = $.extend(true, {}, item);  
535 - Bll.toast(index, Bll.module);  
536 if(item.contentData.template_name=='shopRecommend'){ 534 if(item.contentData.template_name=='shopRecommend'){
  535 + var list = item.contentData.data.list;
  536 + for(var i = 0; i < list.length; i++) {
  537 + if(typeof(list[i].goods2) == 'undefined'){
  538 + console.log("shopRec","append");
  539 + var goods2 = {
  540 + "src":"",
  541 + "url":{
  542 + "url":"",
  543 + "action":""
  544 + }
  545 + };
  546 + list[i].goods2 = goods2;
  547 + }
  548 + }
  549 + Bll.module = $.extend(true, {}, item);
  550 + Bll.renderDialog("shopRecommend-template");
  551 + Bll.toast(index, Bll.module);
537 var _shopRecommendFlag = item.contentData.isShopRecommend==''?"N":item.contentData.isShopRecommend; 552 var _shopRecommendFlag = item.contentData.isShopRecommend==''?"N":item.contentData.isShopRecommend;
538 - item.contentData.isEdit="Y";  
539 changeShopRecommendDivShow(_shopRecommendFlag); 553 changeShopRecommendDivShow(_shopRecommendFlag);
  554 + }else{
  555 + Bll.module = $.extend(true, {}, item);
  556 + Bll.toast(index, Bll.module);
540 } 557 }
541 }); 558 });
542 559
@@ -2972,7 +2989,6 @@ webpackJsonp([137],{ @@ -2972,7 +2989,6 @@ webpackJsonp([137],{
2972 __title:"好店推荐", 2989 __title:"好店推荐",
2973 dialog: "shopRecommend-template", 2990 dialog: "shopRecommend-template",
2974 isShopRecommend:"", 2991 isShopRecommend:"",
2975 - isEdit:"",  
2976 shopChannelId:"", 2992 shopChannelId:"",
2977 data: { 2993 data: {
2978 "title": { 2994 "title": {
@@ -59,6 +59,9 @@ webpackJsonp([142],[ @@ -59,6 +59,9 @@ webpackJsonp([142],[
59 el: "#status-filter" 59 el: "#status-filter"
60 }); 60 });
61 new common.dropDown({ 61 new common.dropDown({
  62 + el: "#channelIds-filter"
  63 + });
  64 + new common.dropDown({
62 el: "#channel-ops" 65 el: "#channel-ops"
63 }); 66 });
64 67
@@ -74,6 +77,11 @@ webpackJsonp([142],[ @@ -74,6 +77,11 @@ webpackJsonp([142],[
74 return null; 77 return null;
75 }, 78 },
76 _render1: function () { 79 _render1: function () {
  80 + if(parseInt(type) == PagEnum.DEF_HOT_SEARCH_WORDS || parseInt(type) == PagEnum.HOT_SEARCH_WORDS){
  81 + $('#channelIds-filter').parent().show();
  82 + }else{
  83 + $('#channelIds-filter').parent().hide();
  84 + }
77 //只有默认搜索词才显示时间选择 85 //只有默认搜索词才显示时间选择
78 if (parseInt(type) == PagEnum.DEF_HOT_SEARCH_WORDS) { 86 if (parseInt(type) == PagEnum.DEF_HOT_SEARCH_WORDS) {
79 $('#starttime-filter').parent().show(); 87 $('#starttime-filter').parent().show();
@@ -153,6 +161,7 @@ webpackJsonp([142],[ @@ -153,6 +161,7 @@ webpackJsonp([142],[
153 return { 161 return {
154 type: type, 162 type: type,
155 status: $.trim(common.util.__input("status-filter")), 163 status: $.trim(common.util.__input("status-filter")),
  164 + channelIds: $.trim(common.util.__input("channelIds-filter")),
156 startTime: $.trim($('#starttime-filter').val()), 165 startTime: $.trim($('#starttime-filter').val()),
157 endTime: $.trim($('#endtime-filter').val()), 166 endTime: $.trim($('#endtime-filter').val()),
158 content: $.trim($('#content-filter').val()) 167 content: $.trim($('#content-filter').val())
@@ -168,6 +177,7 @@ webpackJsonp([142],[ @@ -168,6 +177,7 @@ webpackJsonp([142],[
168 return { 177 return {
169 type: type, 178 type: type,
170 status: $.trim(common.util.__input("status-filter")), 179 status: $.trim(common.util.__input("status-filter")),
  180 + channelIds: $.trim(common.util.__input("channelIds-filter")),
171 content: $.trim($('#content-filter').val()) 181 content: $.trim($('#content-filter').val())
172 }; 182 };
173 } 183 }
@@ -2194,7 +2194,6 @@ @@ -2194,7 +2194,6 @@
2194 </td> 2194 </td>
2195 <td align="center"><button class="btn btn-danger btn-sm delBtn" data-event="shopRecommend.list" type="button" data-index="[[index]]">删除</button></td> 2195 <td align="center"><button class="btn btn-danger btn-sm delBtn" data-event="shopRecommend.list" type="button" data-index="[[index]]">删除</button></td>
2196 </tr> 2196 </tr>
2197 - [[ if item.isEdit != 'Y' || item.size >= 2 ]]  
2198 <tr> 2197 <tr>
2199 <td align="center">商品</td> 2198 <td align="center">商品</td>
2200 <td align="center"><input type="file" name="file" value="[[item.goods2.src]]" class="shopRecommendRequired observe" data-field="list.[[index]].goods2.src" /></td> 2199 <td align="center"><input type="file" name="file" value="[[item.goods2.src]]" class="shopRecommendRequired observe" data-field="list.[[index]].goods2.src" /></td>
@@ -2213,7 +2212,6 @@ @@ -2213,7 +2212,6 @@
2213 </div> 2212 </div>
2214 </td> 2213 </td>
2215 </tr> 2214 </tr>
2216 - [[ /if ]]  
2217 </tbody> 2215 </tbody>
2218 </table> 2216 </table>
2219 </li> 2217 </li>
@@ -25,6 +25,17 @@ @@ -25,6 +25,17 @@
25 </select> 25 </select>
26 </div> 26 </div>
27 <div class="panel-col"> 27 <div class="panel-col">
  28 + <select name="channelIds" id="channelIds-filter" tabindex="-1" title=""
  29 + class="select2-offscreen brandBtn-group">
  30 + <option value="" selected="">选择频道</option>
  31 + <option value="1" >男生</option>
  32 + <option value="2" >女生</option>
  33 + <option value="3" >潮童</option>
  34 + <option value="4" >创意生活</option>
  35 + <option value="5" >全部</option>
  36 + </select>
  37 + </div>
  38 + <div class="panel-col">
28 <input type="text" id="starttime-filter" class="form-control panel-input hasDatepicker" 39 <input type="text" id="starttime-filter" class="form-control panel-input hasDatepicker"
29 jsaction="time:end:endtime-filter" name="start_time" placeholder="开始时间" value=""> 40 jsaction="time:end:endtime-filter" name="start_time" placeholder="开始时间" value="">
30 </div> 41 </div>
@@ -65,15 +76,15 @@ @@ -65,15 +76,15 @@
65 [[if _type==1|_type==3]] 76 [[if _type==1|_type==3]]
66 <div class="form-group"> 77 <div class="form-group">
67 <label for="content" class="col-sm-2 control-label"><i class="red">*</i> 频道</label> 78 <label for="content" class="col-sm-2 control-label"><i class="red">*</i> 频道</label>
68 - <div class="col-sm-5"> 79 + <div class="col-sm-3">
69 <select name="channelIds" id="channelIds" tabindex="-1" title="" 80 <select name="channelIds" id="channelIds" tabindex="-1" title=""
70 - class="select2-offscreen brandBtn-group observe" required="required" data-field="channelIds">  
71 - <option value="" selected="">选择频道</option>  
72 - <option value="1">男生</option>  
73 - <option value="2">女生</option>  
74 - <option value="3">潮童</option>  
75 - <option value="4">创意生活</option>  
76 - <option value="5">全部</option> 81 + class="form-control observe" required="required" data-field="channelIds">
  82 + <option value="" [[if channelIds == '']]selected=""[[/if]]>选择频道</option>
  83 + <option value="1" [[if channelIds == '1']]selected=""[[/if]]>男生</option>
  84 + <option value="2" [[if channelIds == '2']]selected=""[[/if]]>女生</option>
  85 + <option value="3" [[if channelIds == '3']]selected=""[[/if]]>潮童</option>
  86 + <option value="4" [[if channelIds == '4']]selected=""[[/if]]>创意生活</option>
  87 + <option value="5" [[if channelIds == '5']]selected=""[[/if]]>全部</option>
77 </select> 88 </select>
78 </div> 89 </div>
79 </div> 90 </div>