fix 恶意刷新查看量

全局搜索代替了原来长连接的方式,增加了很多隐藏的门路。
This commit is contained in:
limqhz
2022-05-10 15:23:32 +08:00
parent b0b9e80f8a
commit 759843e83d
22 changed files with 258 additions and 84 deletions

View File

@@ -20,10 +20,9 @@
<div class="source-post">
<h2 class="source-post-title" th:text="${source.getSourceName()}"></h2>
<p class="source-post-meta">
上传时间:
<span class="badge-pill badge-primary" th:text="${source.getCategoryName()}">
</span>
<span th:text="${#dates.format(source.getGmtUpdate(),'yyyy-MM-dd HH:mm:ss')}"></span>
类别-
<span th:text="${source.getCategoryName()}"></span>
<span class="ml-1">
<a class="text-danger text-decoration-none" th:fragment="star_refresh" th:id="id_star_refresh"
href="javascript:starFun(this);">
@@ -33,7 +32,7 @@
<svg th:if="${starValue.isStar() != true}" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-heart" viewBox="0 0 16 16">
<path d="m8 2.748-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z"/>
</svg>
收藏
[[${starValue.getTotal()}]]
</a>
</span>
<a href="javascript:downloadFile(this);" class="btn btn-outline-success col-md-2 float-right">下载</a>
@@ -134,6 +133,7 @@
async: false,
data: {"userId": userId, "topicId": topicId},
success: function (data) {
console.log(data);
$('#id_star_refresh').html(data);
}
});