修改语音按钮获取录音授权
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user