diff --git a/src/components/image-preview/image-preview.vue b/src/components/image-preview/image-preview.vue index f368c93f..330050b6 100644 --- a/src/components/image-preview/image-preview.vue +++ b/src/components/image-preview/image-preview.vue @@ -156,7 +156,7 @@ position: absolute; left: 50%; top: 50%; - max-width: 100%; + width: 100vw; max-height: 100%; transform: translate(-50%, -50%); } diff --git a/src/components/image-preview/video-preview.vue b/src/components/image-preview/video-preview.vue index 8f65deec..3eb87594 100644 --- a/src/components/image-preview/video-preview.vue +++ b/src/components/image-preview/video-preview.vue @@ -104,8 +104,8 @@ transform: translate(-50%, -50%); } .overlay-box .video-cont-center{ - max-width: 100%; - max-height: 80%; + width: 100vw; + max-height: 100%; position: absolute; top: 50%; left: 50%; diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index eb69ea22..9afeaab4 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -87,6 +87,10 @@ const initRecord = () => { // stopRecord() unref(recordObjCom)?.onStop((res, duration)=>{ audioPath.value = res.tempFilePath + showTalkingModel.value = false + if(!isOut.value){ + emit('uploadVoice', audioPath.value) + } }) unref(recordObjCom).onStart(() => { console.log('开始录音了'); @@ -187,7 +191,6 @@ const showOverlayTalking = (obj) => { emit('startRecord') recNum.value += 1 if(!isDisabled.value){ - touchX.value = obj.changedTouches[0].pageX touchY.value = obj.changedTouches[0].pageY baseY.value = obj.currentTarget.offsetTop @@ -208,21 +211,9 @@ const showOverlayTalking = (obj) => { } const hideOverlayTalking = (obj) => { if(!showTalkingModel.value) return - if(activeNum.value + 1 === recNum.value){ - showTalkingModel.value = false - //#ifdef APP-PLUS - stopRecord() - // #endif - if(!isOut.value){ - setTimeout(()=>{ - emit('uploadVoice', audioPath.value) - },1000) - } - }else{ - showTalkingModel.value = false - common.msg('录音失败,请重试!') - } - activeNum.value = recNum.value + //#ifdef APP-PLUS + stopRecord() + // #endif } const handleMove = (obj) => {