diff --git a/static/html/list.html b/static/html/list.html index 1523e0c..c82aad6 100644 --- a/static/html/list.html +++ b/static/html/list.html @@ -165,12 +165,12 @@ view.fetch_data() }) // 创建 - $('#crt_out').click(function () { + $('#create_mind').click(function () { const content_html = `
- +
` layer.open({ type: 1, @@ -179,11 +179,12 @@ }); // 调用后台创建脑图 - $('#crt_inner').click(crt_inner) + $('#create_inner').click(create_inner) // }) - function crt_inner() { + // 创建mind + function create_inner() { const mind_name = $('#mind_name_crt').val() if (mind_name) { const snapshot_data = { @@ -231,13 +232,17 @@ ] } // post start - $.post('create', {'mind_name': mind_name, 'data_format': 'node_tree', 'snapshot_data': view.json2string(snapshot_data)}, function (resp) { + 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('创建成功') // 新页面打开 - const id = resp.data - window.open('detail?id=' + id) + setTimeout(function () { + const id = resp.data + window.open('detail?id=' + id) + }, 500) }) // post end } else { @@ -273,7 +278,7 @@ - +