fix: Bug
This commit is contained in:
@@ -151,8 +151,14 @@ const talkingList = ref([])
|
||||
const activeVoiceTalkingItemId = ref('')
|
||||
const answerValue = ref('')
|
||||
const inputRef = ref('')
|
||||
const flagVal = ref('1')
|
||||
// 初始化数据
|
||||
const getData = async () => {
|
||||
const getData = async (flag) => {
|
||||
if(flag === flagVal.value){
|
||||
flagVal.value = '2'
|
||||
}else{
|
||||
return
|
||||
}
|
||||
try{
|
||||
const { body } = await getCourseStudyInfoApi({crsId: crsId.value})
|
||||
initsocketTask()
|
||||
@@ -223,7 +229,7 @@ const choiceTeacherInfo = computed(()=>{
|
||||
})
|
||||
// 选择教师语音对象
|
||||
const activeVoiceTeachNo = ref('')
|
||||
const teacherVoiceObj = uni.createInnerAudioContext()
|
||||
let teacherVoiceObj = uni.createInnerAudioContext()
|
||||
|
||||
teacherVoiceObj.onEnded(()=>{
|
||||
activeVoiceTeachNo.value = ''
|
||||
@@ -455,10 +461,14 @@ onLoad((params) => {
|
||||
const showTalkingModel = ref(false)
|
||||
// 录音
|
||||
onMounted(()=>{
|
||||
getData();
|
||||
getData('1');
|
||||
})
|
||||
onShow(()=>{
|
||||
// getData();
|
||||
getData('2');
|
||||
})
|
||||
onUnmounted(()=>{
|
||||
teacherVoiceObj?.stop?.()
|
||||
teacherVoiceObj.src = ''
|
||||
})
|
||||
const uploadRecordNow = (voicePath) => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user