feat(frontend): 添加首页及调整导航和路由逻辑
- 新增完整首页视图,展示核心功能、品类覆盖及使用流程 - 设计首页响应式布局及样式,优化多终端展示效果 - 修改AdminLayout中返回前台链接为/design路径 - 删除AppHeader中顶部设计、生成、管理后台菜单链接 - 在用户下拉菜单新增管理后台入口,点击跳转/admin - 新增路由/home和/design页面,完善路由配置 - 将登录、注册、生成页跳转路径由根目录改为/design,增强用户体验
This commit is contained in:
@@ -7,9 +7,6 @@
|
||||
</router-link>
|
||||
</div>
|
||||
<nav class="header-nav">
|
||||
<router-link to="/" class="nav-link">设计</router-link>
|
||||
<router-link to="/generate" class="nav-link">生成</router-link>
|
||||
<router-link to="/admin" class="nav-link admin-link" v-if="isAdmin">管理后台</router-link>
|
||||
</nav>
|
||||
<div class="header-right">
|
||||
<template v-if="isLoggedIn">
|
||||
@@ -22,6 +19,7 @@
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="user">个人中心</el-dropdown-item>
|
||||
<el-dropdown-item command="admin" v-if="isAdmin">管理后台</el-dropdown-item>
|
||||
<el-dropdown-item command="logout" divided>退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
@@ -52,6 +50,8 @@ const avatarChar = computed(() => (userStore.userInfo?.nickname || '用')[0])
|
||||
const handleCommand = (command: string) => {
|
||||
if (command === 'user') {
|
||||
router.push('/user')
|
||||
} else if (command === 'admin') {
|
||||
router.push('/admin')
|
||||
} else if (command === 'logout') {
|
||||
userStore.logout()
|
||||
router.push('/login')
|
||||
|
||||
Reference in New Issue
Block a user