修改语音按钮获取录音授权

This commit is contained in:
田岩
2025-09-19 15:20:13 +08:00
parent a895c928bd
commit f5bdba03dc
15 changed files with 1538 additions and 1666 deletions
+4 -3
View File
@@ -73,11 +73,11 @@
</template>
<script setup>
import { toRefs, ref, computed, unref, onMounted, onUnmounted, nextTick, watch, reactive } from 'vue';
import {ref, computed, onMounted, nextTick, watch, reactive } from 'vue';
import common from '@/common/common';
import permission from '@/common/permission.js';
import { getPhoneEnvBool } from '@/common/common.js';
import { initRecord } from '@/composables/useExamSubject.js';
const emit = defineEmits(['submit']);
const props = defineProps({
isDisabled: {
@@ -132,7 +132,8 @@
// const innerAudioContext = uni.createInnerAudioContext();
const startTimer = ref(null); // 延迟启动的定时器ID
const startFlag = ref(1);
const startRecord = (obj) => {
const startRecord = async (obj) => {
try {await initRecord()}catch(err) {return;}
if (props.isDisabled) return;
// 开始录音
console.log('开始录音', recordingStatus.value);