익명페이지에서 로그인 댓글 이미지 보이게 수정
This commit is contained in:
parent
1500ea25e0
commit
4bab9ed5f0
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<BoardProfile
|
||||
:unknown="unknown"
|
||||
:unknown="comment.author === '익명'"
|
||||
:isCommentAuthor="isCommentAuthor"
|
||||
:boardId="comment.boardId"
|
||||
:profileName="comment.author"
|
||||
@ -29,8 +29,8 @@
|
||||
</div>
|
||||
<span v-if="passwordCommentAlert" class="invalid-feedback d-block text-start">{{ passwordCommentAlert }}</span>
|
||||
</div>
|
||||
<p>authorId:{{ comment.authorId }}</p>
|
||||
<p>코멘트 비교: {{comment.isCommentAuthor}}</p>
|
||||
<!-- <p>authorId:{{ comment.authorId }}</p>
|
||||
<p>코멘트 비교: {{comment.isCommentAuthor}}</p> -->
|
||||
|
||||
|
||||
<div class="mt-6">
|
||||
@ -47,20 +47,21 @@
|
||||
</div>
|
||||
|
||||
<PlusButton v-if="isPlusButton" @click="toggleComment" class="mt-6"/>
|
||||
<BoardCommentArea v-if="isComment" @submitComment="submitComment"/>
|
||||
<BoardCommentArea v-if="isComment" :unknown="unknown" @submitComment="submitComment"/>
|
||||
|
||||
<!-- 대댓글 -->
|
||||
<ul v-if="comment.children && comment.children.length" class="list-unstyled">
|
||||
<li
|
||||
v-for="child in comment.children"
|
||||
:key="child.commentId"
|
||||
v-for="child in comment.children"
|
||||
:key="child.commentId"
|
||||
class="mt-8 pt-6 ps-10 border-top"
|
||||
>
|
||||
<!-- <p>대댓글 데이터(JSON): {{ JSON.stringify(child, null, 2) }}</p> -->
|
||||
<!-- <p>comment child: {{ comment.children }}</p> -->
|
||||
<!-- :unknown="child.author === '익명'" -->
|
||||
<BoardComment
|
||||
:comment="child"
|
||||
:unknown="unknown"
|
||||
:unknown="child.author === '익명'"
|
||||
:isPlusButton="false"
|
||||
:isLike="true"
|
||||
:isCommentProfile="true"
|
||||
|
||||
@ -79,14 +79,10 @@ const props = defineProps({
|
||||
|
||||
const comment = ref('');
|
||||
const password = ref('');
|
||||
const isCheck = ref('');
|
||||
const isCheck = ref(props.unknown);
|
||||
|
||||
const emit = defineEmits(['submitComment']);
|
||||
|
||||
watch(() => props.unknown, (newVal) => {
|
||||
isCheck.value = newVal;
|
||||
});
|
||||
|
||||
function handleCommentSubmit() {
|
||||
emit('submitComment', {
|
||||
comment: comment.value,
|
||||
|
||||
@ -76,9 +76,9 @@
|
||||
@updateReaction="handleUpdateReaction"
|
||||
/>
|
||||
</div>
|
||||
<p>현재 로그인한 사용자 ID: {{ currentUserId }}</p>
|
||||
<!-- <p>현재 로그인한 사용자 ID: {{ currentUserId }}</p>
|
||||
<p>게시글 작성자: {{ authorId }}</p>
|
||||
<p>isAuthor 값: {{ isAuthor }}</p>
|
||||
<p>isAuthor 값: {{ isAuthor }}</p> -->
|
||||
<!-- <p>use이미지:{{userStore.user.img}}</p> -->
|
||||
<!-- <img :src="`http://localhost:10325/upload/img/profile/${userStore.user.profile}`" alt="Profile Image" class="w-px-40 h-auto rounded-circle"/> -->
|
||||
|
||||
@ -208,7 +208,7 @@ const fetchBoardDetails = async () => {
|
||||
const response = await axios.get(`board/${currentBoardId.value}`);
|
||||
const data = response.data.data;
|
||||
|
||||
// console.log(data)
|
||||
console.log(data)
|
||||
|
||||
// API 응답 데이터 반영
|
||||
// const boardDetail = data.boardDetail || {};
|
||||
@ -372,12 +372,12 @@ const fetchComments = async (page = 1) => {
|
||||
|
||||
// 댓글 작성
|
||||
const handleCommentSubmit = async ({ comment, password }) => {
|
||||
console.log('댓글')
|
||||
// console.log('댓글')
|
||||
//비밀번호 입력 안했을시
|
||||
// if (!password) {
|
||||
// passwordAlert.value = "비밀번호를 입력해야 합니다.";
|
||||
// return;
|
||||
// }
|
||||
if (unknown && !password) {
|
||||
passwordAlert.value = "비밀번호를 입력해야 합니다.";
|
||||
return;
|
||||
}
|
||||
|
||||
// console.log('비밀번호 눌렀음')
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user