Commit 12f7b043 authored by agping's avatar agping

修改

parent aac75f9e
...@@ -213,14 +213,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css ...@@ -213,14 +213,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
} }
var reader = new FileReader(); var reader = new FileReader();
reader.readAsDataURL(this.files[i]); reader.readAsDataURL(this.files[i]);
reader.onload = function(e) { //赋值
result = '<div class="result"><img src="' + this.result + '" alt=""/> <span class="span-del">删除</span></div>';
div = document.createElement('div');
div.innerHTML = result;
document.getElementById('container_body').appendChild(div);   
}
};
var formData = new FormData(); var formData = new FormData();
formData.append('type','chat'); formData.append('type','chat');
formData.append('image',this.files[0]); formData.append('image',this.files[0]);
...@@ -237,7 +230,10 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css ...@@ -237,7 +230,10 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
beforeSend: function() {}, beforeSend: function() {},
success: function(_data) { success: function(_data) {
if(typeof _data === 'object') { if(typeof _data === 'object') {
result = '<div class="result"><img calss="'+_data.+'" src="' + this.result + '" alt=""/> <span class="span-del">删除</span></div>';
div = document.createElement('div');
div.innerHTML = result;
document.getElementById('container_body').appendChild(div); 
} else { } else {
alert('数据错误'); alert('数据错误');
}; };
...@@ -252,6 +248,10 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css ...@@ -252,6 +248,10 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}; };
} }
}); });
  
};
}; };
}, },
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<td>[%= it[item]["comment_number"] %]</td> <td>[%= it[item]["comment_number"] %]</td>
<td> <td>
_data.title = $("#announcement_title").val();
<a class="btn1 btn-success" href="new_text.html?id=[%= it[item]["id"] %]" data-createTime='[%= it[item]["create_time"] %]' data-title='[%= it[item]["title"] %]' data-id='[%= it[item]["id"] %]' data-content='[%= it[item]["content"] %]' target="_blank"> <a class="btn1 btn-success" href="new_text.html?id=[%= it[item]["id"] %]" data-createTime='[%= it[item]["create_time"] %]' data-title='[%= it[item]["title"] %]' data-id='[%= it[item]["id"] %]' data-content='[%= it[item]["content"] %]' target="_blank">
编辑 编辑
</a> </a>
......
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