diff --git a/src/main/java/com/stonedt/intelligence/StonedtPortalApplication.java b/src/main/java/com/stonedt/intelligence/StonedtPortalApplication.java index ad324d0..572da66 100644 --- a/src/main/java/com/stonedt/intelligence/StonedtPortalApplication.java +++ b/src/main/java/com/stonedt/intelligence/StonedtPortalApplication.java @@ -17,5 +17,4 @@ public class StonedtPortalApplication{ } - -} +} \ No newline at end of file diff --git a/src/main/resources/static/dist/timelysearch/monitorsearch.js b/src/main/resources/static/dist/timelysearch/monitorsearch.js index d640c6e..6fa339a 100644 --- a/src/main/resources/static/dist/timelysearch/monitorsearch.js +++ b/src/main/resources/static/dist/timelysearch/monitorsearch.js @@ -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 // } // ); -// } \ No newline at end of file +// } + + +/** + * 获取模版信息 + */ +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 = '' + data[i].engine + ''; + } else { + if (data[i].id == website_id) { + //strdata = ''+data[i].engine; + strdata = '' + data[i].engine + ''; + } else { + //strdata = ''+data[i].engine; + strdata = '' + data[i].engine + ''; + } + + + } + + + + + 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); + + + + + } + }); + + + + + + +} \ No newline at end of file diff --git a/src/main/resources/templates/timely_search/search_result.html b/src/main/resources/templates/timely_search/search_result.html index 93ffb21..d03140c 100644 --- a/src/main/resources/templates/timely_search/search_result.html +++ b/src/main/resources/templates/timely_search/search_result.html @@ -415,8 +415,8 @@ $("#currentyear").text((new Date()).getFullYear()); } - - + th:src="@{/dist/timelysearch/search_result_data.js?unixtemp=1234567}"> + + \ No newline at end of file