메인 수정
This commit is contained in:
parent
2cb2c81f84
commit
9785b96de6
@ -209,7 +209,7 @@ selectedBoard.value = type;
|
||||
|
||||
// 상세 페이지 이동 (게시판 타입 전달)
|
||||
const goDetail = (id, boardType) => {
|
||||
router.push({ name: 'BoardDetail', params: { id, type: boardType } });
|
||||
router.push({ name: 'BoardDetail', params: { id }, query: { type: boardType } });
|
||||
};
|
||||
|
||||
// 모달이 열릴 때 데이터 로드
|
||||
|
||||
@ -258,13 +258,11 @@
|
||||
// 게시물 상세 데이터 불러오기
|
||||
const fetchBoardDetails = async () => {
|
||||
const { data } = await axios.get(`board/${currentBoardId.value}`);
|
||||
console.log(data)
|
||||
if (data?.data) {
|
||||
const boardData = data.data;
|
||||
profileName.value = boardData.author || '익명';
|
||||
authorId.value = boardData.authorId;
|
||||
type.value = boardData.type === '300103';
|
||||
console.log('type 값은 →', type.value, ' / 타입은 →', typeof type.value);
|
||||
boardTitle.value = boardData.title || '제목 없음';
|
||||
boardContent.value = boardData.content || '';
|
||||
profileImg.value = boardData.profileImg || '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user