修复评论500问题

This commit is contained in:
1152958806@qq.com 2023-08-28 01:43:06 +08:00
parent 247f1b9c9f
commit b7c0044f64
4 changed files with 4 additions and 4 deletions

View File

@ -235,7 +235,7 @@ var btf = {
})
}
))
document.querySelectorAll('#article-container .timeline')[0]?.classList.remove("loadings");
document.querySelectorAll('#article-container .loadings')[0]?.classList.remove("loadings");
},
diffDate: (d, more = false) => {

View File

@ -7,7 +7,7 @@
<th:block th:if="${#strings.equals(theme.config.comments.use, 'commentWidget') }">
<div class="aside-list-item" th:each="comment,iterStat : ${commentFinder.list(null, 1, 20)}"
th:with="page = ${comment.spec.subjectRef.kind == 'Post' ? postFinder.getByName(comment.spec.subjectRef.name) :
comment.spec.subjectRef.kind == 'SinglePage' ? singlePageFinder.getByName(comment.spec.subjectRef.name) : null},
comment.spec.subjectRef.kind == 'SinglePage' && not #strings.contains('photos,links,moments', comment.spec.subjectRef.name) ? singlePageFinder.getByName(comment.spec.subjectRef.name) : null},
url = ${page == null? '/' : page.status.permalink + '#comment-' + comment.metadata.name}"
th:if="${iterStat.index < theme.config.sidebar.newcommentnumber}">
<span th:text="${commentIndex}"></span>

View File

@ -19,7 +19,7 @@
<!-- BUG由于当前的列出所有评论API无过滤功能非文章页的评论无法查询到页面信息所以非文章评论跳转至首页-->
<div class="aside-list-item" th:each="comment,iterStat : ${commentFinder.list(null, 1, 20)}"
th:with="page = ${comment.spec.subjectRef.kind == 'Post' ? postFinder.getByName(comment.spec.subjectRef.name) :
comment.spec.subjectRef.kind == 'SinglePage' ? singlePageFinder.getByName(comment.spec.subjectRef.name) : null},
comment.spec.subjectRef.kind == 'SinglePage' && not #strings.contains('photos,links,moments', comment.spec.subjectRef.name) ? singlePageFinder.getByName(comment.spec.subjectRef.name) : null},
url = ${page == null? '/' : page.status.permalink + '#comment-' + comment.metadata.name}"
th:if="${iterStat.index < 6}" >
<a th:href="${url}" class="thumbnail" data-pjax-state="">

View File

@ -192,7 +192,7 @@
<!--/* 评论组件 */-->
<th:block th:replace="~{modules/comment :: comment(group = 'content.halo.run',
kind = 'SinglePage',
name = 'moments',
name = 'photos',
allowComment = true)}" />
</div>