This commit is contained in:
chenyang
2022-07-02 12:21:21 +08:00
parent 50f7a6edf2
commit 390ae10d84
4 changed files with 74 additions and 48 deletions
+23
View File
@@ -179,6 +179,9 @@
if (resp.code !== 0) {
return
}
// clear
$('main .container-fluid').empty()
// 解析结果
const results = resp.results
let idx = 0
@@ -217,7 +220,27 @@
const mind_name = $('#mindName').val()
if (!mind_name) {
common_alert_('请输入导图名称')
return
}
const post_data = {'mind_name': mind_name}
$.ajax({
type: "post",
url: "create",
headers: {"X-CSRFToken": $.cookie("csrftoken")},
data: post_data,
dataType: "json",
success: function (resp) {
fetch_mind()
$('#newMindModal').modal('hide')
// 新页面打开
setTimeout(function () {
const id = resp.data
window.open('detail?id=' + id)
}, 500)
},
async: false
});
})
/**如果已经登录则查询列表*/