[Spring][쇼핑몰 프로젝트][46] 댓글 체크 - 2

https://kimvampa.tistory.com/292
This commit is contained in:
SeoJin Kim
2022-01-07 18:01:42 +09:00
parent 26d1af539b
commit bbbb5f2ea8
2 changed files with 44 additions and 10 deletions

View File

@@ -314,12 +314,29 @@ const form = {
const memberId = '${member.memberId}';
const bookId = '${goodsInfo.bookId}';
let popUrl = "/replyEnroll/" + memberId + "?bookId=" + bookId;
console.log(popUrl);
let popOption = "width = 490px, height=490px, top=300px, left=300px, scrollbars=yes";
window.open(popUrl,"리뷰 쓰기",popOption);
$.ajax({
data : {
bookId : bookId,
memberId : memberId
},
url : '/reply/check',
type : 'POST',
success : function(result){
if(result === '1'){
alert("이미 등록된 리뷰가 존재 합니다.")
} else if(result === '0'){
let popUrl = "/replyEnroll/" + memberId + "?bookId=" + bookId;
console.log(popUrl);
let popOption = "width = 490px, height=490px, top=300px, left=300px, scrollbars=yes";
window.open(popUrl,"리뷰 쓰기",popOption);
}
}
});
});

View File

@@ -314,12 +314,29 @@ const form = {
const memberId = '${member.memberId}';
const bookId = '${goodsInfo.bookId}';
let popUrl = "/replyEnroll/" + memberId + "?bookId=" + bookId;
console.log(popUrl);
let popOption = "width = 490px, height=490px, top=300px, left=300px, scrollbars=yes";
window.open(popUrl,"리뷰 쓰기",popOption);
$.ajax({
data : {
bookId : bookId,
memberId : memberId
},
url : '/reply/check',
type : 'POST',
success : function(result){
if(result === '1'){
alert("이미 등록된 리뷰가 존재 합니다.")
} else if(result === '0'){
let popUrl = "/replyEnroll/" + memberId + "?bookId=" + bookId;
console.log(popUrl);
let popOption = "width = 490px, height=490px, top=300px, left=300px, scrollbars=yes";
window.open(popUrl,"리뷰 쓰기",popOption);
}
}
});
});