Browse Source

bug修复

master
wangyi15124 1 year ago
parent
commit
071c7b88d8
3 changed files with 79 additions and 28 deletions
  1. +1
    -2
      src/main/java/com/stonedt/intelligence/StonedtPortalApplication.java
  2. +75
    -23
      src/main/resources/static/dist/timelysearch/monitorsearch.js
  3. +3
    -3
      src/main/resources/templates/timely_search/search_result.html

+ 1
- 2
src/main/java/com/stonedt/intelligence/StonedtPortalApplication.java View File

@@ -17,5 +17,4 @@ public class StonedtPortalApplication{


}

}
}

+ 75
- 23
src/main/resources/static/dist/timelysearch/monitorsearch.js View File

@@ -406,28 +406,8 @@ $('body').on(
var stype = $(this).attr("data-id");
gettempleteinfo(stype, 0);
pageHelper(1, totalPage);
var keywords = $("#searchWord").val();
var website_id = '';
$('span[data-engine]').each(function() {
if ($(this).hasClass('badge-info')) {
website_id = $(this).data('engine');
}
});
debugger;
loadContent(stype, keywords, website_id, 1);
let url = "result?website_id=" + website_id + "&pageNoData=1&keyword=" + keywords +
"&stype=" + stype + "&fulltype=" + stype;
console.info("22222222222"+url);
setUrl(url);
gettempleteinfo2(stype, 0);
}
})
@@ -539,4 +519,76 @@ function pageHelper(currentPage, totalPages) {
// useBootstrapTooltip: false
// }
// );
// }
// }


/**
* 获取模版信息
*/
function gettempleteinfo2(fulltype, website_id) {
debugger;
$.ajax({
url: "/timelysearch/templete?stype=" + fulltype,
type: "get",
//async:false,
success: function(data) {
let resultdata = '';
if (data.length > 0) {
for (let i = 0; i < data.length; i++) {
let strdata = '';
if (website_id == 0 && i == 0) {
strdata = '<span data-engine="' + data[i].id +
'" class="badge badge-pill badge-info">' + data[i].engine + '</span>';
} else {
if (data[i].id == website_id) {
//strdata = '<input type="radio" value="'+data[i].id+'" name="sex" checked/>'+data[i].engine;
strdata = '<span data-engine="' + data[i].id +
'" class="badge badge-pill badge-info">' + data[i].engine + '</span>';
} else {
//strdata = '<input type="radio" value="'+data[i].id+'" name="sex"/>'+data[i].engine;
strdata = '<span data-engine="' + data[i].id +
'" class="badge badge-pill badge-light">' + data[i].engine + '</span>';
}
}
resultdata += strdata;
}
}
$("#engine").html(resultdata);
pageHelper(1, totalPage);
var keywords = $("#searchWord").val();
//var website_id = '';
$('span[data-engine]').each(function() {
if ($(this).hasClass('badge-info')) {
website_id = $(this).data('engine');
}
});
debugger;
loadContent(fulltype, keywords, website_id, 1);
let url = "result?website_id=" + website_id + "&pageNoData=1&keyword=" + keywords +
"&stype=" + fulltype + "&fulltype=" + fulltype;
console.info("22222222222"+url);
setUrl(url);
}
});
}

+ 3
- 3
src/main/resources/templates/timely_search/search_result.html View File

@@ -415,8 +415,8 @@ $("#currentyear").text((new Date()).getFullYear());
}
</script>
<script
th:src="@{/dist/timelysearch/search_result_data.js?unixtemp=122222333222222211132}"></script>
<script th:src="@{/dist/timelysearch/search_result.js?unixtemp=122222312221132222332}"></script>
<script th:src="@{/dist/timelysearch/monitorsearch.js?unixtemp=1222221221122233332}"></script>
th:src="@{/dist/timelysearch/search_result_data.js?unixtemp=1234567}"></script>
<script th:src="@{/dist/timelysearch/search_result.js?unixtemp=1234567}"></script>
<script th:src="@{/dist/timelysearch/monitorsearch.js?unixtemp=1234567}"></script>
</body>
</html>

Loading…
Cancel
Save