Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이유제
/
CultureGallery
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
송효섭
2020-12-05 06:06:42 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
071a71b7c663d73ab8617942a8d412ff7d15934c
071a71b7
1 parent
748405a7
로그인 및 공유 router 수정, 공유기능 분리
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
10 deletions
public/javascripts/send.js
routes/index.js
routes/login.js
views/login.html
views/send.html
public/javascripts/send.js
0 → 100644
View file @
071a71b
function
sendLink
(){
Kakao
.
init
(
'0678e32dab56db1c52ac63ab4ccb7663'
)
Kakao
.
Link
.
sendDefault
({
objectType
:
'feed'
,
content
:{
title
:
"관심있는 공연 정보"
,
description
:
'주소-> http://naver.com'
,
imageUrl
:
'http://k.kakaocdn.net/dn/Q2iNx/btqgeRgV54P/VLdBs9cvyn8BJXB3o7N8UK/kakaolink40_original.png'
,
link
:{
mobileWebUrl
:
'http://naver.com'
,
webUrl
:
'http://naver.com'
,
},
},
buttons
:
[
{
title
:
'웹으로 보기'
,
link
:
{
mobileWebUrl
:
'http://naver.com'
,
webUrl
:
'http://naver.com'
,
},
},
{
title
:
'웹으로 보기'
,
link
:
{
mobileWebUrl
:
'http://naver.com'
,
webUrl
:
'http://naver.com'
,
},
},
],
})
};
\ No newline at end of file
routes/index.js
View file @
071a71b
...
...
@@ -9,7 +9,17 @@ router.get('/', function (req, res, next) {
/* GET home page. */
router
.
get
(
'/login'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'login.html'
,
{
title
:
'Login
1
'
});
res
.
render
(
'login.html'
,
{
title
:
'Login'
});
console
.
log
(
'로그인 페이지 접속 성공'
);
});
// router.get('/login/:id', function (req, res) {
// var id = req.params.id;
// console.log('id 할당 접속 성공');
// });
router
.
get
(
'/send'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'send.html'
,
{
title
:
'Send message'
});
console
.
log
(
'카카오톡 공유 메시지 접속 성공'
);
})
module
.
exports
=
router
;
\ No newline at end of file
...
...
routes/login.js
View file @
071a71b
//index로 통합 되서 안 쓸 예정 --> merge 다 하면 삭제하기
var
express
=
require
(
'express'
);
var
router
=
express
.
Router
();
var
fs
=
require
(
'fs'
);
...
...
@@ -8,9 +9,6 @@ router.get('/login', function (req, res, next) {
if
(
url
==
'/'
)
{
url
=
'send.html'
;
}
if
(
url
==
'/loginmainpage'
)
{
url
=
'loginmainpage.html'
;
}
response
.
writeHead
(
200
);
response
.
end
(
fs
.
readFileSync
(
__dirname
+
url
));
console
.
log
(
'로그인 페이지 접속 성공'
);
...
...
views/login.html
View file @
071a71b
...
...
@@ -32,6 +32,7 @@
</header>
</body>
<script>
// 카카오 계정으로
Kakao
.
init
(
'0678e32dab56db1c52ac63ab4ccb7663'
);
console
.
log
(
Kakao
.
isInitialized
());
...
...
views/send.html
View file @
071a71b
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<head>
<meta
charset=
"utf-8"
/>
<title>
send page title
</title>
<script
src=
"https://developers.kakao.com/sdk/js/kakao.js"
></script>
<script
src=
"send.js"
></script>
</head>
<body>
<script
src=
"../javascripts/send.js"
></script>
</head>
<body>
<a
onclick=
"sendLink()"
>
보내기
</a>
</body>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment