This commit is contained in:
yanghang
2025-07-11 09:17:22 +08:00
parent 069f01fd9c
commit af2c1abee1
2 changed files with 36 additions and 5 deletions
@@ -0,0 +1,20 @@
<template>
<view>
</view>
</template>
<script>
export default {
name:"markdown-preview",
data() {
return {
};
}
}
</script>
<style>
</style>
+16 -5
View File
@@ -1,6 +1,6 @@
<!-- type: 0纯文本信息不翻译 1语音回答 2 文本回答 3, 段落信息 4 问题信息 5 统计信息 6: 发送loading状态 7: 教师反馈文本不翻译 -->
<template>
<view class="ai-answer" v-if="[3,4,5].indexOf(type) >= 0">
<view :class="['ai-answer', props.class]" :id="props.id" v-if="[3,4,5].indexOf(type) >= 0">
<view class="user-info">
<view class="avatar-box">
<ImagePreview class="img-box" :imgId="dataInfo?.userInfo?.imgAddr"></ImagePreview>
@@ -80,7 +80,7 @@
重新学
<image class="icon icon-iamge" src="@/static/images/course/refresh-white.png" ></image>
</view>
<view class="next-btn" @click.stop="goOnGetQues" v-if="showNextBtn && [3, 6].indexOf(type) >= 0 && isLast && !isPlaying">继续
<view class="next-btn" @click.stop="goOnGetQues" v-if="showGoonBtn">继续
<image class="icon icon-iamge" src="@/static/images/course/goon.png" ></image></view>
</view>
<view class="talking-cont last-cont" v-if=" [5].indexOf(type) >= 0 && !dataInfo.isLoading">
@@ -90,7 +90,7 @@
</view>
</view>
</view>
<view class="ai-answer" v-if="[7].indexOf(type) >= 0">
<view :class="['ai-answer', props.class]" :id="props.id" v-if="[7].indexOf(type) >= 0">
<view class="user-info">
<view class="avatar-box">
<ImagePreview class="img-box" :imgId="dataInfo?.userInfo?.imgAddr"></ImagePreview>
@@ -108,7 +108,7 @@
</view>
</view>
</view>
<view class="user-answer" v-else-if="[1, 2].indexOf(type) >= 0">
<view :class="['user-answer', props.class]" :id="props.id" v-else-if="[1, 2].indexOf(type) >= 0">
<view class="user-info">
<view class="avatar-box">
<image v-if="userInfo.imagePath" class="img-box" :src="userInfo.imagePath" style="width: 100%; height: 100%;"></image>
@@ -157,7 +157,7 @@
</view>
</view>
</view>
<view class="user-answer" v-else-if="[0, 6].indexOf(type) >= 0">
<view :class="['user-answer', props.class]" :id="props.id" v-else-if="[0, 6].indexOf(type) >= 0">
<view class="user-info">
<view class="avatar-box">
<image v-if="userInfo.imagePath" class="img-box" :src="userInfo.imagePath" style="width: 100%; height: 100%;"></image>
@@ -228,6 +228,14 @@ const audioCacheObj = computed(() => storageStore.audioObj)
default: () => ({}),
type: Object
},
class: {
default:'',
type: String
},
id: {
default:'',
type: String
}
})
const { type, dataInfo, activeVoiceId, isPlaying, isLast, lastQuestionInfo} = toRefs(props)
@@ -402,6 +410,9 @@ const audioCacheObj = computed(() => storageStore.audioObj)
})
}
const showNextBtn = ref(true)
const showGoonBtn = computed(()=>{
return showNextBtn.value && [3, 6].indexOf(props.type) >= 0 && isLast.value && !isPlaying.value
})
const goOnGetQues = () => {
if(props.type === 5){
emit('nextQuestion', unref(dataInfo))