...
|
...
|
@@ -84,6 +84,19 @@ var Bll = { |
|
|
return false;
|
|
|
}
|
|
|
var couponFlag = true;
|
|
|
//好店推荐切换radio,增加/删除校验
|
|
|
var shopRecommendFlag = false;
|
|
|
if(module.contentData.template_name == 'shopRecommend') {
|
|
|
if(module.contentData.isShopRecommend=="N"||module.contentData.isShopRecommend==""){
|
|
|
$(".shopRecommendRequired").attr("required",true);
|
|
|
module.contentData.shopChannelId='';
|
|
|
module.contentData.isShopRecommend="N"
|
|
|
|
|
|
}else{
|
|
|
$(".shopRecommendRequired").attr("required",false);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
if (Validate[module.contentData.template_name]) {
|
|
|
Validate[module.contentData.template_name].forEach(function (item) {
|
|
|
couponFlag = item.fn(module.contentData);
|
...
|
...
|
@@ -487,9 +500,12 @@ $(document).on("click", ".del", function () {//删除 |
|
|
$(document).on("click", ".edit", function () {
|
|
|
var index = $(this).data("index");
|
|
|
var item = Bll.contentDatas[currIndex][index];
|
|
|
|
|
|
Bll.module = $.extend(true, {}, item);
|
|
|
Bll.toast(index, Bll.module);
|
|
|
if(item.contentData.template_name=='shopRecommend'){
|
|
|
var _shopRecommendFlag = item.contentData.isShopRecommend==''?"N":item.contentData.isShopRecommend;
|
|
|
changeShopRecommendDivShow(_shopRecommendFlag);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
/*根据limit判断最多添加条数, 根据event判断添加的类型, data-event:template_name + "-template"*/
|
...
|
...
|
@@ -661,6 +677,20 @@ $(document).on("click", '.is_show_name', function () { |
|
|
Bll.renderDialog("imageList-template");
|
|
|
});
|
|
|
//*****************************************************************//
|
|
|
//*****************************************************************//
|
|
|
/*好店推荐*/
|
|
|
$(document).on("click", '.isShopRecommend', function () {
|
|
|
var _isShopRecommend = $(this).val();
|
|
|
Bll.module.contentData.isShopRecommend = _isShopRecommend;
|
|
|
//Bll.renderDialog("shopRecommend-template");
|
|
|
//切换到推荐
|
|
|
changeShopRecommendDivShow(_isShopRecommend)
|
|
|
});
|
|
|
$(document).on("change", '.shopChannelId', function () {
|
|
|
Bll.module.contentData.shopChannelId = $(this).val();
|
|
|
//Bll.renderDialog("shopRecommend-template");
|
|
|
});
|
|
|
//*****************************************************************//
|
|
|
/*推荐(标题 + 12张图)*/
|
|
|
$(document).on("change", '#recommendContentFive-is_show', function () {
|
|
|
Bll.module.contentData.data.title.is_show = 1 - Bll.module.contentData.data.title.is_show;
|
...
|
...
|
@@ -839,7 +869,6 @@ $(document).on("click", "#sub_btn", function () { |
|
|
contentData.data.begin_time = dateStrToSeconds(contentData.data.begin_time);
|
|
|
contentData.data.end_time = dateStrToSeconds(contentData.data.end_time);
|
|
|
}
|
|
|
|
|
|
data.content[i] = JSON.stringify(common.util.__ArrayToObj(contentData));
|
|
|
data.content[i] = JSON.stringify(common.util.__ArrayToObj(Bll.contentDatas[currIndex][i].contentData));
|
|
|
if (Bll.contentDatas[currIndex][i].id) {
|
...
|
...
|
@@ -1616,3 +1645,18 @@ function validateRollingOverContent(data) { |
|
|
|
|
|
return errArr;
|
|
|
}
|
|
|
//切换好店推荐div是否展示
|
|
|
function changeShopRecommendDivShow(shopRecommendFlag){
|
|
|
if(shopRecommendFlag=='Y'){
|
|
|
$("#shopBaseTip").css('display','none');
|
|
|
$("#shopRecommendTip").css('display','block');
|
|
|
$("#shopBaseDiv").css('display','none');
|
|
|
$("#shopRecommendDiv").css('display','block');
|
|
|
}else if(shopRecommendFlag=='N'){
|
|
|
//切换到基础
|
|
|
$("#shopBaseTip").css('display','block');
|
|
|
$("#shopRecommendTip").css('display','none');
|
|
|
$("#shopBaseDiv").css('display','block');
|
|
|
$("#shopRecommendDiv").css('display','none');
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|