mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
22 lines
664 B
PHP
22 lines
664 B
PHP
$(function(){
|
|
// 删除数据
|
|
window.deleteData = function(id) {
|
|
layer.confirm('确定要删除这条数据吗?', {
|
|
icon: 3,
|
|
title: '提示'
|
|
}, function(index) {
|
|
$.post('{{:url("delete")}}', {id: id}, function(res) {
|
|
if (res.code == 0) {
|
|
layer.msg('删除成功', {icon: 1}, function() {
|
|
location.href = '{{:url("index")}}';
|
|
});
|
|
} else {
|
|
layer.msg(res.msg, {icon: 2});
|
|
}
|
|
}, 'json');
|
|
layer.close(index);
|
|
});
|
|
};
|
|
|
|
ua.listen();
|
|
}) |