From 1c75c06eaa8177f4f2b94f6124595f465f86f7c8 Mon Sep 17 00:00:00 2001 From: chenlimao Date: Thu, 14 May 2026 10:05:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E6=88=BF=E9=97=B4=E5=9B=BE=E7=89=87&2v2+3v3+=E5=A4=A7?= =?UTF-8?q?=E4=B9=B1=E6=96=97=E5=8F=AA=E6=9C=89=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E6=88=BF=E9=97=B4=E6=89=8D=E5=B1=95=E7=A4=BA=E8=B8=A2=E4=BA=BA?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis.js | 4 ++-- src/components/PlayerSeats.vue | 8 +++++++- src/pages/battle-room.vue | 25 ++++++++++++++++++++++--- src/websocket.js | 4 ++-- 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/apis.js b/src/apis.js index 82a783a..8a99ed3 100644 --- a/src/apis.js +++ b/src/apis.js @@ -6,8 +6,8 @@ try { switch (envVersion) { case "develop": // 开发版 - BASE_URL = "http://192.168.1.30:8000/api/shoot"; - // BASE_URL = "https://apitest.shelingxingqiu.com/api/shoot"; + // BASE_URL = "http://192.168.1.30:8000/api/shoot"; + BASE_URL = "https://apitest.shelingxingqiu.com/api/shoot"; break; case "trial": // 体验版 BASE_URL = "https://apitest.shelingxingqiu.com/api/shoot"; diff --git a/src/components/PlayerSeats.vue b/src/components/PlayerSeats.vue index cb4c14f..5ce4f2a 100644 --- a/src/components/PlayerSeats.vue +++ b/src/components/PlayerSeats.vue @@ -14,6 +14,11 @@ const props = defineProps({ type: Function, default: () => {}, }, + /** 当前用户是否为房主;仅房主可见踢人按钮 */ + isOwner: { + type: Boolean, + default: false, + }, }); const seats = new Array(props.total).fill(1); @@ -45,8 +50,9 @@ const seats = new Array(props.total).fill(1); mode="widthFix" class="player-bg" /> --> + @@ -425,8 +443,9 @@ onBeforeUnmount(() => { + + :removePlayer="removePlayer" :isOwner="owner.id === user.id" /> {{ diff --git a/src/websocket.js b/src/websocket.js index bc96c36..49046fe 100644 --- a/src/websocket.js +++ b/src/websocket.js @@ -14,8 +14,8 @@ function createWebSocket(token, onMessage) { switch (envVersion) { case "develop": // 开发版 - url = "ws://192.168.1.30:8000/socket"; - // url = "wss://apitest.shelingxingqiu.com/socket"; + // url = "ws://192.168.1.30:8000/socket"; + url = "wss://apitest.shelingxingqiu.com/socket"; break; case "trial": // 体验版 url = "wss://apitest.shelingxingqiu.com/socket";