보드프로필
This commit is contained in:
parent
4ebab7cf95
commit
296dd2452a
@ -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 () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user