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 caf9335b
authored
Dec 07, 2017
by
侯昆
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
图谱跳转
1 parent
dec545c2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
11 deletions
serverside/cihai-core/src/main/java/com/dookay/cihai/core/aip/AipImageClassifyClient.java
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/include/footer.jsp
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/portal/theme/detail.jsp
serverside/cihai-wechat/src/main/webapp/static/js/plugins/lodash.core.js
serverside/cihai-core/src/main/java/com/dookay/cihai/core/aip/AipImageClassifyClient.java
View file @
caf9335
...
...
@@ -19,7 +19,6 @@ package com.dookay.cihai.core.aip;
import
com.alibaba.fastjson.JSON
;
import
com.baidu.aip.imageclassify.AipImageClassify
;
import
com.baidu.aip.util.Base64Util
;
import
com.dookay.cihai.core.aip.config.AipProperties
;
import
com.dookay.cihai.core.aip.enums.ImageInputTypeEnum
;
import
com.dookay.cihai.core.aip.model.ImageResult
;
import
com.dookay.coral.common.core.exception.ServiceException
;
...
...
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/include/footer.jsp
View file @
caf9335
...
...
@@ -4,6 +4,7 @@
<%--添加此行消除额外空格--%>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="${ctx}/static/js/vendor.js"></script>
<script src="${ctx}/static/js/plugins/lodash.core.js"></script>
<script src="${ctx}/static/js/backend.js"></script>
<script src="${ctx}/static/js/layer/layer.js"></script>
<script src="${ctx}/static/js/main.js"></script>
...
...
serverside/cihai-wechat/src/main/webapp/WEB-INF/jsp/portal/theme/detail.jsp
View file @
caf9335
...
...
@@ -323,7 +323,7 @@
jQuery.get(location.href + "/map", {}, function (data) {
if (data.code == "OK") {
mapData = data.data;
re
lationPic
('relation-pic', mapData);
re
turn newNetwork
('relation-pic', mapData);
} else {
console.log("请求数据失败");
}
...
...
@@ -333,8 +333,8 @@
function loadRelated() {
jQuery.get(location.href + "/related", {}, function (data) {
if (data.code == "OK") {
map
Data = data.data;
re
lationPic
('word-analysis', relateData);
relate
Data = data.data;
re
turn newNetwork
('word-analysis', relateData);
} else {
console.log("请求数据失败");
}
...
...
@@ -342,8 +342,8 @@
}
function
relationPic
(id, data) {
return new vis.Network(document.getElementById(id), mapD
ata, {
function
newNetwork
(id, data) {
var netWork = new vis.Network(document.getElementById(id), d
ata, {
nodes: {
shape: 'dot',
borderWidth: 3,
...
...
@@ -357,11 +357,27 @@
},
font: {
color: '#333'
},
},
});
netWork.on("doubleClick", function (e) {
console.log(e);
var i = e.nodes[0];
var node = _.filter(data.nodes, function (n) {
return n.id == i;
});
jQuery.get("/home/search", {keyword: node[0].label}, function (data) {
if (data.code == "OK") {
location.href = data.data;
} else {
myApp.dialog.alert(data.message);
}
}
}
)
});
return netWork;
};
$('.js-refresh').click(function () {
wordAnalysis.destroy();
loadRelated();
...
...
@@ -369,8 +385,6 @@
var mapData = {};
var relateData = {};
relationPic('relation-pic', mapData);
var wordAnalysis = relationPic('word-analysis', mapData);
loadMap();
loadRelated();
var map = loadMap();
var wordAnalysis = loadRelated();
</script>
serverside/cihai-wechat/src/main/webapp/static/js/plugins/lodash.core.js
0 → 100644
View file @
caf9335
This diff could not be displayed because it is too large.
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