From fac2065ec6995ee8e51faba2fd8679c3f4233f5b Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 31 Jan 2024 15:19:12 +0800 Subject: [PATCH] feat: --- ui/src/components/ai-chat/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index 6492de5ed..f2fddd952 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -211,7 +211,7 @@ const prologueList = computed(() => { const temp = props.data?.prologue let arr: any = [] const lines = temp?.split('\n') - lines.forEach((str: string, index: number) => { + lines?.forEach((str: string, index: number) => { if (isMdArray(str)) { arr[index] = { type: 'question', @@ -288,11 +288,13 @@ function getChartOpenId() { applicationApi .getChatOpen(props.appId) .then((res) => { + console.log(res) chartOpenId.value = res.data chatMessage() }) .catch((res) => { - if (res.response.status === 401) { + console.log(res) + if (res.code === 401 || res.response.status === 401) { application.asyncAppAuthentication(accessToken).then(() => { getChartOpenId() })