mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +08:00
fix: router error
This commit is contained in:
parent
1d5b9d8f3b
commit
2b0c8ec31f
@ -7,6 +7,7 @@ import { resetRouter } from '@/router'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
import avatarImg from '@/assets/imgs/avatar.gif'
|
||||
|
||||
const tagsViewStore = useTagsViewStore()
|
||||
|
||||
@ -22,9 +23,9 @@ const { push, replace } = useRouter()
|
||||
|
||||
const user = wsCache.get('user')
|
||||
|
||||
const avatar = user?.user?.avatar ? user.user.avatar : '@/assets/imgs/avatar.gif'
|
||||
const avatar = user.user.avatar ? user.user.avatar : avatarImg
|
||||
|
||||
const userName = user?.user?.nickname ? user.user.nickname : 'Admin'
|
||||
const userName = user.user.nickname ? user.user.nickname : 'Admin'
|
||||
|
||||
const loginOut = () => {
|
||||
ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), {
|
||||
|
@ -43,7 +43,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
name: 'User',
|
||||
name: 'UserInfo',
|
||||
meta: {
|
||||
hidden: true
|
||||
},
|
||||
@ -53,9 +53,10 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
component: () => import('@/views/Profile/Index.vue'),
|
||||
name: 'Profile',
|
||||
meta: {
|
||||
hidden: true,
|
||||
icon: 'ep:user',
|
||||
canTo: true,
|
||||
hidden: true,
|
||||
noTagsView: true,
|
||||
icon: 'ep:user',
|
||||
title: t('common.profile')
|
||||
}
|
||||
}
|
||||
@ -64,7 +65,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
{
|
||||
path: '/codegen',
|
||||
component: Layout,
|
||||
name: 'Codegen',
|
||||
name: 'CodegenEdit',
|
||||
meta: {
|
||||
hidden: true
|
||||
},
|
||||
@ -74,7 +75,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
component: () => import('@/views/infra/codegen/EditTable.vue'),
|
||||
name: 'EditTable',
|
||||
meta: {
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
@ -88,7 +88,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
{
|
||||
path: '/job',
|
||||
component: Layout,
|
||||
name: 'Job',
|
||||
name: 'JobL',
|
||||
meta: {
|
||||
hidden: true
|
||||
},
|
||||
@ -98,7 +98,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
component: () => import('@/views/infra/job/JobLog.vue'),
|
||||
name: 'JobLog',
|
||||
meta: {
|
||||
noTagsView: true,
|
||||
noCache: true,
|
||||
hidden: true,
|
||||
canTo: true,
|
||||
|
Loading…
Reference in New Issue
Block a user