|
@@ -79,11 +79,11 @@ import {
|
|
getUserDataInfo,
|
|
getUserDataInfo,
|
|
createChatSession,
|
|
createChatSession,
|
|
robotInfo,
|
|
robotInfo,
|
|
- findAIAnswer,
|
|
|
|
customerEval,
|
|
customerEval,
|
|
getNode,
|
|
getNode,
|
|
appraiseMessage,
|
|
appraiseMessage,
|
|
- getTouristInfo
|
|
|
|
|
|
+ getTouristInfo,
|
|
|
|
+ findAnswer
|
|
} from '@/api/modules'
|
|
} from '@/api/modules'
|
|
import { Popup, Loading, Overlay } from 'vant'
|
|
import { Popup, Loading, Overlay } from 'vant'
|
|
import EventBus from '@/utils/eventBus'
|
|
import EventBus from '@/utils/eventBus'
|
|
@@ -1445,21 +1445,17 @@ export default {
|
|
if (manMade.includes(data.question)) {
|
|
if (manMade.includes(data.question)) {
|
|
// this.setCustomer('2')
|
|
// this.setCustomer('2')
|
|
} else {
|
|
} else {
|
|
- const params = {
|
|
|
|
- prompt: data?.question,
|
|
|
|
- href: location.origin
|
|
|
|
- }
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- findAIAnswer(params).then(res => {
|
|
|
|
|
|
+ findAnswer(data).then(res => {
|
|
if (res && res.error_code === 0) {
|
|
if (res && res.error_code === 0) {
|
|
if (res.error_msg && !res.data) {
|
|
if (res.error_msg && !res.data) {
|
|
this.socketsend(res.error_msg, 'robotText', 1)
|
|
this.socketsend(res.error_msg, 'robotText', 1)
|
|
} else if (JSON.stringify(res.data) === '{}') {
|
|
} else if (JSON.stringify(res.data) === '{}') {
|
|
this.socketsend(this.robotInfoObj.reply03.Content, 'robotText', 1)
|
|
this.socketsend(this.robotInfoObj.reply03.Content, 'robotText', 1)
|
|
} else {
|
|
} else {
|
|
- res.data.answer = res.data.reply?.replace('target="_blank"', '')
|
|
|
|
|
|
+ res.data.answer = res.data.answer?.replace('target="_blank"', '')
|
|
// 传‘answer’代表机器人返回的有答案,可以进行评价
|
|
// 传‘answer’代表机器人返回的有答案,可以进行评价
|
|
- this.socketsend(res.data.reply, 'robotText', 1, 'answer')
|
|
|
|
|
|
+ this.socketsend(res.data.answer, 'robotText', 1, 'answer')
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.socketsend(this.robotInfoObj.reply03.Content, 'robotText', 1)
|
|
this.socketsend(this.robotInfoObj.reply03.Content, 'robotText', 1)
|