|
@@ -1167,7 +1167,7 @@ To change this template use File | Settings | File Templates.
|
|
|
htmls = "<div class='pic_list'><a class='delsimg' id=" + imss + ">删除</a> <img src=" + obj.imgurl + " id='imgs' width='50px'></div>";
|
|
|
}
|
|
|
$("#hint").html(htmls);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
$("#hint").text("可以上传不超过9张的图片");
|
|
|
}
|
|
|
var html = '';
|
|
@@ -1298,13 +1298,13 @@ To change this template use File | Settings | File Templates.
|
|
|
alert("网络异常,请重试");
|
|
|
},
|
|
|
success: function (message) {
|
|
|
- if (message != null) {
|
|
|
+ if (message != null && message != 'error') {
|
|
|
var html = $("#imgurl").val();
|
|
|
var htmls = '';
|
|
|
if (html != '') {
|
|
|
$("#imgurl").val(html + "," + message);
|
|
|
if (message.indexOf(",") != -1) {
|
|
|
- var ims = obj.message.split(",");
|
|
|
+ var ims = message.split(",");
|
|
|
for (var i = 0; i < ims.length; i++) {
|
|
|
var imss = ims[i];
|
|
|
htmls = "<div class='pic_list'><a class='delsimg' id=" + imss + ">删除</a> <img src=" + imss + " id='imgs' width='50px'></div>" + htmls;
|
|
@@ -1315,18 +1315,19 @@ To change this template use File | Settings | File Templates.
|
|
|
$("#hint").append(htmls);
|
|
|
} else {
|
|
|
if (message.indexOf(",") != -1) {
|
|
|
- var ims = obj.message.split(",");
|
|
|
+ var ims = message.split(",");
|
|
|
for (var i = 0; i < ims.length; i++) {
|
|
|
var imss = ims[i];
|
|
|
- htmls = "<div><a class='delsimg' id=" + imss + ">删除</a> <img src=" + imss + " id='imgs' width='50px'></div>" + htmls;
|
|
|
+ htmls = "<div class='pic_list'><a class='delsimg' id=" + imss + ">删除</a> <img src=" + imss + " id='imgs' width='50px'></div>" + htmls;
|
|
|
}
|
|
|
} else {
|
|
|
- htmls = "<div><a class='delsimg' id=" + message + ">删除</a> <img src=" + message + " id='imgs' width='50px'></div>"
|
|
|
+ htmls = "<div class='pic_list'><a class='delsimg' id=" + message + ">删除</a> <img src=" + message + " id='imgs' width='50px'></div>"
|
|
|
}
|
|
|
- $("#imgurl").text(htmls);
|
|
|
+ $("#hint").text(htmls);
|
|
|
}
|
|
|
} else {
|
|
|
$("#hint").text("上传失败");
|
|
|
+ layer.msg("可以上传不超过9张的图片");
|
|
|
}
|
|
|
imgsfile();
|
|
|
}
|
|
@@ -1345,35 +1346,36 @@ To change this template use File | Settings | File Templates.
|
|
|
alert("网络异常,请重试");
|
|
|
},
|
|
|
success: function (message) {
|
|
|
- if (message != null) {
|
|
|
- // $("#hint").text("上传成功");
|
|
|
- // console.log(message);
|
|
|
+ if (message != null && message != 'error') {
|
|
|
+ var html = $("#imgurl").val();
|
|
|
+ var htmls = '';
|
|
|
if (html != '') {
|
|
|
$("#imgurl").val(html + "," + message);
|
|
|
if (message.indexOf(",") != -1) {
|
|
|
- var ims = obj.message.split(",");
|
|
|
+ var ims = message.split(",");
|
|
|
for (var i = 0; i < ims.length; i++) {
|
|
|
var imss = ims[i];
|
|
|
- htmls = "<div><a class='delsimg' id=" + imss + ">删除</a> <img src=" + imss + " id='imgs' width='50px'></div>" + htmls;
|
|
|
+ htmls = "<div class='pic_list'><a class='delsimg' id=" + imss + ">删除</a> <img src=" + imss + " id='imgs' width='50px'></div>" + htmls;
|
|
|
}
|
|
|
} else {
|
|
|
- htmls = "<div><a class='delsimg' id=" + message + ">删除</a> <img src=" + message + " id='imgs' width='50px'></div>"
|
|
|
+ htmls = "<div class='pic_list'><a class='delsimg' id=" + message + ">删除</a> <img src=" + message + " id='imgs' width='50px'></div>"
|
|
|
}
|
|
|
$("#hint").append(htmls);
|
|
|
} else {
|
|
|
if (message.indexOf(",") != -1) {
|
|
|
- var ims = obj.message.split(",");
|
|
|
+ var ims = message.split(",");
|
|
|
for (var i = 0; i < ims.length; i++) {
|
|
|
var imss = ims[i];
|
|
|
- htmls = "<div><a class='delsimg' id=" + imss + ">删除</a> <img src=" + imss + " id='imgs' width='50px'></div>" + htmls;
|
|
|
+ htmls = "<div class='pic_list'><a class='delsimg' id=" + imss + ">删除</a> <img src=" + imss + " id='imgs' width='50px'></div>" + htmls;
|
|
|
}
|
|
|
} else {
|
|
|
- htmls = "<div><a class='delsimg' id=" + message + ">删除</a> <img src=" + message + " id='imgs' width='50px'></div>"
|
|
|
+ htmls = "<div class='pic_list'><a class='delsimg' id=" + message + ">删除</a> <img src=" + message + " id='imgs' width='50px'></div>"
|
|
|
}
|
|
|
- $("#imgurl").text(htmls);
|
|
|
+ $("#hint").text(htmls);
|
|
|
}
|
|
|
} else {
|
|
|
$("#hint").text("上传失败");
|
|
|
+ layer.msg("可以上传不超过9张的图片");
|
|
|
}
|
|
|
imgsfile();
|
|
|
}
|