fix: bug

This commit is contained in:
yanghang
2025-07-14 18:33:14 +08:00
parent 7e8d6eaca4
commit ba38fc0d84
2 changed files with 52 additions and 7 deletions
+15 -1
View File
@@ -389,7 +389,21 @@ const audioCacheObj = computed(() => storageStore.audioObj)
itemVoice.value = unref(dataInfo).talkingVoice
talkVoiceObj.value.src = itemVoice.value
setTimeout(()=>{
voiceTime.value = ( Math.ceil(talkVoiceObj.value.duration) || 0 ) + 's'
setVoiceTime(0)
},100)
}
}
const setVoiceTime = (sum) => {
sum += 1
if(talkVoiceObj.value.duration){
voiceTime.value = ( Math.ceil(talkVoiceObj.value.duration) || 0 ) + 's'
}else{
if(sum === 5) {
voiceTime.value = 0 + 's'
return
}
setTimeout(()=>{
setVoiceTime(sum)
},100)
}
}
+37 -6
View File
@@ -3,9 +3,9 @@
<view class="top-bg"></view>
<view class="bot-bg"></view>
<view class="course-study-body" v-show="step === 1">
<view class="seek-setting" @click="showChangeSeekModelNow">
{{chooseRate}}
<image src="@/static/images/course/setting.png" alt="" class="image-icon"></image>
<view class="seek-setting">
<view class="inline-block" @click="showChangeSeekModelNow">{{chooseRate}}</view>
<image src="@/static/images/course/setting.png" alt="" class="image-icon" @click.stop="showChangeBgModelNow"></image>
</view>
<view class="body-title">
<uv-icon class="arrow-icon" name="arrow-left" @click="common.navigateBack()"/>
@@ -38,9 +38,9 @@
</view>
</view>
<view class="course-study-body" v-show="step === 2">
<view class="seek-setting" @click="showChangeSeekModelNow">
{{chooseRate}}
<image src="@/static/images/course/setting.png" alt="" class="image-icon"></image>
<view class="seek-setting">
<view class="inline-block" @click="showChangeSeekModelNow">{{chooseRate}}</view>
<image src="@/static/images/course/setting.png" alt="" class="image-icon" @click.stop="showChangeBgModelNow"></image>
</view>
<view class="body-title" @click="scrollToBottomNow">
<uv-icon class="arrow-icon" name="arrow-left" @click="common.navigateBack()"/>
@@ -100,6 +100,21 @@
</view>
</view>
</uv-overlay>
<uv-overlay :show="showBgModel" opacity=".6" @click="showBgModel = false">
<view class="overlay-box">
<view class="white-bg-box">
<view class="box-title">设置
</view>
<view class="box-btns">
<view
v-for="item in rateList"
:class="{'is-active':item === chooseRate}"
@click="chooseRateNow(item)"
>{{item}}</view>
</view>
</view>
</view>
</uv-overlay>
</view>
</template>
@@ -224,6 +239,10 @@ const showChangeSeekModelNow = () => {
// changePlayItemId()
showSeekModel.value = true
}
const showBgModel = ref(false)
const showChangeBgModelNow = () => {
showBgModel.value = true
}
// 关闭播放状态
const changePlayItemId = (id = '') => {
if(activeVoiceTalkingItemId.value === id){
@@ -318,6 +337,18 @@ const getGraphInfoUnStudy = (flag = 0) => {
if(!_body.chatBody) {
return
}
if(Number(_body.bodyTyp) === 7){
common.show('恭喜你已学完全部知识点', '有什么心得跟我们分享吗?',true, '取消','去评论').then((res) => {
if(res) {
// 去评论
common.navigateTo(`/pages/courseDetail/submit?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`)
}else{
// 取消
common.navigateTo(`/pages/courseDetail/index?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study`)
}
}).finally(() => {})
return
}
lastTalkingInfo.value = {
crsId: crsId.value,
qstLogId: _body.chatBody,