update
This commit is contained in:
+11
-3
@@ -44,9 +44,13 @@
|
||||
},
|
||||
loadMind: function () {
|
||||
// 打开已有脑图1、查询数据,组装option 2、实例化jm、show
|
||||
let id = {{ id }};
|
||||
const me = this
|
||||
$.get('list?id=' + id, function (resp) {
|
||||
let id = `{{ id }}`;
|
||||
let u = `{{ u }}`;
|
||||
let h = `{{ h }}`;
|
||||
const me = this;
|
||||
const from_share = id.length === 0;
|
||||
const url = from_share ? `4cbcb74630898f41fd0a?u=${u}&h=${h}` : 'list?id=' + id;
|
||||
$.get(url, function (resp) {
|
||||
// reset
|
||||
me.close_coop_timer_if_necessary()
|
||||
|
||||
@@ -59,6 +63,10 @@
|
||||
const data_format = resp_data.data_format
|
||||
const coop_mind_name = resp.data.coop_mind_name
|
||||
|
||||
if (from_share) {
|
||||
me.coop_mind_id = resp_data.id
|
||||
}
|
||||
|
||||
// node_tree 和 node_array 需要被转成对象,freemind 不需要
|
||||
snapshot_data = (data_format === 'node_tree' || data_format === 'node_array') ? JSON.parse(snapshot_data) : snapshot_data
|
||||
me.show_mind(coop_mind_name, data_format, snapshot_data)
|
||||
|
||||
Reference in New Issue
Block a user