This commit is contained in:
dyhj625 2025-04-01 11:44:45 +09:00
parent 5cb43eac9f
commit c6f2743d82

View File

@ -80,7 +80,7 @@
></div> ></div>
<!-- 좋아요 버튼 --> <!-- 좋아요 버튼 -->
<div v-if="unknown" class="row justify-content-center my-10"> <div v-if="!type" class="row justify-content-center my-10">
<BoardRecommendBtn <BoardRecommendBtn
:bigBtn="true" :bigBtn="true"
:boardId="currentBoardId" :boardId="currentBoardId"
@ -92,7 +92,7 @@
@updateReaction="handleUpdateReaction" @updateReaction="handleUpdateReaction"
/> />
</div> </div>
<div v-if="unknown" > <div v-if="!type" >
<!-- 댓글 입력 영역 --> <!-- 댓글 입력 영역 -->
<BoardCommentArea <BoardCommentArea
:profileName="profileName" :profileName="profileName"
@ -106,7 +106,7 @@
</div> </div>
<!-- 댓글 목록 --> <!-- 댓글 목록 -->
<div v-if="unknown" class="card-footer"> <div v-if="!type" class="card-footer">
<BoardCommentList <BoardCommentList
:unknown="unknown" :unknown="unknown"
:comments="commentsWithAuthStatus" :comments="commentsWithAuthStatus"
@ -230,6 +230,7 @@
const isDeleted = ref(true); const isDeleted = ref(true);
const commentAlert = ref(''); const commentAlert = ref('');
const boardPasswordAlert = ref(''); const boardPasswordAlert = ref('');
const type = ref('');
const updatePassword = newPassword => { const updatePassword = newPassword => {
password.value = newPassword; password.value = newPassword;
@ -257,10 +258,13 @@
// //
const fetchBoardDetails = async () => { const fetchBoardDetails = async () => {
const { data } = await axios.get(`board/${currentBoardId.value}`); const { data } = await axios.get(`board/${currentBoardId.value}`);
console.log(data)
if (data?.data) { if (data?.data) {
const boardData = data.data; const boardData = data.data;
profileName.value = boardData.author || '익명'; profileName.value = boardData.author || '익명';
authorId.value = boardData.authorId; authorId.value = boardData.authorId;
type.value = boardData.type === '300103';
console.log('type 값은 →', type.value, ' / 타입은 →', typeof type.value);
boardTitle.value = boardData.title || '제목 없음'; boardTitle.value = boardData.title || '제목 없음';
boardContent.value = boardData.content || ''; boardContent.value = boardData.content || '';
profileImg.value = boardData.profileImg || ''; profileImg.value = boardData.profileImg || '';