Authored by dongjunjie

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

... ... @@ -804,15 +804,17 @@ function freshJson(id,data,status){
if(status == 1){
data[0].isShowShopName = $("input[name='isShowShopName']:checked").val();
if(curPlatform == "shopWeb-app"){
jsonMain.resources.shopTopBanner_APP.isUsed = "Y";
jsonMain.resources.shopTopBanner_APP.isUsed = "Y"; // 用于提交审核时候校验app端是否维护店招
cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
}
if(curPlatform == "shopWeb-pc"){
cloneArr(data,jsonMain.resources.shopTopBanner.data);
if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
cloneArr(data,jsonClone.resources.shopTopBanner_APP.data);
}
/* app端与pc端单独配置,不取pc端的大图了
if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
cloneArr(data,jsonMain.resources.shopTopBanner_APP.data);
cloneArr(data,jsonClone.resources.shopTopBanner_APP.data);
}
*/
}
}else if(status == 0){
if(curPlatform == "shopWeb-app"){
... ... @@ -1315,6 +1317,14 @@ $(document).on("click","#saveModule",function(){
})
//提交审核
$(document).on("click","#submitModule",function(){
if(jsonMain.resources.shopTopBanner.data[0].shopSrc == defaultSrc){
common.util.__tip("PC端没有维护顶部banner!");
return;
}
if(jsonMain.resources.shopTopBanner_APP.isUsed == "N"){
common.util.__tip("APP端没有维护顶部banner!");
return;
}
if(jsonMain.templateType == "0"){
common.util.__tip("请选择展示使用模板!");
$("#templateSelect").focus().addClass("error");
... ...
... ... @@ -199,7 +199,10 @@
<li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
[[/each]]
[[else]]
<li><img src="http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"><div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div></li>
<li>
<img src="http://img01.yohoboys.com/staticimg/2016/05/19/15/01091c21f2317a64f123f1649fbbccf7ba.png">
<div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div>
</li>
[[/if]]
</ul>
<div class="clear"></div>
... ... @@ -232,13 +235,15 @@
<li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
[[/each]]
[[else]]
<li><img src="http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"><div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div></li>
<li>
<img src="http://img01.yohoboys.com/staticimg/2016/05/19/15/01091c21f2317a64f123f1649fbbccf7ba.png">
<div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div>
</li>
[[/if]]
</ul>
<div class="clear"></div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
... ... @@ -250,22 +255,19 @@
<div class="model-wrap contentpanel-app">
<!--banner-->
<div class="model-banner model-editor" data-toggle="editor-banner" data-title="顶部图片编辑">
[[if resources.shopTopBanner_APP.isUsed == "Y"]]
<img src="[[resources.shopTopBanner_APP.data[0].shopSrc]]">
[[if resources.shopTopBanner_APP.data[0].isShowShopName == "Y"]]
<h1>[[shopName]]</h1>
[[/if]]
[[else]]
<img src="[[resources.shopTopBanner.data[0].shopSrc]]">
[[if resources.shopTopBanner.data[0].isShowShopName == "Y"]]
<h1>[[shopName]]</h1>
[[/if]]
[[/if]]
</div>
<!--nav-->
<div class="model-nav">
<ul>
<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>
<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>
</ul>
</div>
... ... @@ -286,15 +288,9 @@
<!--小图-->
<div class="model-smallPic model-editor" data-toggle="editor-smallPic" data-title="资源位小图编辑">
<ul>
[[if resources.oneRowTwoColImages_APP.isUsed == "Y"]]
[[each resources.oneRowTwoColImages_APP.data as item _index]]
<li><img src="[[item.data[0].src]]"></li>
[[/each]]
[[else]]
[[each resources.oneRowTwoColImages.data as item _index]]
<li><img src="[[item.data[0].src]]"></li>
[[/each]]
[[/if]]
</ul>
</div>
<div class="clear"></div>
... ... @@ -321,18 +317,15 @@
</div>
<div class="model-showDetail model-editor" data-toggle="editor-hotProduct" data-title="人气单品商品编辑">
<ul>
[[if resources.hotProducts_APP.isUsed == "Y"]]
[[if resources.hotProducts_APP.data.length > 0]]
[[each resources.hotProducts_APP.data as item _index]]
<li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
[[/each]]
[[else]]
[[if resources.hotProducts.data.length > 0]]
[[each resources.hotProducts.data as item _index]]
<li><img src="[[item.src]]"><div class="shadow"><a href="javascript:">[[item.productName]]</a><b>¥[[item.salesPrice]]</b></div></li>
[[/each]]
[[else]]
<li><img src="http://cdn.yoho.cn/yohobuy-portal/assets/images/shop.png"><div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div></li>
[[/if]]
<li>
<img src="http://img01.yohoboys.com/staticimg/2016/05/19/15/01091c21f2317a64f123f1649fbbccf7ba.png">
<div class="shadow"><a href="javascript:">商品展示样例</a><b>¥商品价格</b></div>
</li>
[[/if]]
</ul>
<div class="clear"></div>
... ...