fix: 前端页面架构重构初版
This commit is contained in:
@@ -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}` },
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user