diff --git a/src/common/common.js b/src/common/common.js index 613c33cd..e5416482 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -5,7 +5,7 @@ import { import showDialog from '@/common/dialogMessage' import common from '@/common/common' // #endif -function msg(title, duration = 1000) { +function msg(title, duration = 1500) { uni.showToast({ title: title, duration: duration, diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue index 0e07383c..4a38ac65 100644 --- a/src/pages/course/components/talkingItem.vue +++ b/src/pages/course/components/talkingItem.vue @@ -61,7 +61,7 @@ - { + return (dataInfo.value.imageAddrs || []) + }) + const previewFile = info => { previewFileFnc({ fileId: info.fileId, @@ -713,19 +717,30 @@ // } }; const setVoiceTime = (sum) => { - sum += 1; - if (talkVoiceObj.value.duration) { - voiceTime.value = (Math.ceil(talkVoiceObj.value.duration) || 0) + 's'; - } else { - if (sum === 100) { - voiceTime.value = (unref(dataInfo).voiceTime || 0) + 's'; - return; + plus.io.getAudioInfo({ + filePath: unref(dataInfo).talkingVoice, + success:(res)=>{ + voiceTime.value = (Math.floor(res.duration) || 1) + 's' + }, + fail:(res)=>{ + voiceTime.value = (unref(dataInfo).voiceTime || 1) + 's' } - setTimeout(() => { - setVoiceTime(sum); - }, 300); - } - }; + }) + } + // const setVoiceTime = (sum) => { + // sum += 1; + // if (talkVoiceObj.value.duration) { + // voiceTime.value = (Math.ceil(talkVoiceObj.value.duration) || 0) + 's'; + // } else { + // if (sum === 100) { + // voiceTime.value = (unref(dataInfo).voiceTime || 0) + 's'; + // return; + // } + // setTimeout(() => { + // setVoiceTime(sum); + // }, 300); + // } + // }; const playQnsVoice = (readType = 'qns', item) => { if (type.value === 2) { // 文本转语音 @@ -958,6 +973,13 @@ &:nth-child(3n){ margin-right: 0; } + &.cont-img-box2{ + width: calc(50% - 10rpx); + height: 200rpx; + &:nth-child(2n){ + margin-right: 0rpx; + } + } } } diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index 0655014d..c3c16b5c 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -1,7 +1,7 @@