Commit 379055d1 authored by songrui's avatar songrui

首页返回修改

parent a7c9dc51
......@@ -52,11 +52,11 @@ export default {
if (!token) {
token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') {
token = 'c652136f-6159-4383-860c-f6693d4857d7'
token = 'b4d10be3-b4f3-4911-a1b3-d95e0491ce95'
}
}
if (token) {
sessionStorage.setItem('token', token)
sessionStorage.setItem('token', token)
const res = await getDict()
this.store.$patch({ dict: res.data || {} })
const user = await getAuthInfo()
......
......@@ -19,13 +19,21 @@
</template>
<script>
import { backHome } from '@/utils/common.js'
export default {
name: 'DocNavBar',
props: {
title: String
title: String,
// 是否首页
home: Boolean
},
methods: {
goBack() {
if (this.home) {
backHome()
return
}
this.$router.back()
}
}
......
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