...
|
...
|
@@ -141,25 +141,24 @@ |
|
|
</tr>
|
|
|
|
|
|
<tr style="height: 60px">
|
|
|
<td>
|
|
|
<label>封面</label> <br>
|
|
|
<div id="coverImageUploadExt" style="float:left;">
|
|
|
</div>
|
|
|
<div>
|
|
|
<div style="float:left;">
|
|
|
<span style=" margin-left: 10px; color: red">1. 请上传 3:4/4:3/1:1 的图片,优质清晰的封面有利于推荐</span></br>
|
|
|
<span style=" margin-left: 10px; color: red">2. 请上传500K以内的图片,请勿上传像素过高的图片</span>
|
|
|
</div>
|
|
|
<td style="float: left;">
|
|
|
<label>单列封面(小图)(左图右字)</label> <br>
|
|
|
<div id="coverImageUpload" style="float:left;">
|
|
|
</div>
|
|
|
<!--<div>-->
|
|
|
<!--<div style="float:left;">-->
|
|
|
<!--<!–<span style=" margin-left: 10px; color: red">1. 请上传 3:4/4:3/1:1 的图片,优质清晰的封面有利于推荐</span></br>–>-->
|
|
|
<!--<span style=" margin-left: 10px; color: red">请上传500K以内的图片,请勿上传像素过高的图片</span>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<!--选择信息流结构-->
|
|
|
<tr style="height: 60px">
|
|
|
<td style="width:100%;">
|
|
|
<div style="float: left;width:700px;" >
|
|
|
<label style="font-size: 14px;">选择结构类型</label> <br>
|
|
|
<input class="easyui-combobox" id="flowType" name="flowType" style="width:200px ">
|
|
|
<td style="float: left; margin-left: 5%">
|
|
|
<label>单列封面(大图)(上图下字)</label> <br>
|
|
|
<div id="coverImage2Upload" style="float:left;">
|
|
|
</div>
|
|
|
<div style="float:left;">
|
|
|
<span style=" margin-left: 10px; color: red">1. 请上传 3:4/4:3/1:1 的图片,优质清晰的封面有利于推荐</span></br>
|
|
|
<span style=" margin-left: 10px; color: red">2.请上传500K以内的图片,请勿上传像素过高的图片</span>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
...
|
...
|
@@ -181,6 +180,14 @@ |
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr style="height: 60px">
|
|
|
<td style="width:100%;">
|
|
|
<div style="float: left;width:700px;" >
|
|
|
<label style="font-size: 14px;">跳转链接(商品按钮)</label>
|
|
|
<input class="easyui-textbox" id="product_link" name="productLink" style="width:600px ">
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td valign="bottom">
|
|
|
<input id="draftBotton" class="btn btn-primary" style="font-size: 18px; height: 36px;" value="保存到草稿箱"/>
|
...
|
...
|
@@ -587,6 +594,12 @@ |
|
|
html += "<input name='products["+i+"].productType' hidden value='"+checkedItems[i].productType+"'/>";
|
|
|
}
|
|
|
$("#products").html(html);
|
|
|
var cover1 = $("input[type='hidden'][name='coverImage']").val();
|
|
|
var cover2 = $("input[type='hidden'][name='coverImage2']").val();
|
|
|
if(cover1 && cover2){
|
|
|
$.messager.alert("保存失败", "单列封面只允许上传一张", "error");
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
},
|
|
|
success : function(data) {
|
...
|
...
|
@@ -669,6 +682,12 @@ |
|
|
html += "<input name='products["+i+"].productType' hidden value='"+checkedItems[i].productType+"'/>";
|
|
|
}
|
|
|
$("#products").html(html);
|
|
|
var cover1 = $("input[type='hidden'][name='coverImage']").val();
|
|
|
var cover2 = $("input[type='hidden'][name='coverImage2']").val();
|
|
|
if(cover1 && cover2){
|
|
|
$.messager.alert("保存失败", "单列封面只允许上传一张", "error");
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
},
|
|
|
success : function(data) {
|
...
|
...
|
@@ -692,7 +711,8 @@ |
|
|
}
|
|
|
});
|
|
|
|
|
|
$("#coverImageUploadExt").imageUpload({
|
|
|
/*封面图上传*/
|
|
|
$("#coverImageUpload").imageUpload({
|
|
|
width: 171,
|
|
|
height: 120,
|
|
|
realInputName: "coverImage",
|
...
|
...
|
@@ -706,19 +726,20 @@ |
|
|
var oobj = $(this).find("input[type='file']");
|
|
|
var files = oobj[0].files;
|
|
|
|
|
|
for(var i=0; i<files.length;i++){
|
|
|
var obj = files[i];
|
|
|
if(obj!=null && obj!=''){
|
|
|
if(obj.name.substring(obj.name.lastIndexOf(".")).toLowerCase() == '.png'){
|
|
|
$.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
return false;
|
|
|
}
|
|
|
if(obj.type.toLowerCase() == 'image/png'){
|
|
|
$.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// for(var i=0; i<files.length;i++){
|
|
|
// var obj = files[i];
|
|
|
// if(obj!=null && obj!=''){
|
|
|
// debugger
|
|
|
// if(obj.name.substring(obj.name.lastIndexOf(".")).toLowerCase() == '.png'){
|
|
|
// $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
// return false;
|
|
|
// }
|
|
|
// if(obj.type.toLowerCase() == 'image/png'){
|
|
|
// $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
// return false;
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
$.messager.progress({
|
|
|
title: "正在执行",
|
|
|
msg: "正在执行,请稍后...",
|
...
|
...
|
@@ -742,6 +763,57 @@ |
|
|
}
|
|
|
});
|
|
|
|
|
|
/*封面图上传*/
|
|
|
$("#coverImage2Upload").imageUpload({
|
|
|
width: 171,
|
|
|
height: 120,
|
|
|
realInputName: "coverImage2",
|
|
|
uploadInputName: "files",
|
|
|
url: serverContextPath + '/fileupload/uploadImgFile',
|
|
|
queryParams: {
|
|
|
bucket: "grassImg"
|
|
|
},
|
|
|
onBeforeSubmit: function () {
|
|
|
debugger;
|
|
|
var oobj = $(this).find("input[type='file']");
|
|
|
var files = oobj[0].files;
|
|
|
|
|
|
// for(var i=0; i<files.length;i++){
|
|
|
// var obj = files[i];
|
|
|
// if(obj!=null && obj!=''){
|
|
|
// debugger
|
|
|
// if(obj.name.substring(obj.name.lastIndexOf(".")).toLowerCase() == '.png'){
|
|
|
// $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
// return false;
|
|
|
// }
|
|
|
// if(obj.type.toLowerCase() == 'image/png'){
|
|
|
// $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
// return false;
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
$.messager.progress({
|
|
|
title: "正在执行",
|
|
|
msg: "正在执行,请稍后...",
|
|
|
interval: 500,
|
|
|
text: ""
|
|
|
});
|
|
|
},
|
|
|
filterFileName: function (data) {
|
|
|
debugger;
|
|
|
if (!data || data.code != 200) {
|
|
|
$.messager.progress("close");
|
|
|
$.messager.alert("错误", data.message);
|
|
|
return "";
|
|
|
}
|
|
|
return data.data;
|
|
|
},
|
|
|
onLoadSuccess: function (data) {
|
|
|
$.messager.progress("close");
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
$("#imageUpload1").imageUpload({
|
|
|
width: 171,
|
|
|
height: 120,
|
...
|
...
|
@@ -756,20 +828,20 @@ |
|
|
var oobj = $(this).find("input[type='file']");
|
|
|
var files = oobj[0].files;
|
|
|
|
|
|
for(var i=0; i<files.length;i++){
|
|
|
var obj = files[i];
|
|
|
if(obj!=null && obj!=''){
|
|
|
debugger
|
|
|
if(obj.name.substring(obj.name.lastIndexOf(".")).toLowerCase() == '.png'){
|
|
|
$.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
return false;
|
|
|
}
|
|
|
if(obj.type.toLowerCase() == 'image/png'){
|
|
|
$.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// for(var i=0; i<files.length;i++){
|
|
|
// var obj = files[i];
|
|
|
// if(obj!=null && obj!=''){
|
|
|
// debugger
|
|
|
// if(obj.name.substring(obj.name.lastIndexOf(".")).toLowerCase() == '.png'){
|
|
|
// $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
// return false;
|
|
|
// }
|
|
|
// if(obj.type.toLowerCase() == 'image/png'){
|
|
|
// $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
// return false;
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
var imageCount = 0;
|
|
|
$("input[name='url']").each(function(j,item){
|
|
|
debugger
|
...
|
...
|
@@ -827,8 +899,9 @@ |
|
|
}
|
|
|
|
|
|
//封面图
|
|
|
$("#coverImageUploadExt").imageUpload("setValue",data.coverImg);
|
|
|
|
|
|
$("#coverImageUpload").imageUpload("setValue",data.coverImg);
|
|
|
$("#coverImage2Upload").imageUpload("setValue",data.coverImgFlat);
|
|
|
$("#product_link").textbox("setValue",data.productLink);
|
|
|
|
|
|
var context = data.contentText;
|
|
|
if(context == null || context == '' || context == undefined){
|
...
|
...
|
@@ -940,6 +1013,12 @@ |
|
|
html += "<input name='products["+i+"].productType' hidden value='"+checkedItems[i].productType+"'/>";
|
|
|
}
|
|
|
$("#products").html(html);
|
|
|
var cover1 = $("input[type='hidden'][name='coverImage']").val();
|
|
|
var cover2 = $("input[type='hidden'][name='coverImage2']").val();
|
|
|
if(cover1 && cover2){
|
|
|
$.messager.alert("保存失败", "单列封面只允许上传一张", "error");
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
},
|
|
|
success : function(data) {
|
...
|
...
|
@@ -1037,20 +1116,20 @@ |
|
|
var oobj = $(this).find("input[type='file']");
|
|
|
var files = oobj[0].files;
|
|
|
|
|
|
for(var i=0; i<files.length;i++){
|
|
|
var obj = files[i];
|
|
|
if(obj!=null && obj!=''){
|
|
|
debugger
|
|
|
if(obj.name.substring(obj.name.lastIndexOf(".")).toLowerCase() == 'png'){
|
|
|
$.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
return false;
|
|
|
}
|
|
|
if(obj.type.toLowerCase() == 'image/png'){
|
|
|
$.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
// for(var i=0; i<files.length;i++){
|
|
|
// var obj = files[i];
|
|
|
// if(obj!=null && obj!=''){
|
|
|
// debugger
|
|
|
// if(obj.name.substring(obj.name.lastIndexOf(".")).toLowerCase() == 'png'){
|
|
|
// $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
// return false;
|
|
|
// }
|
|
|
// if(obj.type.toLowerCase() == 'image/png'){
|
|
|
// $.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
// return false;
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
var imageCount = 0;
|
|
|
$("input[name='url']").each(function(j,item){
|
|
|
debugger
|
...
|
...
|
|