Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
triplan_front
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jaehoon Pae
triplan_front
Commits
3961d0d6
Commit
3961d0d6
authored
5 years ago
by
jaypae95
Browse files
Options
Downloads
Patches
Plain Diff
register
parent
25fd1b7d
No related branches found
No related tags found
1 merge request
!9
register
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/API.js
+10
-1
10 additions, 1 deletion
src/components/API.js
src/views/SignUp.vue
+86
-4
86 additions, 4 deletions
src/views/SignUp.vue
with
96 additions
and
5 deletions
src/components/API.js
+
10
−
1
View file @
3961d0d6
...
...
@@ -14,8 +14,17 @@ function loginAPI ($http, host, data) {
})
}
function
registerAPI
(
$http
,
host
,
data
)
{
return
$http
({
method
:
'
post
'
,
url
:
host
+
'
/users/signup
'
,
data
})
}
// noinspection JSUnusedGlobalSymbols
export
default
{
httpTest
,
loginAPI
loginAPI
,
registerAPI
}
This diff is collapsed.
Click to expand it.
src/views/SignUp.vue
+
86
−
4
View file @
3961d0d6
<
template
>
<div>
<div
id=
"LogIn"
>
<p>
Sign Up
</p>
<router-link
to=
"/"
>
Go To Main
</router-link><br>
<input
type=
"email"
required
v-model=
"user_email"
placeholder=
"EMAIL"
><br><br>
<input
required
v-model=
'user_id'
placeholder=
"ID"
><br><br>
<input
required
v-model=
'user_name'
placeholder=
"NAME"
><br><br>
<input
required
v-model=
'user_password'
placeholder=
"PASSWORD"
><br><br>
<input
required
v-model=
"user_password_confirm"
placeholder=
"PASSWORD CONFIRM"
><br><br>
<input
type=
"radio"
v-model=
"user_gender"
name=
"user_gender"
value=
"1"
>
Male
<input
type=
"radio"
v-model=
"user_gender"
name=
"user_gender"
value=
"0"
>
Female
<br><br>
<input
required
v-model=
'user_phone'
placeholder=
"PHONE"
><br><br>
<button
v-on:click=
"register()"
id=
"bu1"
>
가입
</button>
<br>
<router-link
to=
'/'
>
<img
id=
"illu"
src=
"../assets/gotoHome.png"
>
</router-link>
</div>
</
template
>
<
script
>
import
API
from
'
../components/API
'
export
default
{
data
()
{
return
{
user_email
:
''
,
user_id
:
''
,
user_name
:
''
,
user_password
:
''
,
user_password_confirm
:
''
,
user_gender
:
''
,
user_phone
:
''
}
},
methods
:
{
register
()
{
const
data
=
{
user_email
:
this
.
user_email
,
user_id
:
this
.
user_id
,
user_name
:
this
.
user_name
,
user_password
:
this
.
user_password
,
user_gender
:
this
.
user_gender
,
user_phone
:
this
.
user_phone
}
if
(
!
this
.
validatePassword
())
{
alert
(
'
패스워드가 다릅니다.
'
)
this
.
user_password
=
''
this
.
user_password_confirm
=
''
return
}
API
.
registerAPI
(
this
.
$http
,
this
.
$env
.
apiUrl
,
data
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
data
.
success
===
true
)
{
this
.
$router
.
push
(
'
/
'
)
}
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
validatePassword
()
{
if
(
this
.
user_password
!==
this
.
user_password_confirm
)
{
return
false
}
else
{
return
true
}
}
}
}
</
script
>
<
style
>
#illu
,
#illu1
,
#bu1
{
width
:
80px
;
height
:
35px
;
}
#bu1
{
background-color
:
#ffffff
}
#LogIn
{
border
:
5px
solid
#4cbaa8
;
border-radius
:
40px
;
width
:
500px
;
padding
:
20px
20px
;
margin
:
auto
;
}
</
style
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment