fix: AI 助手导航链接与登录重定向路径同步为 /

路由重构后 AI 助手从 /ai-assistant 移至 /,BlogLayout 导航链接和
AiAssistant 登录重定向未同步更新,导致页面异常。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nojava
2026-05-24 22:10:45 +08:00
parent 4488c24601
commit 608d2b4433
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
<router-link to="/blog">博客</router-link>
</el-menu-item>
<el-menu-item index="ai-assistant">
<router-link to="/ai-assistant">AI 助手</router-link>
<router-link to="/">AI 助手</router-link>
</el-menu-item>
<el-menu-item v-if="userStore.isLoggedIn" @click="$router.push(userStore.isAdmin ? '/admin' : '/app/dashboard')">
控制台
+2 -2
View File
@@ -146,7 +146,7 @@ function selectSessionById(id) {
async function handleNewSession() {
if (!userStore.isLoggedIn) {
ElMessage.warning('请先登录后使用 AI 助手')
router.push({ name: 'Login', query: { redirect: '/ai-assistant' } })
router.push({ name: 'Login', query: { redirect: '/' } })
return
}
try {
@@ -195,7 +195,7 @@ async function selectSession(item) {
async function handleSend(text) {
if (!userStore.isLoggedIn) {
ElMessage.warning('请先登录后使用 AI 助手')
router.push({ name: 'Login', query: { redirect: '/ai-assistant' } })
router.push({ name: 'Login', query: { redirect: '/' } })
return
}
if (readOnly.value) {