From 8f1f0017e2c80640f8706e03f076b71bc03c3159 Mon Sep 17 00:00:00 2001 From: ivamp Date: Tue, 13 Aug 2024 09:59:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/assistants/[id]/shares.vue | 17 +++++++++-------- src/pages/assistants/create.vue | 2 +- src/pages/index.vue | 2 +- src/pages/public_chat/index.vue | 2 +- src/pages/tools/index.vue | 6 ++++-- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/pages/assistants/[id]/shares.vue b/src/pages/assistants/[id]/shares.vue index e2aad15..934fa42 100644 --- a/src/pages/assistants/[id]/shares.vue +++ b/src/pages/assistants/[id]/shares.vue @@ -26,8 +26,8 @@

API Key: {{ s.token }}

- 访问 - 删除 + 访问 + 删除 @@ -78,12 +78,13 @@ function createShare() { }); } -function deleteShare(shareId: number) { - api.Assistant.apiV1AssistantsIdSharesShareIdDelete(assistantId, shareId).then( - () => { - getAssistantShare(); - }, - ); +function deleteShare(shareId: string) { + api.Assistant.apiV1AssistantsIdSharesShareIdDelete( + assistantId, + Number(shareId), + ).then(() => { + getAssistantShare(); + }); } function goto(token: any) { diff --git a/src/pages/assistants/create.vue b/src/pages/assistants/create.vue index 5c52a0b..10bce09 100644 --- a/src/pages/assistants/create.vue +++ b/src/pages/assistants/create.vue @@ -62,7 +62,7 @@ const createAssistant = async () => { description: description.value, }); prompt.value = ""; - createdID.value = assistant.data.data?.id ?? 0; + createdID.value = Number(assistant.data.data?.id ?? 0); } catch (error) { console.error(error); // 请求失败,可以在这里添加相应的错误处理逻辑 diff --git a/src/pages/index.vue b/src/pages/index.vue index 9527e63..0c07a08 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -2,8 +2,8 @@

欢迎使用 Leaflow Amber

Amber 是一个临时代号,这个为 demo 版本。

-

在使用前,你需要先登录。

+

在使用前,你需要先登录。

登录
diff --git a/src/pages/public_chat/index.vue b/src/pages/public_chat/index.vue index d36388c..d72cd76 100644 --- a/src/pages/public_chat/index.vue +++ b/src/pages/public_chat/index.vue @@ -257,7 +257,7 @@ const clearMessages = () => { const createChat = () => { api.ChatPublic.apiV1ChatPublicPost(publicNewChat.value).then((res) => { if (res.data.data?.id) { - chatId.value = res.data.data.id; + chatId.value = Number(res.data.data.id); } getMessages(); }); diff --git a/src/pages/tools/index.vue b/src/pages/tools/index.vue index 11235bc..6e394f9 100644 --- a/src/pages/tools/index.vue +++ b/src/pages/tools/index.vue @@ -26,10 +26,12 @@

主页地址: {{ tool.data?.homepage_url }}

- 更新数据 - + 删除