update
This commit is contained in:
+19
-11
@@ -8,6 +8,7 @@
|
||||
<link rel="stylesheet" href="/static/layui-v2.6.8/layui/css/layui.css" media="all">
|
||||
<script src="/static/layui-v2.6.8/layui/layui.js"></script>
|
||||
<script src="/static/js/jquery-1.11.3.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
|
||||
<script>
|
||||
let layer //弹层
|
||||
, laypage //分页
|
||||
@@ -241,17 +242,24 @@
|
||||
}
|
||||
// post start
|
||||
const post_data = {'mind_name': mind_name, 'data_format': 'node_tree', 'snapshot_data': view.json2string(snapshot_data)}
|
||||
$.post('create', post_data, function (resp) {
|
||||
layer.closeAll()
|
||||
view.fetch_data()
|
||||
|
||||
layer.msg('创建成功')
|
||||
// 新页面打开
|
||||
setTimeout(function () {
|
||||
const id = resp.data
|
||||
window.open('detail?id=' + id)
|
||||
}, 500)
|
||||
})
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "create",
|
||||
headers: {"X-CSRFToken": $.cookie("csrftoken")},
|
||||
data: post_data,
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
layer.closeAll()
|
||||
view.fetch_data()
|
||||
layer.msg('创建成功')
|
||||
// 新页面打开
|
||||
setTimeout(function () {
|
||||
const id = resp.data
|
||||
window.open('detail?id=' + id)
|
||||
}, 500)
|
||||
},
|
||||
async: false
|
||||
});
|
||||
// post end
|
||||
} else {
|
||||
layer.msg('请输入导图名称')
|
||||
|
||||
Reference in New Issue
Block a user