fix: router error

This commit is contained in:
xingyu 2022-07-20 11:22:20 +08:00
parent 1d5b9d8f3b
commit 2b0c8ec31f
2 changed files with 9 additions and 9 deletions

View File

@ -7,6 +7,7 @@ import { resetRouter } from '@/router'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { useTagsViewStore } from '@/store/modules/tagsView' import { useTagsViewStore } from '@/store/modules/tagsView'
import avatarImg from '@/assets/imgs/avatar.gif'
const tagsViewStore = useTagsViewStore() const tagsViewStore = useTagsViewStore()
@ -22,9 +23,9 @@ const { push, replace } = useRouter()
const user = wsCache.get('user') 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 = () => { const loginOut = () => {
ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), { ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), {

View File

@ -43,7 +43,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
{ {
path: '/user', path: '/user',
component: Layout, component: Layout,
name: 'User', name: 'UserInfo',
meta: { meta: {
hidden: true hidden: true
}, },
@ -53,9 +53,10 @@ const remainingRouter: AppRouteRecordRaw[] = [
component: () => import('@/views/Profile/Index.vue'), component: () => import('@/views/Profile/Index.vue'),
name: 'Profile', name: 'Profile',
meta: { meta: {
hidden: true,
icon: 'ep:user',
canTo: true, canTo: true,
hidden: true,
noTagsView: true,
icon: 'ep:user',
title: t('common.profile') title: t('common.profile')
} }
} }
@ -64,7 +65,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
{ {
path: '/codegen', path: '/codegen',
component: Layout, component: Layout,
name: 'Codegen', name: 'CodegenEdit',
meta: { meta: {
hidden: true hidden: true
}, },
@ -74,7 +75,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
component: () => import('@/views/infra/codegen/EditTable.vue'), component: () => import('@/views/infra/codegen/EditTable.vue'),
name: 'EditTable', name: 'EditTable',
meta: { meta: {
noTagsView: true,
noCache: true, noCache: true,
hidden: true, hidden: true,
canTo: true, canTo: true,
@ -88,7 +88,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
{ {
path: '/job', path: '/job',
component: Layout, component: Layout,
name: 'Job', name: 'JobL',
meta: { meta: {
hidden: true hidden: true
}, },
@ -98,7 +98,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
component: () => import('@/views/infra/job/JobLog.vue'), component: () => import('@/views/infra/job/JobLog.vue'),
name: 'JobLog', name: 'JobLog',
meta: { meta: {
noTagsView: true,
noCache: true, noCache: true,
hidden: true, hidden: true,
canTo: true, canTo: true,