Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MajorBook - Team202
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
LeeYongJae
MajorBook - Team202
Commits
8232a560
Commit
8232a560
authored
5 years ago
by
YongJae
Browse files
Options
Downloads
Patches
Plain Diff
Add front - actual SignUp.vue
parent
acb087cc
Branches
finalmodify
Branches containing commit
No related tags found
1 merge request
!6
Login 기능 추가
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/components/login/SignUp.vue
+99
-0
99 additions, 0 deletions
frontend/src/components/login/SignUp.vue
with
99 additions
and
0 deletions
frontend/src/components/login/SignUp.vue
0 → 100644
+
99
−
0
View file @
8232a560
<
template
>
<div>
<md-card
class=
"md-layout-item md-size-50 md-small-size-100"
>
<md-card-header>
<div
class=
"md-title"
>
Sign Up
</div>
</md-card-header>
<md-card-content>
<md-field>
<label
for=
"name"
>
Name
</label>
<md-input
name=
"name"
v-model=
"user.name"
/>
</md-field>
<md-field>
<label
for=
"id"
>
ID
</label>
<md-input
name=
"id"
v-model=
"user.id"
/>
</md-field>
<md-field
:md-toggle-password=
"true"
>
<label
for=
"password"
>
Password
</label>
<md-input
name=
"password"
v-model=
"user.password"
type=
"password"
/>
</md-field>
<md-field>
<label
for=
"email"
>
Email
</label>
<md-input
name=
"email"
v-model=
"user.email"
/>
</md-field>
</md-card-content>
<md-card-actions>
<md-button
class=
"md-raised md-primary"
v-on:click=
"signUp"
>
Sign Up
</md-button>
</md-card-actions>
</md-card>
</div>
</
template
>
<
style
>
.md-card
{
margin
:
auto
;
}
.md-primary
{
background-color
:
blue
;
color
:
white
;
}
</
style
>
<
script
>
import
Vue
from
'
vue
'
import
VueMaterial
from
'
vue-material
'
import
'
vue-material/dist/vue-material.min.css
'
import
'
vue-material/dist/theme/default.css
'
Vue
.
use
(
VueMaterial
)
// import {MdField, MdButton, MdCard, MdInput} from 'vue-material/dist/components'
// import 'vue-material/dist/vue-material.min.css'
// import 'vue-material/dist/theme/default.css'
// Vue.use(MdField)
// Vue.use(MdButton)
// Vue.use(MdCard)
// Vue.use(MdInput)
export
default
{
data
:
function
()
{
return
{
user
:
{
id
:
''
,
password
:
''
,
name
:
''
,
email
:
''
,
isLoggedIn
:
false
},
sending
:
false
}
},
methods
:
{
signUp
:
function
(
event
)
{
this
.
$http
.
post
(
'
/api/login/signUp
'
,
{
//axios 사용
user
:
this
.
user
})
.
then
((
response
)
=>
{
if
(
response
.
data
.
result
===
0
)
{
alert
(
'
Error, please, try again
'
)
}
if
(
response
.
data
.
result
===
1
)
{
alert
(
'
Success
'
)
this
.
$router
.
push
(
'
/
'
)
// Home 페이지로 보내줌
}
})
.
catch
(
function
(
error
)
{
alert
(
'
error
'
)
})
}
}
}
</
script
>
\ No newline at end of file
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