Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FE
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
Ajou-WSD-Team6
FE
Commits
970cf0eb
Commit
970cf0eb
authored
5 years ago
by
최지원
Browse files
Options
Downloads
Patches
Plain Diff
Add user authentication
parent
d3fa04fa
No related branches found
No related tags found
1 merge request
!27
Add user authentication
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/views/ShowFindPost.vue
+137
-101
137 additions, 101 deletions
src/views/ShowFindPost.vue
src/views/ShowLostPost.vue
+36
-1
36 additions, 1 deletion
src/views/ShowLostPost.vue
with
173 additions
and
102 deletions
src/views/ShowFindPost.vue
+
137
−
101
View file @
970cf0eb
<
template
>
<
template
>
<v-container
fill-height
fluid
grid-list-xl
>
<v-container
fill-height
fluid
grid-list-xl
>
<v-layout
justify-center
wrap
>
<v-layout
justify-center
wrap
>
<v-dialog
v-model=
"loginDialog"
persistent
max-width=
"290"
>
<v-card>
<v-card-title
class=
"headline"
>
불러오기 실패
</v-card-title>
<v-card-text>
로그인이 필요한 기능입니다.
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color=
"green darken-1"
text
@
click=
"moveLogin"
>
로그인 이동
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-flex
xs12
md8
>
<v-flex
xs12
md8
>
<material-card
color=
"green"
v-bind:title=
"findpost.title"
v-bind:text=
"findpost.created"
display-2
>
<material-card
color=
"green"
v-bind:title=
"findpost.title"
v-bind:text=
"findpost.created"
display-2
>
<v-card
:elevation=
"20"
width=
"300"
:shaped=
"true"
v-if=
"dataLoading"
class=
"mx-auto"
>
<v-card
:elevation=
"20"
width=
"300"
:shaped=
"true"
v-if=
"dataLoading"
class=
"mx-auto"
>
...
@@ -192,9 +216,12 @@
...
@@ -192,9 +216,12 @@
<
script
>
<
script
>
export
default
{
export
default
{
created
:
function
()
{
created
:
function
()
{
if
(
this
.
$store
.
commit
(
'
getToken
'
)){
const
_id
=
this
.
$route
.
params
.
_id
;
const
_id
=
this
.
$route
.
params
.
_id
;
this
.
$http
.
get
(
`/finderboard/
${
_id
}
`
)
this
.
$http
.
get
(
`/finderboard/
${
_id
}
`
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
this
.
dataLoading
=
true
;
this
.
dataLoading
=
true
;
this
.
findpost
=
response
.
data
.
board
;
this
.
findpost
=
response
.
data
.
board
;
this
.
items
=
this
.
findpost
.
comments
;
this
.
items
=
this
.
findpost
.
comments
;
...
@@ -202,6 +229,10 @@ export default {
...
@@ -202,6 +229,10 @@ export default {
this
.
image
=
'
data:image/jpeg;base64,
'
+
base64data
;
this
.
image
=
'
data:image/jpeg;base64,
'
+
base64data
;
this
.
dataLoading
=
false
;
this
.
dataLoading
=
false
;
});
});
}
else
{
this
.
loginDialog
=
true
;
}
},
},
data
:
()
=>
{
data
:
()
=>
{
return
{
return
{
...
@@ -222,6 +253,7 @@ export default {
...
@@ -222,6 +253,7 @@ export default {
commentSnackbar
:
false
,
commentSnackbar
:
false
,
postSnackbar
:
false
,
postSnackbar
:
false
,
comment_id
:
''
,
comment_id
:
''
,
loginDialog
:
false
,
dataLoading
:
true
dataLoading
:
true
}
}
},
},
...
@@ -306,6 +338,10 @@ export default {
...
@@ -306,6 +338,10 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
`/modifyfindpost/
${
item_id
}
`
path
:
`/modifyfindpost/
${
item_id
}
`
})
})
},
moveLogin
:
function
(){
this
.
loginDialog
=
false
;
this
.
$router
.
push
(
`/login`
);
}
}
},
},
}
}
...
...
This diff is collapsed.
Click to expand it.
src/views/ShowLostPost.vue
+
36
−
1
View file @
970cf0eb
<
template
>
<
template
>
<v-container
fill-height
fluid
grid-list-xl
>
<v-container
fill-height
fluid
grid-list-xl
>
<v-layout
justify-center
wrap
>
<v-layout
justify-center
wrap
>
<v-dialog
v-model=
"loginDialog"
persistent
max-width=
"290"
>
<v-card>
<v-card-title
class=
"headline"
>
불러오기 실패
</v-card-title>
<v-card-text>
로그인이 필요한 기능입니다.
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color=
"green darken-1"
text
@
click=
"moveLogin"
>
로그인 이동
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-flex
xs12
md8
>
<v-flex
xs12
md8
>
<material-card
color=
"green"
v-bind:title=
"lostpost.title"
v-bind:text=
"lostpost.created"
>
<material-card
color=
"green"
v-bind:title=
"lostpost.title"
v-bind:text=
"lostpost.created"
>
<v-card
:elevation=
"20"
width=
"300"
:shaped=
"true"
v-if=
"dataLoading"
class=
"mx-auto"
>
<v-card
:elevation=
"20"
width=
"300"
:shaped=
"true"
v-if=
"dataLoading"
class=
"mx-auto"
>
...
@@ -188,7 +212,9 @@
...
@@ -188,7 +212,9 @@
<
script
>
<
script
>
export
default
{
export
default
{
created
:
function
()
{
created
:
function
()
{
if
(
this
.
$store
.
commit
(
'
getToken
'
)){
const
_id
=
this
.
$route
.
params
.
_id
;
const
_id
=
this
.
$route
.
params
.
_id
;
this
.
$http
.
get
(
`/losterboard/
${
_id
}
`
)
this
.
$http
.
get
(
`/losterboard/
${
_id
}
`
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
this
.
dataLoading
=
true
;
this
.
dataLoading
=
true
;
...
@@ -198,6 +224,10 @@ export default {
...
@@ -198,6 +224,10 @@ export default {
this
.
image
=
'
data:image/jpeg;base64,
'
+
base64data
;
this
.
image
=
'
data:image/jpeg;base64,
'
+
base64data
;
this
.
dataLoading
=
false
;
this
.
dataLoading
=
false
;
});
});
}
else
{
this
.
loginDialog
=
true
;
}
},
},
data
:
()
=>
{
data
:
()
=>
{
return
{
return
{
...
@@ -219,6 +249,7 @@ export default {
...
@@ -219,6 +249,7 @@ export default {
commentSnackbar
:
false
,
commentSnackbar
:
false
,
postSnackbar
:
false
,
postSnackbar
:
false
,
comment_id
:
''
,
comment_id
:
''
,
loginDialog
:
false
,
dataLoading
:
true
,
dataLoading
:
true
,
}
}
},
},
...
@@ -298,6 +329,10 @@ export default {
...
@@ -298,6 +329,10 @@ export default {
this
.
postSnackbar
=
true
;
this
.
postSnackbar
=
true
;
}
}
this
.
postDeleteDialog
=
false
;
this
.
postDeleteDialog
=
false
;
},
moveLogin
:
function
(){
this
.
loginDialog
=
false
;
this
.
$router
.
push
(
`/login`
);
}
}
},
},
}
}
...
...
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