Toggle navigation
Toggle navigation
This project
Loading...
Sign in
공태현
/
healthcare-with-webcam
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
공태현
2022-06-07 00:58:50 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
381096f776f0756063d2f9e77ceaca7d5fc7fcdc
381096f7
1 parent
67d396a3
Update squart.html
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
2 deletions
server.js
views/mainPage/main.html
views/mainPage/main.js
views/squartPage/squart.html
views/squartPage/squart.js
server.js
View file @
381096f
...
...
@@ -51,6 +51,10 @@ app.get('/', (req,res) => {
app
.
get
(
'/main.js'
,
(
req
,
res
)
=>
{
res
.
sendFile
(
__dirname
+
'/views/mainPage/main.js'
)
})
// js 파일 전송.
app
.
get
(
'/squart.js'
,
(
req
,
res
)
=>
{
res
.
sendFile
(
__dirname
+
'/views/squartPage/squart.js'
)
})
app
.
get
(
'/squart'
,
(
req
,
res
)
=>
{
if
(
req
.
session
.
user
)
...
...
@@ -158,7 +162,7 @@ app.get('/api/users/logout', (req,res) => {
})
// 스쿼트 갯수 업데이트 API
app
.
post
(
'/api/users/countupdate'
,
(
req
,
res
)
=>
{
var
userName
=
req
.
body
.
name
var
userCount
=
req
.
body
.
count
...
...
views/mainPage/main.html
View file @
381096f
...
...
@@ -22,5 +22,12 @@
로그인
</button>
</div>
<div>
<input
id =
"register_name"
type =
"text"
placeholder=
"이름"
>
<input
id =
"register_password"
type =
"text"
placeholder =
"비밀번호"
>
<button
type =
"submit"
id =
"register_button"
>
회원가입
</button>
</div>
</body>
</html>
\ No newline at end of file
...
...
views/mainPage/main.js
View file @
381096f
...
...
@@ -38,3 +38,34 @@ $(document).ready(function(){
})
})
})
// 회원가입용
$
(
document
).
ready
(
function
(){
$
(
'#register_button'
).
click
(
function
(){
let
sendName
=
$
(
'#register_name'
).
val
();
let
sendPassword
=
$
(
'#register_password'
).
val
();
let
sendData
=
{
"name"
:
sendName
,
"password"
:
sendPassword
}
$
.
ajax
({
contentType
:
"application/json; charset=utf-8"
,
type
:
'post'
,
url
:
'api/users/register'
,
data
:
JSON
.
stringify
(
sendData
),
dataType
:
'JSON'
,
success
:
function
(
datas
)
{
if
(
datas
.
success
)
{
moveSquartPage
()
}
else
{
alert
(
"회원가입 실패 (이름 중복 의심)"
)
}
}
})
})
})
...
...
views/squartPage/squart.html
View file @
381096f
...
...
@@ -7,9 +7,14 @@
<title>
Squart Page
</title>
</head>
<body>
<div>
Teachable Machine Pose Model - Squart
</div>
<div>
온라인 헬스 케어 서비스 (스쿼트)
</div>
<div>
<script
src =
"./squart.js"
></script>
<sapn
id =
"user_count"
>
0
</sapn>
</div>
<button
type=
"button"
onclick=
"init()"
>
Start
</button>
<div><canvas
id=
"canvas"
></canvas></div>
<div
id=
"label-container"
></div>
<script
src=
"https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.3.1/dist/tf.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/@teachablemachine/pose@0.8/dist/teachablemachine-pose.min.js"
></script>
...
...
views/squartPage/squart.js
0 → 100644
View file @
381096f
File mode changed
Please
register
or
login
to post a comment