Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
national_museum_vod-H5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
fubaole
national_museum_vod-H5
Commits
afb3e2b7
Commit
afb3e2b7
authored
Apr 07, 2021
by
乐宝呗666
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改大屏 token问题
parent
35d58fdb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
index.js
src/router/index.js
+2
-1
historyTab.vue
src/views/user/components/historyTab.vue
+1
-1
No files found.
src/router/index.js
View file @
afb3e2b7
...
@@ -79,9 +79,10 @@ const router = new VueRouter({
...
@@ -79,9 +79,10 @@ const router = new VueRouter({
routes
:
routes
,
routes
:
routes
,
mode
:
"history"
mode
:
"history"
})
})
const
whiteList
=
[
'/login'
,
'/success'
,
'/screen'
]
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
let
user
=
localStorage
.
getItem
(
"token"
);
let
user
=
localStorage
.
getItem
(
"token"
);
if
(
!
user
&&
to
.
path
!==
'/login'
&&
to
.
path
!==
'/success'
)
{
// 通过vuex state获取当前的token是否存在
if
(
!
user
&&
!
whiteList
.
includes
(
to
.
path
)
)
{
// 通过vuex state获取当前的token是否存在
next
({
next
({
path
:
'/login'
,
path
:
'/login'
,
})
})
...
...
src/views/user/components/historyTab.vue
View file @
afb3e2b7
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<van-collapse
v-model=
"activeNames"
>
<van-collapse
v-model=
"activeNames"
>
<van-collapse-item
:name=
"item.id"
>
<van-collapse-item
:name=
"item.id"
>
<template
#
title
>
<template
#
title
>
<div>
{{
item
.
name
||
'妹纸'
}}
<span
class=
"author"
>
{{
item
.
username
}}
</span>
<div>
{{
item
.
boardName
}}
<span
class=
"author"
>
{{
item
.
username
}}
</span>
</div>
</div>
</
template
>
</
template
>
<div
class=
"content"
>
<div
class=
"content"
>
...
...
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