Toggle navigation
Toggle navigation
This project
Loading...
Sign in
정지윤
/
project_opensource
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
정지윤
2017-12-06 12:05:48 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e96c4ab2706ef3b0ab6b5f1a74a3de36b87bc21b
e96c4ab2
1 parent
6f12697e
데이터베이스 오류 수정
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
6 deletions
public/img/그림1.jpg
routes/index.js
views/first.ejs
views/pay.ejs
views/reservation.ejs
public/img/그림1.jpg
0 → 100644
View file @
e96c4ab
60.7 KB
routes/index.js
View file @
e96c4ab
...
...
@@ -30,9 +30,8 @@ router.post('/reservation',function(req, res){
var
restime
=
req
.
body
.
restime
;
var
resmin
=
req
.
body
.
resmin
;
var
date
=
req
.
body
.
date
;
var
food
=
req
.
body
.
food
;
var
content
=
req
.
body
.
content
;
var
food
=
req
.
body
.
food
;
pool
.
getConnection
(
function
(
err
,
connection
)
{
// Use the connection
...
...
@@ -40,6 +39,7 @@ router.post('/reservation',function(req, res){
connection
.
query
(
sqlForInsertBoard
,
function
(
err
,
rows
)
{
if
(
err
)
console
.
error
(
"err : "
+
err
);
console
.
log
(
"rows : "
+
JSON
.
stringify
(
rows
));
res
.
redirect
(
'/resconfirm'
);
connection
.
release
();
// Don't use the connection here, it has been returned to the pool.
});
...
...
@@ -75,6 +75,7 @@ router.get('/db', function(req, res){
/* GET home page. */
router
.
get
(
'/pay'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'pay'
,
{
title
:
'결제'
});
res
.
render
(
'first'
);
});
module
.
exports
=
router
;
...
...
views/first.ejs
View file @
e96c4ab
...
...
@@ -63,7 +63,7 @@
<div
class=
"col-lg-8 mx-auto"
>
<h1
class=
"brand-heading"
style=
"background-color: rgba( 0, 0, 0, 0.7 );"
>
별빛바다 달빛초원
</h1>
<p
class=
"intro-text"
>
<br>
정지윤
</p>
<br>
아래로 내리세요
</p>
<a
href=
"#about"
class=
"btn btn-circle js-scroll-trigger"
>
<i
class=
"fa fa-angle-double-down animated"
></i>
</a>
...
...
views/pay.ejs
View file @
e96c4ab
...
...
@@ -44,7 +44,7 @@
buyer_tel
:
'010-8762-3073'
,
buyer_addr
:
'서울특별시 강남구 삼성동'
,
buyer_postcode
:
'123-456'
,
m_redirect_url
:
'http
s://localhost:3000/resconfirm
'
m_redirect_url
:
'http
://localhost:3000/reservation
'
},
function
(
rsp
)
{
if
(
rsp
.
success
)
{
var
msg
=
'결제가 완료되었습니다.'
;
...
...
@@ -52,11 +52,17 @@
msg
+=
'상점 거래ID : '
+
rsp
.
merchant_uid
;
msg
+=
'결제 금액 : '
+
rsp
.
paid_amount
;
msg
+=
'카드 승인번호 : '
+
rsp
.
apply_num
;
}
else
{
alert
(
msg
);
document
.
location
.
href
=
"/reservation"
;
}
else
{
var
msg
=
'결제에 실패하였습니다.'
;
msg
+=
'에러내용 : '
+
rsp
.
error_msg
;
alert
(
msg
);
document
.
location
.
href
=
"/first"
;
}
alert
(
msg
);
});
</script>
</html>
...
...
views/reservation.ejs
View file @
e96c4ab
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment