JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_feat:热门问题
This commit is contained in:
+3
-3
@@ -2,15 +2,15 @@
|
||||
ENV = 'development.yh'
|
||||
# 'development.yh'
|
||||
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
|
||||
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786'
|
||||
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
|
||||
# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786'
|
||||
# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.154:9601'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.158:9601'
|
||||
# VITE_APP_BASE_H5_API_Url_TRASTUDY = 'http://25.64.32.154:9602'
|
||||
# VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.32.157:9605'
|
||||
VITE_APP_BASE_H5_API_Url_TRAASK = 'http://25.64.32.157:9605'
|
||||
|
||||
|
||||
+84
-22
@@ -22,7 +22,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="ai-info">
|
||||
<view class="ai-info" v-show="talkingList.length === 0">
|
||||
<!-- <image src="@/static/images/dialog/pet-3.png" alt="" class="image-pet-bg"></image> -->
|
||||
<image src="@/static/images/dialog/pet-bg-base.png" alt="" class="image-pet-bg"></image>
|
||||
<image :src="luimgAddr" alt="" class="image-pet" mode="widthFix"></image>
|
||||
@@ -32,28 +32,51 @@
|
||||
<view class="info-btn">试试他的能力</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="questions-view">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false">
|
||||
<view class="question-row">
|
||||
<view class="question-item" v-for="item in Math.ceil(questionList.length / 2)"
|
||||
@click="sendText(questionList[item - 1].hotContent)">
|
||||
{{ questionList[item - 1].hotContent }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="question-row">
|
||||
<view class="question-item" v-for="item in questionList.length - Math.ceil(questionList.length / 2)"
|
||||
@click="sendText(questionList[item + Math.ceil(questionList.length / 2) - 1].hotContent)">
|
||||
{{ questionList[item + Math.ceil(questionList.length / 2) - 1].hotContent }}
|
||||
<view class="talking-list talking-list-qns" v-show="talkingList.length === 0">
|
||||
<scroll-view class="talking-scroll-list" :scroll-y="true" :scroll-top="scrollTop" :show-scrollbar="false"
|
||||
:scroll-with-animation="false">
|
||||
<view class="question-item-box" v-show="talkingList.length === 0" v-for="item in questionList">
|
||||
<view class="question-item" @click="sendText(item.hotContent)">
|
||||
{{ item.hotContent }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="talking-list">
|
||||
<!-- <view class="questions-view">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false">
|
||||
<view class="question-row">
|
||||
<view
|
||||
class="question-item"
|
||||
v-for="item in Math.ceil(questionList.length / 2)"
|
||||
@click="sendText(questionList[item - 1].hotContent)"
|
||||
>
|
||||
{{ questionList[item - 1].hotContent }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="question-row">
|
||||
<view
|
||||
class="question-item"
|
||||
v-for="item in questionList.length - Math.ceil(questionList.length / 2)"
|
||||
@click="sendText(questionList[item + Math.ceil(questionList.length / 2) - 1].hotContent)"
|
||||
>
|
||||
{{ questionList[item + Math.ceil(questionList.length / 2) - 1].hotContent }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view> -->
|
||||
<view class="talking-list" v-show="talkingList.length > 0">
|
||||
<scroll-view class="talking-scroll-list" :scroll-y="true" :scroll-top="scrollTop" :show-scrollbar="false"
|
||||
:scroll-with-animation="false">
|
||||
<TalkingItem v-for="(item, index) in talkingList" :talkingType="item.type" :talkingInfo="item"
|
||||
:isLast="index + 1 === talkingList.length" :isAnswering="!answerIsOver"
|
||||
:activeVoiceId="activeVoiceTalkingItemId" @handleEvents="talkItemEvents"></TalkingItem>
|
||||
|
||||
<view class="question-item-box mt-16" v-for="item in talkQnsList">
|
||||
<view class="question-item" @click="sendText(item)">
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="router-list">
|
||||
@@ -229,6 +252,7 @@
|
||||
const showModelComfirm = ref(false);
|
||||
const reconcatNum = ref(1);
|
||||
const askTime = ref(0)
|
||||
const talkQnsList = ref([])
|
||||
const initsocketTask = () => {
|
||||
isHistory.value = false;
|
||||
socketStore.creatSocket('/traask/asksocket/open?summary=');
|
||||
@@ -300,8 +324,7 @@
|
||||
if (commond === 'ASK') {
|
||||
console.log('发送问题成功!');
|
||||
if (talkingList.value.length > 0 && talkingList.value[talkingList.value.length - 1].isLoading) {
|
||||
// talkingList.value.pop();
|
||||
talkingList.value = talkingList.value.filter(t => !t.isLoading)
|
||||
talkingList.value.pop();
|
||||
}
|
||||
seqNo.value = body.seqNo;
|
||||
touchBtnCallBack.value && touchBtnCallBack.value();
|
||||
@@ -319,7 +342,6 @@
|
||||
isLoading: true,
|
||||
id: _id + 'loading'
|
||||
});
|
||||
answerIsOver.value = false;
|
||||
scrollToBottomNow();
|
||||
return;
|
||||
}
|
||||
@@ -342,7 +364,6 @@
|
||||
answerIsOver.value = false;
|
||||
answerText.value = '';
|
||||
talkingList.value.pop();
|
||||
talkingList.value = talkingList.value.filter(t => !t.isLoading)
|
||||
talkingList.value.push({
|
||||
type: 'answer',
|
||||
talkingText: answerText.value,
|
||||
@@ -361,6 +382,7 @@
|
||||
} else if (body.event === 'end') {
|
||||
console.log('完成回答!');
|
||||
answerIsOver.value = true;
|
||||
console.log(answerText.value)
|
||||
} else if (body.event === 'sourceDocuments') {
|
||||
console.log('回答返回文件列表!');
|
||||
console.log('body: ', body);
|
||||
@@ -368,6 +390,10 @@
|
||||
let _data = body.data;
|
||||
talkingList.value[talkingList.value.length - 1].talkingFiles = _data.knowledgeList || [];
|
||||
talkingList.value[talkingList.value.length - 1].talkingCrsList = _data.crsList || [];
|
||||
} else if (body.event === 'recommend') {
|
||||
console.log('回答返回问题列表!');
|
||||
if (talkingList.value.length === 0) return;
|
||||
talkQnsList.value = body.data || []//questionList.value.splice(0, 3);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -387,7 +413,6 @@
|
||||
|
||||
if (commond === 'ASK-ERR') {
|
||||
console.log('提问失败,系统异常!');
|
||||
answerIsOver.value = true;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -406,6 +431,9 @@
|
||||
}, 3000);
|
||||
};
|
||||
const sendMessage = (data) => {
|
||||
if (data.commond === 'ASK') {
|
||||
talkQnsList.value = []
|
||||
}
|
||||
unref(SocketObj).send(data);
|
||||
};
|
||||
watch(
|
||||
@@ -704,7 +732,6 @@
|
||||
});
|
||||
} else {
|
||||
talkingList.value.pop();
|
||||
talkingList.value = talkingList.value.filter(t => !t.isLoading)
|
||||
uni.showToast({
|
||||
title: '未识别到文字',
|
||||
icon: 'none',
|
||||
@@ -714,7 +741,6 @@
|
||||
})
|
||||
.catch((err) => {
|
||||
talkingList.value.pop();
|
||||
talkingList.value = talkingList.value.filter(t => !t.isLoading)
|
||||
uni.showToast({
|
||||
title: '系统异常,请联系管理员',
|
||||
icon: 'none',
|
||||
@@ -1168,14 +1194,50 @@
|
||||
}
|
||||
|
||||
.talking-list {
|
||||
height: calc(100% - 772rpx);
|
||||
height: calc(100% - 328rpx);
|
||||
min-height: 300rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
min-height: 300rpx;
|
||||
|
||||
&.talking-list-qns {
|
||||
height: calc(100% - 600rpx);
|
||||
}
|
||||
|
||||
.talking-scroll-list {
|
||||
height: 100%;
|
||||
|
||||
.question-item-box {
|
||||
float: left;
|
||||
width: 100%;
|
||||
|
||||
&.mt-16 {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.question-item {
|
||||
margin-bottom: 0rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.question-item {
|
||||
// white-space: nowrap;
|
||||
float: left;
|
||||
width: auto;
|
||||
min-height: 66rpx;
|
||||
line-height: 56rpx;
|
||||
background-color: #fff;
|
||||
border: 2rpx solid #e0dede;
|
||||
padding: 5rpx 16rpx;
|
||||
border-radius: 11rpx;
|
||||
margin-bottom: 16rpx;
|
||||
// display: inline-block;
|
||||
font-size: 26rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user