Compare commits

..

2 Commits

Author SHA1 Message Date
唐明明
31846e54a7 微调 2022-02-24 15:44:43 +08:00
唐明明
75d73e9c87 新增发送语音消息成功提示音 2022-02-24 15:40:59 +08:00
5 changed files with 11 additions and 3 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
pages/.DS_Store vendored

Binary file not shown.

View File

@@ -108,9 +108,6 @@
this.isMoveCancel = false
return
}
console.log(this.maxRecordTime - this.recordTime)
if((this.maxRecordTime - this.recordTime) <= 0){
uni.showToast({
title: '说话时间太短',
@@ -140,6 +137,7 @@
this.mp3AudioSrc = null
setTimeout(() => {
this.$emit('success')
this.toastAudiMp3()
}, 500)
})
},
@@ -180,6 +178,16 @@
this.isBetaPlay = false;
betaAudio.destroy()
})
},
// 播放提示音乐
toastAudiMp3(){
let toastAudio = uni.createInnerAudioContext()
toastAudio.src = require('@/static/im/toast/sentVoice.mp3')
toastAudio.autoplay = true
toastAudio.volume = .1
toastAudio.onEnded(() => {
toastAudio.destroy()
})
}
}
}

BIN
static/.DS_Store vendored

Binary file not shown.

BIN
static/im/toast/sentVoice.mp3 Executable file

Binary file not shown.