보드프로필

This commit is contained in:
dyhj625 2025-02-10 15:57:23 +09:00
parent 4ebab7cf95
commit 296dd2452a

View File

@ -74,9 +74,9 @@ const router = useRouter();
// Props
const props = defineProps({
boardId: {
type: Number,
required: true
boardId: {
type: Number,
required: true
},
profileName: {
type: String,
@ -125,7 +125,7 @@ const handleEdit = () => {
// router.push({ name: 'BoardEdit', params: { id: boardId } });
if (props.unknown) {
togglePassword('edit');
togglePassword('edit');
} else {
router.push({ name: 'BoardEdit', params: { id: 100 } }); //
}
@ -151,16 +151,33 @@ const togglePassword = (button) => {
};
//
const handlePasswordSubmit = () => {
const handlePasswordSubmit = async () => {
isPassword.value = false;
lastClickedButton.value = null;
console.log('비밀번호:', password.value);
console.log(props.boardId)
try {
const requestData = {
LOCBRDPWD: password.value,
LOCBRDSEQ: 288
}
// router.push({ name: 'BoardEdit', params: { id: props.boardId } }); //
console.log(requestData)
const postResponse = await axios.post(`board/${props.boardId}/password`, requestData);
console.log('post결과:', postResponse.data)
// if (response.data.code === 200 && response.data.data === true) {
// console.log(""); //
// } else {
// console.log(" .");
// }
} catch (error) {
console.error('비밀번호 확인 중 오류 발생:', error);
}
};
const deletePost = async () => {