feat: 前端接口代理
This commit is contained in:
@@ -18,6 +18,7 @@ export const useModelStore = defineStore('model', () => {
|
||||
const requestModelList = async () => {
|
||||
try {
|
||||
const res = await getModelList();
|
||||
console.log('res', res);
|
||||
modelList.value = res.data;
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user