Skip to content

Commit

Permalink
更新:优化引用的评论跳转链接
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuchunshu committed Mar 21, 2023
1 parent a284b8d commit d49b624
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions app/Plugins/Comment/helpers.php
Expand Up @@ -34,13 +34,7 @@ function get_topic_comment_page(string|int $comment_id): int
} else {
$CommentOrderBy = 'asc';
}
if (! request()->input('comment_sort')) {
$comment_sort = $CommentOrderBy;
} elseif (request()->input('comment_sort') === 'asc' || request()->input('comment_sort') === 'desc') {
$comment_sort = request()->input('comment_sort');
} else {
$comment_sort = $CommentOrderBy;
}
$comment_sort = $CommentOrderBy;
for ($i = 0; $i < $lastPage; ++$i) {
$page = $i + 1;
$data = TopicComment::query()
Expand Down
Expand Up @@ -27,7 +27,7 @@
</div>
{{-- 楼层信息--}}
<div class="col-auto">
<a class="badge badge-pill bg-teal" href="/{{$value->topic_id}}.html">访问所在帖子</a>
<a class="badge badge-pill bg-teal" href="{{get_topic_comment_url($value->id)}}">查看评论</a>
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion app/Plugins/User/resources/views/home/comment.blade.php
Expand Up @@ -31,7 +31,7 @@
</div>
{{-- 楼层信息--}}
<div class="col-auto">
<a class="badge badge-pill bg-teal" href="/{{$value->topic_id}}.html">访问所在帖子</a>
<a class="badge badge-pill bg-teal" href="{{get_topic_comment_url($value->id)}}">查看评论</a>
</div>

</div>
Expand Down

0 comments on commit d49b624

Please sign in to comment.