From 5774ea2514593ba59c5c876d2d42042eb076ee15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Fri, 12 Dec 2025 21:29:33 +0800 Subject: [PATCH] =?UTF-8?q?m=E4=BF=AE=E5=A4=8Dtalk=E9=A1=B5=E5=A5=87?= =?UTF-8?q?=E6=80=AA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/sparring/talk.vue | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/pages/sparring/talk.vue b/src/pages/sparring/talk.vue index de5c933a..5f22780b 100644 --- a/src/pages/sparring/talk.vue +++ b/src/pages/sparring/talk.vue @@ -69,13 +69,13 @@ const isVideoStyle = computed(() => dataInfo.traInterTyp === '03'); const dataInfo = reactive({ - isPreview: '', // 是否是预览 traId: '', chaId: '', traType: '', traInterTyp: '', execId: '', sceneDesc: '', + preview: false, // 是否是预览 traInterTypDesc: '', // 类型的文字提示,例如 语音通话 ossAddr: '', //用户头像 chaName: '' //用户名称 @@ -118,7 +118,8 @@ dataInfo.execId + '&type=' + dataInfo.traType + - '&isPreview=' + dataInfo.isPreview + '&isPreview=' + + (dataInfo.preview ? '1' : '') ); } else { common.navigateBack() @@ -245,8 +246,7 @@ // 只有app才能打开摄像头 isVideo.value = dataInfo.traInterTyp === '03'; //#endif - console.log('isVideo.value', isVideo.value); - dataInfo.isPreview = e.isPreview ?? '0'; // 是否是预览 + dataInfo.preview = e.isPreview === '1'; // 是否是预览 const pageData = common.getPageCache('tipMsgsceneDesc'); dataInfo.ossAddr = pageData.ossAddr; dataInfo.chaName = pageData.chaName; @@ -254,13 +254,7 @@ }); onMounted(() => { initConnection({ - authParams: { - 'traType': dataInfo.traType, - 'traInterTyp': dataInfo.traInterTyp, - 'traId': dataInfo.traId, - 'chaId': dataInfo.chaId, - 'preview': true - }, + authParams: Object.assign({}, dataInfo), onStartRecord: onStartRecord, playPcmCallback: (res) => talkSpeakerRef.value.playPCM(res), setPlayNumber: (id) => talkSpeakerRef.value.setPlayNumber(id),