评论楼层计算有bug

发表:2年前 更新:1年前

如果在后台改了每次加载多少条评论? 那楼层就算错了,目前的算法都是默认一页 10 条,链接也错了,这个可以通过修改模版修复

<a class="text-reset" href="/{{$data->id}}.html/{{ ($key + 1)+(($comment->currentPage()-1)*get_options('comment_page_count')) }}?page={{$comment->currentPage()}}">{{ ($key + 1)+(($comment->currentPage()-1)*get_options('comment_page_count')) }}楼</a>

不过回复的评论中引用的 {{$value->parent_id}} 就没法修复

uploadtopic202204042516490452490z4r3mZjG3.png

signature
这个人没有签名

全部评论

zhuchunshu

发表 :2年前

好的,下个版本将会修复 ?️

next
zhuchunshu

发表 :2年前

不过回复的评论中引用的 {{$value->parent_id}} 就没法修复

uploadtopic202204042516490452490z4r3mZjG3.png

因为这串代码是获取的当前评论页面 foreach 里面的 key 的值来计算的楼层,所以你这样会出错,你等我下次更新,加上获取

next
zhuchunshu

发表 :2年前

[topic] 短代码使用出错

评论

无权限

请登录后评论