修改bug
parent
556d6f9889
commit
5b25749534
|
|
@ -227,7 +227,7 @@ const autoMessage = async () => {
|
|||
if (error.message === 'canceled') {
|
||||
return
|
||||
}
|
||||
const errorMessage = error?.errmsg ?? '好像出错了,请稍后再试。'
|
||||
const errorMessage = error?.errmsg ?? '出现异常,请刷新页面再试。'
|
||||
contenText.value = errorMessage
|
||||
} finally {
|
||||
contentLoading.value = false
|
||||
|
|
@ -314,7 +314,7 @@ const sendMessage = async () => {
|
|||
})
|
||||
return
|
||||
}
|
||||
const errorMessage = error?.errmsg ?? '好像出错了,请稍后再试。'
|
||||
const errorMessage = error?.errmsg ?? '出现异常,请刷新页面再试。'
|
||||
|
||||
aiChatStore.updateChatSomeByUuid(uuid, dataSources.value.length - 1, {
|
||||
loading: false,
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ async function onConversation(action = 'next', file, fileText) {
|
|||
action: action,
|
||||
conversation_id: chatStore.active,
|
||||
message: {
|
||||
text: message?.substring(0, 4000),
|
||||
text: message,
|
||||
id: uuidv4(),
|
||||
type: (file?.extension === 'doc' ? 'docx' : file?.extension) || 'text',
|
||||
fileInfo: file,
|
||||
|
|
@ -307,7 +307,7 @@ async function onConversation(action = 'next', file, fileText) {
|
|||
conversationUserList.value[conversationUserList.value.length - 1]
|
||||
if (lastUserContext) {
|
||||
const obj = lastUserContext[Object.keys(lastUserContext)[0]]
|
||||
params.message.text = obj.text?.substring(0, 4000)
|
||||
params.message.text = obj.text
|
||||
params.message.id = obj.id
|
||||
params.parent_message_id = obj.id
|
||||
}
|
||||
|
|
@ -326,6 +326,26 @@ async function onConversation(action = 'next', file, fileText) {
|
|||
scrollToBottom()
|
||||
let tempMessage_id = null
|
||||
try {
|
||||
|
||||
|
||||
let lastFileContext = ''
|
||||
|
||||
const _fileListConversation = conversationUserList.value.filter((item) => {
|
||||
const key = Object.keys(item)[0]
|
||||
const value = item[key]
|
||||
return value.type !== 'text'
|
||||
})
|
||||
|
||||
if (_fileListConversation.length && params.message.type === 'text') {
|
||||
const _obj = _fileListConversation[_fileListConversation.length - 1]
|
||||
const _currentMsg = _obj[Object.keys(_obj)[0]]
|
||||
lastFileContext = _currentMsg.text
|
||||
if (_currentMsg.fileInfo)
|
||||
params.message.quote = lastFileContext.substring(0, 4000)
|
||||
}
|
||||
|
||||
params.message.text = params.message.text.substring(0, 4000)
|
||||
|
||||
const fetchChatAPIOnce = async () => {
|
||||
await http.post('/api/v1/conversation', params, {
|
||||
signal: controller.signal,
|
||||
|
|
@ -366,6 +386,8 @@ async function onConversation(action = 'next', file, fileText) {
|
|||
}
|
||||
|
||||
await fetchChatAPIOnce()
|
||||
loading.value = false
|
||||
userInfo.getUserInfo()
|
||||
} catch (error) {
|
||||
if (error.message === 'canceled') {
|
||||
chatStore.updateChatSome(chatStore.getCurrentChat.length - 1, {
|
||||
|
|
@ -373,15 +395,16 @@ async function onConversation(action = 'next', file, fileText) {
|
|||
})
|
||||
return
|
||||
}
|
||||
const errorMessage = error?.errmsg ?? '好像出错了,请稍后再试。'
|
||||
const errorMessage = error?.errmsg ?? '出现异常,请刷新页面再试。'
|
||||
|
||||
chatStore.updateChatSome(chatStore.getCurrentChat.length - 1, {
|
||||
loading: false,
|
||||
text: errorMessage,
|
||||
})
|
||||
} finally {
|
||||
loading.value = false
|
||||
userInfo.getUserInfo()
|
||||
} finally {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,28 +7,29 @@
|
|||
background: '#161718',
|
||||
borderRadius: '6px',
|
||||
width: '90%',
|
||||
height: '80%',
|
||||
}"
|
||||
>
|
||||
<div class="text-white">
|
||||
<!-- <div class="bg-[#111F63] w-75 p-6 flex-1 flex-none flex flex-col">
|
||||
<div class="text-2xl font-bold">需求留言问卷</div>
|
||||
<div class="mt-9 text-base font-bold flex-1">
|
||||
<p>感谢您对海兔AI的关注</p>
|
||||
<p>请留下您的信息</p>
|
||||
<p>我们会尽快联系您!</p>
|
||||
</div>
|
||||
<div class="w-43 h-43 border"></div>
|
||||
<div class="mt-6 text-base">了解更多,一键扫码咨询</div>
|
||||
</div> -->
|
||||
<div class="flex justify-between pt-40px">
|
||||
<div class="text-22px text-white text-opacity-40">
|
||||
<div class="text-22px text-white text-opacity-40 w-full">
|
||||
<p class="text-30px font-bold text-white">感谢您对海兔AI的关注</p>
|
||||
<p class="mt-20px">请留下您的信息</p>
|
||||
<p class="mt-10px">我们会尽快联系您!</p>
|
||||
<div class="flex w-full mt-20px">
|
||||
<div class="mr-80px flex-1">
|
||||
<p>请留下您的信息</p>
|
||||
<p class="mt-10px">我们会尽快联系您!</p>
|
||||
<p class="mt-40px" v-if="website.info.contact_user_qrcode">了解更多,一键扫码咨询</p>
|
||||
</div>
|
||||
<div v-if="website.info.contact_user_qrcode" class="w-200px h-200px border flex-none mr-40px">
|
||||
<img
|
||||
class="w-full h-full"
|
||||
:src="website.info.contact_user_qrcode"
|
||||
alt=""
|
||||
srcset=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<div class="w-200px h-200px border"></div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="p-17px flex-1 text-white mt-20px">
|
||||
<div class="text-27px mb-22px">
|
||||
|
|
@ -141,6 +142,11 @@
|
|||
import { ref, reactive, toRaw, onBeforeMount, computed, watch } from 'vue'
|
||||
import { showToast } from 'vant'
|
||||
import http from '@/io/request'
|
||||
|
||||
import { useWebsite } from '@/stores/website'
|
||||
|
||||
const website = useWebsite()
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
|
||||
const telReg = /^1[3-9]\d{9}$/
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ import videoBg2 from '@/assets/images/stream/l2.png'
|
|||
import videoBg3 from '@/assets/images/stream/l3.png'
|
||||
import videoBg4 from '@/assets/images/stream/l4.png'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const isShow = ref(false)
|
||||
const videoShow = ref(false)
|
||||
const video = ref(null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue