From 2b2bad7b62938cb562d075396ab0b2effdbd5512 Mon Sep 17 00:00:00 2001 From: aqu415 Date: Sat, 26 Mar 2022 16:41:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/html/list.html | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) 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 @@ - +