修改bug
This commit is contained in:
@@ -203,7 +203,12 @@
|
||||
});
|
||||
// 声音加载完毕
|
||||
audioStore.onAudioLoaded((e) => {
|
||||
voiceTime.value = (Math.ceil(e.duration) || 1) + 's';
|
||||
// 计算原始时长
|
||||
const originalTime = Math.ceil(e.duration) || 1;
|
||||
// 判断是否在118-123秒范围内
|
||||
const displayTime = originalTime >= 118 && originalTime <= 124 ? 120 : originalTime;
|
||||
// 赋值显示
|
||||
voiceTime.value = displayTime + 's';
|
||||
});
|
||||
|
||||
watch(
|
||||
|
||||
@@ -96,7 +96,6 @@
|
||||
default: '请稍后再试!',
|
||||
type: String
|
||||
},
|
||||
|
||||
canAnswer: {
|
||||
default: true,
|
||||
type: Boolean
|
||||
@@ -150,7 +149,6 @@
|
||||
// 结束录音
|
||||
const stopRecord = (status = false) => {
|
||||
if (props.isDisabled) return;
|
||||
console.log('结束录音嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻');
|
||||
if (startTimer.value) {
|
||||
clearTimeout(startTimer.value);
|
||||
startTimer.value = null;
|
||||
@@ -170,10 +168,8 @@
|
||||
});
|
||||
}, times);
|
||||
}
|
||||
|
||||
nextTick(() => (recordingStatus.value = 'not_started'));
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
// #ifdef APP-PLUS
|
||||
recorderManager.onStop(function (res) {
|
||||
|
||||
Reference in New Issue
Block a user