Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
石磊
/
cihai
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5bbf20bc
authored
Dec 07, 2017
by
侯昆
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
双击bug
1 parent
c7810746
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/portal/theme/detail.jsp
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/portal/theme/detail.jsp
View file @
5bbf20b
...
@@ -321,14 +321,16 @@
...
@@ -321,14 +321,16 @@
var mapData = {};
var mapData = {};
var relateData = {};
var relateData = {};
var map = loadMap();
var map = null;
var wordAnalysis = loadRelated();
var related = null;
loadMap();
loadRelated();
function loadMap() {
function loadMap() {
jQuery.get(location.href + "/map", {}, function (data) {
jQuery.get(location.href + "/map", {}, function (data) {
if (data.code == "OK") {
if (data.code == "OK") {
mapData = data.data;
mapData = data.data;
return
newNetwork('relation-pic', mapData);
map =
newNetwork('relation-pic', mapData);
} else {
} else {
console.log("请求数据失败");
console.log("请求数据失败");
}
}
...
@@ -339,7 +341,7 @@
...
@@ -339,7 +341,7 @@
jQuery.get(location.href + "/related", {}, function (data) {
jQuery.get(location.href + "/related", {}, function (data) {
if (data.code == "OK") {
if (data.code == "OK") {
relateData = data.data;
relateData = data.data;
re
turn
newNetwork('word-analysis', relateData);
re
lated=
newNetwork('word-analysis', relateData);
} else {
} else {
console.log("请求数据失败");
console.log("请求数据失败");
}
}
...
@@ -366,7 +368,6 @@
...
@@ -366,7 +368,6 @@
},
},
});
});
netWork.on("doubleClick", function (e) {
netWork.on("doubleClick", function (e) {
console.log(e);
var i = e.nodes[0];
var i = e.nodes[0];
var node = _.filter(data.nodes, function (n) {
var node = _.filter(data.nodes, function (n) {
return n.id == i;
return n.id == i;
...
@@ -384,7 +385,7 @@
...
@@ -384,7 +385,7 @@
$('.js-refresh').click(function () {
$('.js-refresh').click(function () {
wordAnalysis
.destroy();
related
.destroy();
loadRelated();
loadRelated();
});
});
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment