Commit a7f41c42 by 侯昆

添加链接

1 parent 388d41da
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<div class="word-list"> <div class="word-list">
<%--@elvariable id="wordCounts" type="java.util.List<com.dookay.cihai.core.aip.model.WordCount>"--%> <%--@elvariable id="wordCounts" type="java.util.List<com.dookay.cihai.core.aip.model.WordCount>"--%>
<c:forEach items="${wordCounts}" var="item"> <c:forEach items="${wordCounts}" var="item">
<div class="item">${item.label}</div> <div class="item j_search">${item.label}</div>
</c:forEach> </c:forEach>
</div> </div>
</div> </div>
...@@ -319,6 +319,11 @@ ...@@ -319,6 +319,11 @@
<script src="${ctx}/static/js/special.js"></script> <script src="${ctx}/static/js/special.js"></script>
<script> <script>
var mapData = {};
var relateData = {};
var map = loadMap();
var wordAnalysis = 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") {
...@@ -383,8 +388,15 @@ ...@@ -383,8 +388,15 @@
loadRelated(); loadRelated();
}); });
var mapData = {}; $('.j_search').click(function(e){
var relateData = {}; e.preventDefault();
var map = loadMap(); jQuery.get("/home/search", {keyword: $(this).text()}, function (data) {
var wordAnalysis = loadRelated(); if (data.code == "OK") {
location.href = data.data;
} else {
myApp.dialog.alert(data.message);
}
})
})
</script> </script>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!