第一步: 打开需要复制的脑图
第二步: 获取页面初始化的数据

第三步:复制到百度脑图的那个页面

第四步: 获取目标的数据, 并且实例化到本地


第五步: 添加一个函数, 这个函数把 processOn 的数据转化为百度脑图需要的数据格式;
function reback(obj) { obj.forEach(e=>{ if(e.children) reback(e.children); if(!e["data"]) e["data"] = {}; e["data"]["text"] = e["title"]; e["data"]["note"] = e["note"]; e["data"]["created"] = new Date().getTime(); }); }
reback(jsonData);
第六步: 提交数据
$.post("/bos/save", {fileGuid: fileGuid, csrf_token: csrf_token, strJson: JSON.stringify(data)}, function() {});
网友评论