修改bug

This commit is contained in:
田岩
2025-09-02 15:07:06 +08:00
parent 14f3b2e294
commit 05f56c3ce1
16 changed files with 179 additions and 102 deletions
+6 -1
View File
@@ -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(
-4
View File
@@ -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) {