From 890d4436d9a78968bd97be83607a2b1e9a8635e5 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Fri, 7 Mar 2025 11:47:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor(liveRoom):=20=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=92=AD=E6=94=BE=E5=99=A8=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了之前注释掉的 showConfirmDialog 调用 - 保留了错误处理的基本逻辑结构 - 优化了代码格式,去除了多余的注释 --- app/pages/liveRoom/index.client.vue | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/app/pages/liveRoom/index.client.vue b/app/pages/liveRoom/index.client.vue index c34a068..370f6c5 100644 --- a/app/pages/liveRoom/index.client.vue +++ b/app/pages/liveRoom/index.client.vue @@ -23,14 +23,13 @@ const player = ref(null) const {quoteStatus, show, playerId, show1, auctionData, getSocketData, getLiveLink, fullLive} = liveStore() const pullLink = ref('') const handlePlayerError = (error) => { - // showConfirmDialog({ - // message: t('live_room.error_mess'), - // showCancelButton: true - // }).then(() => { - // initializePlayer() - // }).catch(() => { - // }) - // player.value?.play() + showConfirmDialog({ + message: t('live_room.error_mess'), + showCancelButton: true + }).then(() => { + initializePlayer() + }).catch(() => { + }) } const loading1=ref(false) const initializePlayer = async () => { @@ -87,13 +86,13 @@ const initializePlayer = async () => { }) player.value.on('error', handlePlayerError) } catch (error) { - // showConfirmDialog({ - // message: t('live_room.error_mess'), - // showCancelButton: true - // }).then(() => { - // initializePlayer() - // }).catch(() => { - // }) + showConfirmDialog({ + message: t('live_room.error_mess'), + showCancelButton: true + }).then(() => { + initializePlayer() + }).catch(() => { + }) } }