fix:回答提示

This commit is contained in:
杨航
2025-12-15 17:18:24 +08:00
parent 82df6c7a86
commit ebd473703f
2 changed files with 23 additions and 16 deletions
+2 -2
View File
@@ -4,8 +4,8 @@ ENV = '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.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_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_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_TRAPRACTICE = 'http://25.64.32.156:9603'
+21 -14
View File
@@ -18,10 +18,12 @@
<view v-else></view> <view v-else></view>
<view class="talking-tips" v-if="talkingType === 'answer' && !isExam && isLast"> <view class="talking-tips" v-if="talkingType === 'answer' && !isExam && isLast">
<view class="talking-tips-btn" @click="getTips()">回答提示</view> <view class="talking-tips-btn" @click="getTips()">回答提示</view>
<view v-show="showContent">
<view class="talking-tips-loading" v-if="loadingTips"> <view class="talking-tips-loading" v-if="loadingTips">
<CommonLoading color="#06f" /> <CommonLoading color="#06f" />
</view> </view>
<view class="talking-tips-cont" v-else>{{tipsContent}}</view> <view class="talking-tips-cont" v-else>{{tipsContent}}</view>
</view>
</view> </view>
</view> </view>
</template> </template>
@@ -92,6 +94,7 @@
const loadingTips = ref(false) const loadingTips = ref(false)
const tipsContent = ref('') const tipsContent = ref('')
const showContent = ref(false)
const handleEvents = (type, info = {}) => { const handleEvents = (type, info = {}) => {
emit('handleEvents', { emit('handleEvents', {
type, type,
@@ -101,24 +104,28 @@
}) })
} }
const getTips = () => { const getTips = () => {
if(tipsContent.value){ if(showContent.value){
tipsContent.value = '' showContent.value = false
return return
} }
loadingTips.value = true showContent.value = true
handleEvents('scrollToBottom') handleEvents('scrollToBottom')
partnerChatPrompt({ if(!tipsContent.value){
execId: props.execId, loadingTips.value = true
traId: props.traId,
content: props.talkingInfo.talkingText,
chaId: roleInfo.value?.chaId
}).then(res=>{
tipsContent.value = res.body
loadingTips.value = false
handleEvents('scrollToBottom') handleEvents('scrollToBottom')
}).catch(()=> { partnerChatPrompt({
loadingTips.value =false execId: props.execId,
}) traId: props.traId,
content: props.talkingInfo.talkingText,
chaId: roleInfo.value?.chaId
}).then(res=>{
tipsContent.value = res.body
loadingTips.value = false
handleEvents('scrollToBottom')
}).catch(()=> {
loadingTips.value =false
})
}
} }
const changePlay = (id) => { const changePlay = (id) => {
emit('handleEvents', { emit('handleEvents', {