Commit 26956c2a authored by 李苏's avatar 李苏 💬

调整

parent d7634491
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<section class="app-main"> <section class="app-main">
<transition name="fade-transform" mode="out-in"> <transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews"> <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> </keep-alive>
</transition> </transition>
</section> </section>
...@@ -18,8 +19,10 @@ ...@@ -18,8 +19,10 @@
name: 'AppMain', name: 'AppMain',
computed: { computed: {
cachedViews() { cachedViews() {
console.log(this.$store.state.tagsView,'this.$store.state.tagsView') const list =this.$store.state.tagsView.cachedViews
return this.$store.state.tagsView.cachedViews list.push('AppMain')
return list
}, },
key() { key() {
return this.$route.path return this.$route.path
......
...@@ -3,8 +3,8 @@ import Cookies from 'js-cookie' ...@@ -3,8 +3,8 @@ import Cookies from 'js-cookie'
const TokenKey = 'token' const TokenKey = 'token'
export function getToken() { export function getToken() {
// return Cookies.get(TokenKey) return Cookies.get(TokenKey)
return localStorage.getItem('Gtoken') // return localStorage.getItem('Gtoken')
} }
export function setToken(token) { export function setToken(token) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment