Commit 8273e915 authored by xinyuandu's avatar xinyuandu

删除功能

parent 8825ca25
...@@ -31,17 +31,14 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css', ...@@ -31,17 +31,14 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css',
$("#reset").click(function () {//重置 $("#reset").click(function () {//重置
document.getElementById("form_search").reset(); document.getElementById("form_search").reset();
});*/ });*/
$(document).delegate("#confirm_delete", "click", function(e) {
e.preventDefault();
e.stopPropagation();
checkLogin();
picture.delBusiness();
});
$(document).on('click','.is_show',function(e){ $(document).on('click','.is_show',function(e){
picture.getDataByParams(e.target.dataset.id); picture.getDataByParams(e.target.dataset.id);
}); });
$(document).on('click','.announcement-del',function(e){
picture.deletePictureById(e.target.dataset.id);
picture.getList(1);
});
$('#modal-show').on('show.bs.modal',function(){ $('#modal-show').on('show.bs.modal',function(){
picture.getYetai($('#yetai_id'),$('#leased'),true); picture.getYetai($('#yetai_id'),$('#leased'),true);
...@@ -275,14 +272,12 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css', ...@@ -275,14 +272,12 @@ define (['doT', 'text!temp/picture_add_template_tpl.html', 'css!style/home.css',
}, },
//删除表格的行(单行删除) //删除表格的行(单行删除)
delBusiness: function() { deletePictureById: function(id) {
$.ajax({ $.ajax({
url: '/index/houseDel', url: '/api/delImageDepot',
type: 'POST', type: 'POST',
async: true, async: true,
data: { data: { "id": id},
"id": business.id
},
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
......
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