feat: 前端接口代理

This commit is contained in:
Gsh
2025-06-19 23:45:22 +08:00
parent bc91a8cff2
commit a89e11d132
12 changed files with 133 additions and 7 deletions

View File

@@ -120,6 +120,13 @@ export const useSessionStore = defineStore('session', () => {
try {
const res = await create_session(data);
// TODO: 模拟请求
// const res = {
// code: 200,
// msg: "操作成功",
// data: "1935711019560206338"
// };
console.log('create_session---res--',res)
// 创建会话后立刻查询列表会话
// 1. 先找到被修改会话在 sessionList 中的索引(假设 sessionList 是按服务端排序的完整列表)
const targetIndex = sessionList.value.findIndex(session => session.id === `${res.data}`);