diff --git a/pages/post/_id.vue b/pages/post/_id.vue index 9659bcc..6a25103 100644 --- a/pages/post/_id.vue +++ b/pages/post/_id.vue @@ -53,7 +53,7 @@ .comment-userinfo(v-else) .comment-avatar img(:src="visitorInfo.avatarURL") - .comment-nickname {{ visitorInfo.nickname }} + .comment-nickname {{ visitorInfo.nickname ? visitorInfo.nickname : (visitorInfo.username || '匿名') }} .comment-logout(@click="commentLogout") 退出 .comment-btn(@click="commentCommit('editor')") 发布 .comment-reply-commit(id="comment-reply-commit", v-show="replyID") @@ -65,7 +65,7 @@ .comment-userinfo(v-else) .comment-avatar img(:src="visitorInfo.avatarURL") - .comment-nickname {{ visitorInfo.nickname }} + .comment-nickname {{ visitorInfo.nickname ? visitorInfo.nickname : (visitorInfo.username || '匿名') }} .comment-logout(@click="commentLogout") 退出 .comment-btn(@click="commentCommit('editor-reply')") 发布 ins.adsbygoogle(style="display:block; text-align:center; margin-top:20px;", data-ad-layout="in-article", data-ad-format="fluid", data-ad-client="ca-pub-2143583075951360", data-ad-slot="4741804954")