修改评论Bug
This commit is contained in:
+3
-1
@@ -18,4 +18,6 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
|||||||
|
|
||||||
# h5专用地址
|
# h5专用地址
|
||||||
|
|
||||||
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7001'
|
|
||||||
|
VITE_APP_BASE_H5_API_Url = 'http://aitstest.jlbank.com.cn:7001'
|
||||||
|
|
||||||
|
|||||||
@@ -64,5 +64,7 @@
|
|||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
p,span,div{
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -436,13 +436,13 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
|||||||
if(talkVoiceObj.value.duration){
|
if(talkVoiceObj.value.duration){
|
||||||
voiceTime.value = ( Math.ceil(talkVoiceObj.value.duration) || 0 ) + 's'
|
voiceTime.value = ( Math.ceil(talkVoiceObj.value.duration) || 0 ) + 's'
|
||||||
}else{
|
}else{
|
||||||
if(sum === 5) {
|
if(sum === 10) {
|
||||||
voiceTime.value = 0 + 's'
|
voiceTime.value = 0 + 's'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
setVoiceTime(sum)
|
setVoiceTime(sum)
|
||||||
},100)
|
},200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const playQnsVoice = (readType = 'qns', item) =>{
|
const playQnsVoice = (readType = 'qns', item) =>{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
>按住说话
|
>按住说话
|
||||||
</view>
|
</view>
|
||||||
<view class="touch-btn" v-if="keyboardIsShow">
|
<view class="touch-btn" v-if="keyboardIsShow">
|
||||||
<uv-input class="input-box" ref="inputRef" v-model="answerValue" maxlength="500"
|
<uv-input class="input-box" ref="inputRef" v-model="answerValue" :maxlength="props.textValueLength"
|
||||||
placeholderStyle='color:#999999;font-size:26rpx' placeholder="请输入文字">
|
placeholderStyle='color:#999999;font-size:26rpx' placeholder="请输入文字">
|
||||||
</uv-input>
|
</uv-input>
|
||||||
</view>
|
</view>
|
||||||
@@ -72,6 +72,10 @@ const props = defineProps({
|
|||||||
default: '当前状态不能发送内容!',
|
default: '当前状态不能发送内容!',
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
|
textValueLength:{
|
||||||
|
type: Number,
|
||||||
|
default: 500
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const { isDisabled, onlyVoice } = toRefs(props)
|
const { isDisabled, onlyVoice } = toRefs(props)
|
||||||
const isLoadingState = computed(() => props.isLoading)
|
const isLoadingState = computed(() => props.isLoading)
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="answer-content">
|
<view class="answer-content" v-if="props.isLoading">
|
||||||
|
<view class="talking-cont">
|
||||||
|
<CommonLoading color="#06f"/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="answer-content" v-else>
|
||||||
<view class="talking-cont">
|
<view class="talking-cont">
|
||||||
<MarkdownPreview :mdString="mdText"/>
|
<MarkdownPreview :mdString="mdText"/>
|
||||||
</view>
|
</view>
|
||||||
@@ -39,7 +45,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, computed, ref } from 'vue'
|
import { onMounted, computed, ref, watch } from 'vue'
|
||||||
import MarkdownPreview from '@/components/markdown-preview/markdown-preview.vue';
|
import MarkdownPreview from '@/components/markdown-preview/markdown-preview.vue';
|
||||||
|
|
||||||
const emit = defineEmits(['handleEvents'])
|
const emit = defineEmits(['handleEvents'])
|
||||||
@@ -48,10 +54,16 @@
|
|||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
type: Object
|
type: Object
|
||||||
},
|
},
|
||||||
|
isLoading:{
|
||||||
|
default: false,
|
||||||
|
type:Boolean
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(() => props.dataInfo, () => {},{deep: true,immediate: true})
|
||||||
|
watch(() => props.isLoading, () => {},{deep: true,immediate: true})
|
||||||
const mdText = computed(() => props.dataInfo?.talkingText)
|
const mdText = computed(() => props.dataInfo?.talkingText)
|
||||||
|
|
||||||
const reAnswer = () => {
|
const reAnswer = () => {
|
||||||
emit('handleEvents', 'reAnswer')
|
emit('handleEvents', 'reAnswer')
|
||||||
}
|
}
|
||||||
@@ -70,7 +82,10 @@
|
|||||||
border-radius: 15rpx;
|
border-radius: 15rpx;
|
||||||
padding-bottom: 10rpx;
|
padding-bottom: 10rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
float: left;
|
overflow: hidden;
|
||||||
|
float: left;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 80rpx;
|
||||||
.talking-cont{
|
.talking-cont{
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,10 +127,10 @@ import { onUnload } from '@dcloudio/uni-app';
|
|||||||
}
|
}
|
||||||
const setVoiceTime = (sum) => {
|
const setVoiceTime = (sum) => {
|
||||||
sum += 1
|
sum += 1
|
||||||
if(talkVoiceObj.value.duration){
|
if(Math.ceil(talkVoiceObj.value.duration)>0){
|
||||||
voiceTime.value = ( Math.ceil(talkVoiceObj.value.duration) || 0 ) + 's'
|
voiceTime.value = (Math.ceil(talkVoiceObj.value.duration) || 1 ) + 's'
|
||||||
}else{
|
}else{
|
||||||
if(sum === 10) {
|
if(sum === 20) {
|
||||||
voiceTime.value = 0 + 's'
|
voiceTime.value = 0 + 's'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<answerVue
|
<answerVue
|
||||||
v-else-if="talkingType === 'answer'"
|
v-else-if="talkingType === 'answer'"
|
||||||
:dataInfo="props.talkingInfo"
|
:dataInfo="props.talkingInfo"
|
||||||
|
:isLoading="!!props.talkingInfo.isLoading"
|
||||||
@handleEvents="handleEvents"
|
@handleEvents="handleEvents"
|
||||||
></answerVue>
|
></answerVue>
|
||||||
<view v-else></view>
|
<view v-else></view>
|
||||||
|
|||||||
@@ -251,6 +251,12 @@
|
|||||||
...body,
|
...body,
|
||||||
talkingVoice: askData.value.talkingVoice
|
talkingVoice: askData.value.talkingVoice
|
||||||
})
|
})
|
||||||
|
talkingList.value.push({
|
||||||
|
type: 'answer',
|
||||||
|
isLoading: true,
|
||||||
|
id: _id+'loading'
|
||||||
|
})
|
||||||
|
scrollToBottomNow()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (commond === 'ASK-STOP') {
|
if (commond === 'ASK-STOP') {
|
||||||
@@ -266,6 +272,7 @@
|
|||||||
console.log('开始回答!')
|
console.log('开始回答!')
|
||||||
answerIsOver.value = false
|
answerIsOver.value = false
|
||||||
answerText.value = ''
|
answerText.value = ''
|
||||||
|
talkingList.value.pop()
|
||||||
talkingList.value.push({
|
talkingList.value.push({
|
||||||
type: 'answer',
|
type: 'answer',
|
||||||
talkingText: answerText.value,
|
talkingText: answerText.value,
|
||||||
|
|||||||
Reference in New Issue
Block a user