From 7e1a3be5105eef51eebe29b32531e0c70c2c7ddb Mon Sep 17 00:00:00 2001 From: kron Date: Mon, 10 Nov 2025 13:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShootProgress2.vue | 4 +- src/components/TeamAvatars.vue | 60 ++--- src/components/TestDistance.vue | 2 - src/pages.json | 3 - src/pages/match-detail.vue | 2 +- src/pages/team-battle.vue | 4 + src/pages/team-match.vue | 362 ------------------------------ src/util.js | 17 -- 8 files changed, 39 insertions(+), 415 deletions(-) delete mode 100644 src/pages/team-match.vue diff --git a/src/components/ShootProgress2.vue b/src/components/ShootProgress2.vue index 9caa6a0..bcfa45f 100644 --- a/src/components/ShootProgress2.vue +++ b/src/components/ShootProgress2.vue @@ -27,6 +27,7 @@ watch( barColor.value = "linear-gradient( 180deg, #FFA0A0 0%, #FF6060 100%)"; if (newVal.includes("蓝队")) barColor.value = "linear-gradient( 180deg, #9AB3FF 0%, #4288FF 100%)"; + if (newVal.includes("重回")) return; if (newVal.includes("红队") || newVal.includes("蓝队")) { if (timer.value) clearInterval(timer.value); remain.value = props.total; @@ -41,6 +42,8 @@ watch( ); const updateRemain = (value) => { + if (Math.ceil(value) === remain.value || Math.floor(value) === remain.value) + return; if (timer.value) clearInterval(timer.value); remain.value = Math.round(value); timer.value = setInterval(() => { @@ -84,7 +87,6 @@ onBeforeUnmount(() => { display: flex; flex-direction: column; align-items: center; - margin-left: 10rpx; } .container > image { width: 360rpx; diff --git a/src/components/TeamAvatars.vue b/src/components/TeamAvatars.vue index c3c265b..b5e8670 100644 --- a/src/components/TeamAvatars.vue +++ b/src/components/TeamAvatars.vue @@ -1,5 +1,5 @@ - - - - diff --git a/src/util.js b/src/util.js index ee6cacb..52f49fd 100644 --- a/src/util.js +++ b/src/util.js @@ -10,23 +10,6 @@ export const formatTimestamp = (timestamp) => { return `${year}-${month}-${day}`; }; -export const checkConnection = () => { - uni.sendSocketMessage({ - data: JSON.stringify({ event: "ping", data: {} }), - fail: () => { - websocket.closeWebSocket(); - const token = uni.getStorageSync( - `${uni.getAccountInfoSync().miniProgram.envVersion}_token` - ); - if (!token) return; - // 如果发送失败,说明连接已断开,需要重新连接 - websocket.createWebSocket(token, (content) => { - uni.$emit("socket-inbox", content); - }); - }, - }); -}; - export const debounce = (fn, delay = 300) => { let timer = null; return async (...args) => {