This commit is contained in:
chenyang
2022-07-08 16:04:32 +08:00
parent eebb5c98e1
commit e56e321d5b
5 changed files with 23 additions and 5 deletions
+3 -1
View File
@@ -177,7 +177,9 @@
dataType: "json",
success: function (resp) {
console.log(resp)
console.log(`${window.location.protocol}//${window.location.host}/4cbcb74630898f41fd0a?u=${resp.data.u}&h=${resp.data.h}`)
console.log()
const url = `jp?u=${resp.data.u}&h=${resp.data.h}`
window.open(url)
},
async: false
});
+11 -3
View File
@@ -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)