fix: 评论系统全量检查修复(7 项 Gap 全部修复)
- Delete 权限:新增 requesterID/isAdmin 参数,Service 层鉴权(仅本人/管理员可删)
- 通知内容:改用 GetUsernameByID 显示真实用户名,非数字 UID
- SearchUsers:Repository 返回 exp,Service 调用 GetLevelByExp 计算等级
- 通知高亮:Notification 新增 CommentID 字段,消息链接支持 #comment-{id}
- 已删除提示:前端 hash 检测 + 3 秒超时 Toast "该评论已不存在"
- Admin CSS:移除不存在的 comments.css 引用
- 错误哨兵:改用 common.ErrCommentNotFound/ErrCommentEmpty/PermissionDenied
This commit is contained in:
@ -42,7 +42,11 @@
|
||||
{{if or (eq $m.NotifyType "post_approved") (eq $m.NotifyType "post_rejected")}}
|
||||
{{$link = printf "/posts/%d" (derefUint $m.RelatedID)}}
|
||||
{{else if or (eq $m.NotifyType "comment") (eq $m.NotifyType "comment_reply")}}
|
||||
{{$link = printf "/posts/%d#comments" (derefUint $m.RelatedID)}}
|
||||
{{if $m.CommentID}}
|
||||
{{$link = printf "/posts/%d#comment-%d" (derefUint $m.RelatedID) (derefUint $m.CommentID)}}
|
||||
{{else}}
|
||||
{{$link = printf "/posts/%d#comments" (derefUint $m.RelatedID)}}
|
||||
{{end}}
|
||||
{{else if or (eq $m.NotifyType "audit_approved") (eq $m.NotifyType "audit_rejected")}}
|
||||
{{$link = "/settings"}}
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user