This commit is contained in:
chenyang
2022-07-03 13:24:03 +08:00
parent 5720ad7434
commit 805612792b
6 changed files with 29 additions and 17 deletions
+8 -3
View File
@@ -255,7 +255,7 @@
if (resp.code !== 0) {
return
}
// clear
// clear container-fluid
$('main .container-fluid').empty()
// 解析结果
@@ -301,10 +301,15 @@
type: "delete",
url: "delete",
headers: {"X-CSRFToken": $.cookie("csrftoken")},
data: {'id': mind_id},
data: {'id': mind_id, 'source': 'dashboard'},
dataType: "json",
success: function (data) {
console.log(data)
if (data.code === 0) {
primary_alert_(data.msg)
$('#' + card_id).remove()
} else {
common_alert_(data.msg)
}
},
async: false
});
+4
View File
@@ -15,4 +15,8 @@ function common_alert_(text, class_str) {
setTimeout(function () {
$('.alert').alert('close')
}, 1500)
}
function primary_alert_(text) {
common_alert_(text, 'alert-primary')
}