fix: 前端页面架构重构初版

This commit is contained in:
Gsh
2025-12-28 22:42:17 +08:00
parent c649ad31c2
commit e4621d9049
53 changed files with 6098 additions and 845 deletions

View File

@@ -36,7 +36,7 @@ export const useSessionStore = defineStore('session', () => {
try {
// 清空当前选中会话信息
setCurrentSession(null);
router.replace({ name: 'chat' });
router.replace({ name: 'chatConversationWithId' });
}
catch (error) {
console.error('createSessionBtn错误:', error);
@@ -109,7 +109,7 @@ export const useSessionStore = defineStore('session', () => {
const createSessionList = async (data: Omit<CreateSessionDTO, 'id'>) => {
if (!userStore.token) {
router.replace({
name: 'chatWithId',
name: 'chatConversationWithId',
params: {
id: 'not_login',
},
@@ -140,7 +140,7 @@ export const useSessionStore = defineStore('session', () => {
setCurrentSession(newSessionRes.data);
// 跳转聊天页
router.replace({
name: 'chatWithId',
name: 'chatConversationWithId',
params: { id: `${res.data.id}` },
});
}