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) => {