익명 null 수정
This commit is contained in:
parent
cd01f0767e
commit
c6bb8788d8
@ -61,7 +61,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
profileName: {
|
profileName: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '익명 사용자',
|
default: null,
|
||||||
},
|
},
|
||||||
unknown: {
|
unknown: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|||||||
@ -149,7 +149,7 @@ const comments = ref([]);
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const currentBoardId = ref(Number(route.params.id));
|
const currentBoardId = ref(Number(route.params.id));
|
||||||
const unknown = computed(() => profileName.value === '익명 사용자');
|
const unknown = computed(() => profileName.value === null);
|
||||||
const currentUserId = ref('김자바'); // 현재 로그인한 사용자 id
|
const currentUserId = ref('김자바'); // 현재 로그인한 사용자 id
|
||||||
const authorId = ref(null); // 작성자 id
|
const authorId = ref(null); // 작성자 id
|
||||||
|
|
||||||
@ -190,10 +190,10 @@ const fetchBoardDetails = async () => {
|
|||||||
// API 응답 데이터 반영
|
// API 응답 데이터 반영
|
||||||
// const boardDetail = data.boardDetail || {};
|
// const boardDetail = data.boardDetail || {};
|
||||||
|
|
||||||
profileName.value = data.author || '익명 사용자';
|
profileName.value = data.author || null;
|
||||||
|
|
||||||
// 익명확인하고 싶을때
|
// 익명확인하고 싶을때
|
||||||
profileName.value = '익명 사용자';
|
// profileName.value = 'null;
|
||||||
|
|
||||||
// 게시글의 작성자 여부를 확인 : 현재 로그인한 사용자가 이 게시글의 작성자인지 여부
|
// 게시글의 작성자 여부를 확인 : 현재 로그인한 사용자가 이 게시글의 작성자인지 여부
|
||||||
authorId.value = data.author;
|
authorId.value = data.author;
|
||||||
@ -277,7 +277,7 @@ const fetchComments = async (page = 1) => {
|
|||||||
commentId: comment.LOCCMTSEQ, // 댓글 ID
|
commentId: comment.LOCCMTSEQ, // 댓글 ID
|
||||||
boardId: comment.LOCBRDSEQ,
|
boardId: comment.LOCBRDSEQ,
|
||||||
parentId: comment.LOCCMTPNT, // 부모 ID
|
parentId: comment.LOCCMTPNT, // 부모 ID
|
||||||
author: comment.author || "익명 사용자",
|
author: comment.author || null,
|
||||||
content: comment.LOCCMTRPY,
|
content: comment.LOCCMTRPY,
|
||||||
likeCount: comment.likeCount || 0,
|
likeCount: comment.likeCount || 0,
|
||||||
dislikeCount: comment.dislikeCount || 0,
|
dislikeCount: comment.dislikeCount || 0,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user