fix: open logged-in users on avatar management
This commit is contained in:
@@ -43,6 +43,7 @@ const showNav = ref<boolean>(shouldShowNav(route.path))
|
|||||||
|
|
||||||
function shouldShowNav(path: string) {
|
function shouldShowNav(path: string) {
|
||||||
return path !== '/'
|
return path !== '/'
|
||||||
|
&& path !== '/avatar/create'
|
||||||
&& path !== '/login/sms'
|
&& path !== '/login/sms'
|
||||||
&& !path.startsWith('/avatar/edit')
|
&& !path.startsWith('/avatar/edit')
|
||||||
&& !path.startsWith('/avatar/chat')
|
&& !path.startsWith('/avatar/chat')
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ import { getAuthToken } from '@/api'
|
|||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
|
name: 'AvatarHome',
|
||||||
|
redirect: '/avatar/manage',
|
||||||
|
meta: { title: '数字分身管理', requiresAuth: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/avatar/create',
|
||||||
name: 'AvatarCreate',
|
name: 'AvatarCreate',
|
||||||
component: () => import('@/views/AvatarCreate.vue'),
|
component: () => import('@/views/AvatarCreate.vue'),
|
||||||
meta: { title: '创建数字分身', requiresAuth: true }
|
meta: { title: '创建数字分身', requiresAuth: true }
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ const goToRecharge = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const goCreate = () => {
|
const goCreate = () => {
|
||||||
router.push('/')
|
router.push('/avatar/create')
|
||||||
}
|
}
|
||||||
|
|
||||||
const goToKnowledge = () => {
|
const goToKnowledge = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user