mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-07 18:42:49 +08:00
feat: 实现基本的详情生成
This commit is contained in:
22
extend/base/admin/service/curd/templates/js/read.code
Normal file
22
extend/base/admin/service/curd/templates/js/read.code
Normal file
@@ -0,0 +1,22 @@
|
||||
$(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();
|
||||
})
|
||||
Reference in New Issue
Block a user