Authored by dongjunjie

店铺装修pc端banner跟app端banner无关联,且要做校验

@@ -804,15 +804,17 @@ function freshJson(id,data,status){ @@ -804,15 +804,17 @@ function freshJson(id,data,status){
804 if(status == 1){ 804 if(status == 1){
805 data[0].isShowShopName = $("input[name='isShowShopName']:checked").val(); 805 data[0].isShowShopName = $("input[name='isShowShopName']:checked").val();
806 if(curPlatform == "shopWeb-app"){ 806 if(curPlatform == "shopWeb-app"){
807 - jsonMain.resources.shopTopBanner_APP.isUsed = "Y"; 807 + jsonMain.resources.shopTopBanner_APP.isUsed = "Y"; // 用于提交审核时候校验app端是否维护店招
808 cloneArr(data,jsonMain.resources.shopTopBanner_APP.data); 808 cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
809 } 809 }
810 if(curPlatform == "shopWeb-pc"){ 810 if(curPlatform == "shopWeb-pc"){
811 cloneArr(data,jsonMain.resources.shopTopBanner.data); 811 cloneArr(data,jsonMain.resources.shopTopBanner.data);
812 - if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){  
813 - cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);  
814 - cloneArr(data,jsonClone.resources.shopTopBanner_APP.data);  
815 - } 812 + /* app端与pc端单独配置,不取pc端的大图了
  813 + if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
  814 + cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
  815 + cloneArr(data,jsonClone.resources.shopTopBanner_APP.data);
  816 + }
  817 + */
816 } 818 }
817 }else if(status == 0){ 819 }else if(status == 0){
818 if(curPlatform == "shopWeb-app"){ 820 if(curPlatform == "shopWeb-app"){
@@ -1315,6 +1317,14 @@ $(document).on("click","#saveModule",function(){ @@ -1315,6 +1317,14 @@ $(document).on("click","#saveModule",function(){
1315 }) 1317 })
1316 //提交审核 1318 //提交审核
1317 $(document).on("click","#submitModule",function(){ 1319 $(document).on("click","#submitModule",function(){
  1320 + if(jsonMain.resources.shopTopBanner.data[0].shopSrc == defaultSrc){
  1321 + common.util.__tip("PC端没有维护顶部banner!");
  1322 + return;
  1323 + }
  1324 + if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
  1325 + common.util.__tip("APP端没有维护顶部banner!");
  1326 + return;
  1327 + }
1318 if(jsonMain.templateType == "0"){ 1328 if(jsonMain.templateType == "0"){
1319 common.util.__tip("请选择展示使用模板!"); 1329 common.util.__tip("请选择展示使用模板!");
1320 $("#templateSelect").focus().addClass("error"); 1330 $("#templateSelect").focus().addClass("error");
@@ -199,7 +199,10 @@ @@ -199,7 +199,10 @@
199 <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li> 199 <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
200 [[/each]] 200 [[/each]]
201 [[else]] 201 [[else]]
202 - <li><img src="http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"><div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div></li> 202 + <li>
  203 + <img src="http://img01.yohoboys.com/staticimg/2016/05/19/15/01091c21f2317a64f123f1649fbbccf7ba.png">
  204 + <div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div>
  205 + </li>
203 [[/if]] 206 [[/if]]
204 </ul> 207 </ul>
205 <div class="clear"></div> 208 <div class="clear"></div>
@@ -232,13 +235,15 @@ @@ -232,13 +235,15 @@
232 <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li> 235 <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
233 [[/each]] 236 [[/each]]
234 [[else]] 237 [[else]]
235 - <li><img src="http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"><div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div></li> 238 + <li>
  239 + <img src="http://img01.yohoboys.com/staticimg/2016/05/19/15/01091c21f2317a64f123f1649fbbccf7ba.png">
  240 + <div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div>
  241 + </li>
236 [[/if]] 242 [[/if]]
237 </ul> 243 </ul>
238 <div class="clear"></div> 244 <div class="clear"></div>
239 </div> 245 </div>
240 </div> 246 </div>
241 -  
242 </div> 247 </div>
243 <div class="clear"></div> 248 <div class="clear"></div>
244 </div> 249 </div>
@@ -250,22 +255,19 @@ @@ -250,22 +255,19 @@
250 <div class="model-wrap contentpanel-app"> 255 <div class="model-wrap contentpanel-app">
251 <!--banner--> 256 <!--banner-->
252 <div class="model-banner model-editor" data-toggle="editor-banner" data-title="顶部图片编辑"> 257 <div class="model-banner model-editor" data-toggle="editor-banner" data-title="顶部图片编辑">
253 - [[if resources.shopTopBanner_APP.isUsed == "Y"]]  
254 <img src="[[resources.shopTopBanner_APP.data[0].shopSrc]]"> 258 <img src="[[resources.shopTopBanner_APP.data[0].shopSrc]]">
255 [[if resources.shopTopBanner_APP.data[0].isShowShopName == "Y"]] 259 [[if resources.shopTopBanner_APP.data[0].isShowShopName == "Y"]]
256 <h1>[[shopName]]</h1> 260 <h1>[[shopName]]</h1>
257 [[/if]] 261 [[/if]]
258 - [[else]]  
259 - <img src="[[resources.shopTopBanner.data[0].shopSrc]]">  
260 - [[if resources.shopTopBanner.data[0].isShowShopName == "Y"]]  
261 - <h1>[[shopName]]</h1>  
262 - [[/if]]  
263 - [[/if]]  
264 </div> 262 </div>
265 <!--nav--> 263 <!--nav-->
266 <div class="model-nav"> 264 <div class="model-nav">
267 <ul> 265 <ul>
268 - <li class="active"><a href="javascript:">首页</a></li><li><a href="javascript:">上新</a></li><li><a href="javascript:">人气</a></li><li style="border:0"><a href="javascript:">全部商品</a></li><div class="clear"></div> 266 + <li class="active"><a href="javascript:">首页</a></li>
  267 + <li><a href="javascript:">上新</a></li>
  268 + <li><a href="javascript:">人气</a></li>
  269 + <li style="border:0"><a href="javascript:">全部商品</a>
  270 + </li><div class="clear"></div>
269 </ul> 271 </ul>
270 </div> 272 </div>
271 273
@@ -286,15 +288,9 @@ @@ -286,15 +288,9 @@
286 <!--小图--> 288 <!--小图-->
287 <div class="model-smallPic model-editor" data-toggle="editor-smallPic" data-title="资源位小图编辑"> 289 <div class="model-smallPic model-editor" data-toggle="editor-smallPic" data-title="资源位小图编辑">
288 <ul> 290 <ul>
289 - [[if resources.oneRowTwoColImages_APP.isUsed == "Y"]]  
290 [[each resources.oneRowTwoColImages_APP.data as item _index]] 291 [[each resources.oneRowTwoColImages_APP.data as item _index]]
291 <li><img src="[[item.data[0].src]]"></li> 292 <li><img src="[[item.data[0].src]]"></li>
292 [[/each]] 293 [[/each]]
293 - [[else]]  
294 - [[each resources.oneRowTwoColImages.data as item _index]]  
295 - <li><img src="[[item.data[0].src]]"></li>  
296 - [[/each]]  
297 - [[/if]]  
298 </ul> 294 </ul>
299 </div> 295 </div>
300 <div class="clear"></div> 296 <div class="clear"></div>
@@ -321,18 +317,15 @@ @@ -321,18 +317,15 @@
321 </div> 317 </div>
322 <div class="model-showDetail model-editor" data-toggle="editor-hotProduct" data-title="人气单品商品编辑"> 318 <div class="model-showDetail model-editor" data-toggle="editor-hotProduct" data-title="人气单品商品编辑">
323 <ul> 319 <ul>
324 - [[if resources.hotProducts_APP.isUsed == "Y"]] 320 + [[if resources.hotProducts_APP.data.length > 0]]
325 [[each resources.hotProducts_APP.data as item _index]] 321 [[each resources.hotProducts_APP.data as item _index]]
326 <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li> 322 <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
327 [[/each]] 323 [[/each]]
328 [[else]] 324 [[else]]
329 - [[if resources.hotProducts.data.length > 0]]  
330 - [[each resources.hotProducts.data as item _index]]  
331 - <li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>  
332 - [[/each]]  
333 - [[else]]  
334 - <li><img src="http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"><div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div></li>  
335 - [[/if]] 325 + <li>
  326 + <img src="http://img01.yohoboys.com/staticimg/2016/05/19/15/01091c21f2317a64f123f1649fbbccf7ba.png">
  327 + <div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div>
  328 + </li>
336 [[/if]] 329 [[/if]]
337 </ul> 330 </ul>
338 <div class="clear"></div> 331 <div class="clear"></div>