改进
This commit is contained in:
parent
710c6ab2ce
commit
8f1f0017e2
@ -26,8 +26,8 @@
|
|||||||
<p>API Key: {{ s.token }}</p>
|
<p>API Key: {{ s.token }}</p>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-btn color="primary" @click="goto(s.token ?? 0)">访问</v-btn>
|
<v-btn color="primary" @click="goto(s.token ?? '')">访问</v-btn>
|
||||||
<v-btn color="error" @click="deleteShare(s.id ?? 0)">删除</v-btn>
|
<v-btn color="error" @click="deleteShare(s.id ?? '')">删除</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
@ -78,12 +78,13 @@ function createShare() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteShare(shareId: number) {
|
function deleteShare(shareId: string) {
|
||||||
api.Assistant.apiV1AssistantsIdSharesShareIdDelete(assistantId, shareId).then(
|
api.Assistant.apiV1AssistantsIdSharesShareIdDelete(
|
||||||
() => {
|
assistantId,
|
||||||
getAssistantShare();
|
Number(shareId),
|
||||||
},
|
).then(() => {
|
||||||
);
|
getAssistantShare();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function goto(token: any) {
|
function goto(token: any) {
|
||||||
|
@ -62,7 +62,7 @@ const createAssistant = async () => {
|
|||||||
description: description.value,
|
description: description.value,
|
||||||
});
|
});
|
||||||
prompt.value = "";
|
prompt.value = "";
|
||||||
createdID.value = assistant.data.data?.id ?? 0;
|
createdID.value = Number(assistant.data.data?.id ?? 0);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
// 请求失败,可以在这里添加相应的错误处理逻辑
|
// 请求失败,可以在这里添加相应的错误处理逻辑
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<h2>欢迎使用 Leaflow Amber</h2>
|
<h2>欢迎使用 Leaflow Amber</h2>
|
||||||
<p>Amber 是一个临时代号,这个为 demo 版本。</p>
|
<p>Amber 是一个临时代号,这个为 demo 版本。</p>
|
||||||
|
|
||||||
<p>在使用前,你需要先登录。</p>
|
|
||||||
<div v-if="!userStore.logined">
|
<div v-if="!userStore.logined">
|
||||||
|
<p>在使用前,你需要先登录。</p>
|
||||||
<v-btn color="primary" @click="toLogin()">登录</v-btn>
|
<v-btn color="primary" @click="toLogin()">登录</v-btn>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -257,7 +257,7 @@ const clearMessages = () => {
|
|||||||
const createChat = () => {
|
const createChat = () => {
|
||||||
api.ChatPublic.apiV1ChatPublicPost(publicNewChat.value).then((res) => {
|
api.ChatPublic.apiV1ChatPublicPost(publicNewChat.value).then((res) => {
|
||||||
if (res.data.data?.id) {
|
if (res.data.data?.id) {
|
||||||
chatId.value = res.data.data.id;
|
chatId.value = Number(res.data.data.id);
|
||||||
}
|
}
|
||||||
getMessages();
|
getMessages();
|
||||||
});
|
});
|
||||||
|
@ -26,10 +26,12 @@
|
|||||||
<p>主页地址: {{ tool.data?.homepage_url }}</p>
|
<p>主页地址: {{ tool.data?.homepage_url }}</p>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-btn color="primary" @click="updateToolData(tool.id ?? 0)"
|
<v-btn
|
||||||
|
color="primary"
|
||||||
|
@click="updateToolData(Number(tool.id) ?? 0)"
|
||||||
>更新数据</v-btn
|
>更新数据</v-btn
|
||||||
>
|
>
|
||||||
<v-btn color="error" @click="deleteTool(tool.id ?? 0)">
|
<v-btn color="error" @click="deleteTool(Number(tool.id) ?? 0)">
|
||||||
删除
|
删除
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
Loading…
Reference in New Issue
Block a user