Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
K
kiaisoft_tuananh_nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TTS Tran Viet Anh
kiaisoft_tuananh_nuxt
Commits
9a6040a1
Commit
9a6040a1
authored
Feb 06, 2023
by
Le Dinh Trung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix login token error
parent
dda1f1e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
index.vue
pages/index.vue
+2
-1
login.vue
pages/login.vue
+2
-2
No files found.
pages/index.vue
View file @
9a6040a1
...
@@ -78,6 +78,7 @@
...
@@ -78,6 +78,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'
IndexPage
'
name
:
'
IndexPage
'
,
middleware
:
[
'
web
'
]
}
}
</
script
>
</
script
>
pages/login.vue
View file @
9a6040a1
...
@@ -126,8 +126,8 @@ export default {
...
@@ -126,8 +126,8 @@ export default {
return
response
.
json
()
return
response
.
json
()
})
})
console
.
log
(
resp
.
status
)
console
.
log
(
resp
.
status
)
localStorage
.
setItem
(
'
token
'
,
resp
.
data
.
bearer_token
)
localStorage
.
setItem
(
'
token
'
,
'
Bearer
'
+
resp
.
data
.
bearer_token
)
this
.
$auth
.
$storage
.
setUniversal
(
'
token
'
,
resp
.
data
.
bearer_token
)
this
.
$auth
.
$storage
.
setUniversal
(
'
token
'
,
'
Bearer
'
+
resp
.
data
.
bearer_token
)
this
.
$auth
.
$storage
.
setUniversal
(
'
userName
'
,
resp
.
data
.
name
)
this
.
$auth
.
$storage
.
setUniversal
(
'
userName
'
,
resp
.
data
.
name
)
this
.
$auth
.
$storage
.
setUniversal
(
'
loggedIn
'
,
'
true
'
)
this
.
$auth
.
$storage
.
setUniversal
(
'
loggedIn
'
,
'
true
'
)
if
(
resp
.
status
==
'
success
'
)
{
if
(
resp
.
status
==
'
success
'
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment