Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gavel-erp-vue
Project
Project
Details
Activity
Releases
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
李苏
gavel-erp-vue
Commits
26956c2a
Commit
26956c2a
authored
Jun 18, 2025
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
d7634491
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
AppMain.vue
src/layout/components/AppMain.vue
+6
-3
auth.js
src/utils/auth.js
+2
-2
No files found.
src/layout/components/AppMain.vue
View file @
26956c2a
...
...
@@ -4,7 +4,8 @@
<section
class=
"app-main"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<keep-alive
:include=
"cachedViews"
>
<router-view
v-if=
"!$route.meta.link"
:key=
"key"
/>
<router-view
/>
<!--
<router-view
v-if=
"!$route.meta.link"
:key=
"key"
/>
-->
</keep-alive>
</transition>
</section>
...
...
@@ -18,8 +19,10 @@
name
:
'AppMain'
,
computed
:
{
cachedViews
()
{
console
.
log
(
this
.
$store
.
state
.
tagsView
,
'this.$store.state.tagsView'
)
return
this
.
$store
.
state
.
tagsView
.
cachedViews
const
list
=
this
.
$store
.
state
.
tagsView
.
cachedViews
list
.
push
(
'AppMain'
)
return
list
},
key
()
{
return
this
.
$route
.
path
...
...
src/utils/auth.js
View file @
26956c2a
...
...
@@ -3,8 +3,8 @@ import Cookies from 'js-cookie'
const
TokenKey
=
'token'
export
function
getToken
()
{
//
return Cookies.get(TokenKey)
return
localStorage
.
getItem
(
'Gtoken'
)
return
Cookies
.
get
(
TokenKey
)
//
return localStorage.getItem('Gtoken')
}
export
function
setToken
(
token
)
{
...
...
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