Commit d13b2c96 by 冷斌

踢人

parent 68207d14
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
var input = '<input type="file" id="ipt-file1" name="image" style="display:none" accept="image/*" />'; var input = '<input type="file" id="ipt-file1" name="image" style="display:none" accept="image/*" />';
$('#upload').html(input); $('#upload').html(input);
var iptt=document.getElementById(index); var iptt=document.getElementById(index);
if(window.addEventListener){ if(window.addEventListener){
iptt.addEventListener('change',function(){ iptt.addEventListener('change',function(){
ajaxFileUpload(index); ajaxFileUpload(index);
$(".shadd[data-select="+index+"]").show(); $(".shadd[data-select="+index+"]").show();
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
{ {
iptt.attachEvent('onchange',function() iptt.attachEvent('onchange',function()
{ {
ajaxFileUpload(index); ajaxFileUpload(index);
$(".shadd[data-select="+index+"]").show(); $(".shadd[data-select="+index+"]").show();
}); });
} }
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
var str=JSON.parse(data); var str=JSON.parse(data);
if(str.ret==200) if(str.ret==200)
{ {
$("#thumb").val(str.data.url); $("#thumb").val(str.data.url);
$("#img_file1").attr("src",str.data.url); $("#img_file1").attr("src",str.data.url);
$(".shadd[data-select="+img+"]").hide(); $(".shadd[data-select="+img+"]").hide();
...@@ -53,9 +53,9 @@ ...@@ -53,9 +53,9 @@
layer.msg(str.msg); layer.msg(str.msg);
} }
}, },
error: function(data) error: function(data)
{ {
layer.msg("上传失败"); layer.msg("上传失败");
$(".shadd[data-select="+img+"]").hide(); $(".shadd[data-select="+img+"]").hide();
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
var content = $('#content').val(); var content = $('#content').val();
if ( content != '') { if ( content != '') {
$("#save_btn").css({"background": "#8EE2D3"}); $("#save_btn").css({"background": "#C45EFF"});
$("#save_btn").prop("disabled", false); $("#save_btn").prop("disabled", false);
}else{ }else{
$("#save_btn").css({"background": "#AAA8A8"}); $("#save_btn").css({"background": "#AAA8A8"});
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
layer.msg('提交成功',{},function(){ layer.msg('提交成功',{},function(){
location.reload(); location.reload();
}); });
}else{ }else{
layer.msg(result.errormsg); layer.msg(result.errormsg);
} }
...@@ -132,5 +132,5 @@ ...@@ -132,5 +132,5 @@
} }
$(function(){ $(function(){
$("#content").css({"height":$(window).height() *0.5+"px"}); $("#content").css({"height":$(window).height() *0.5+"px"});
$('#save_btn').on('click', save); $('#save_btn').on('click', save);
}) })
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment