diff --git a/src/pages/zoneMacro.vue b/src/pages/zoneMacro.vue index 69e78e19..f3de366d 100644 --- a/src/pages/zoneMacro.vue +++ b/src/pages/zoneMacro.vue @@ -54,10 +54,11 @@ const usedZoneInfo = [ ...preSortZoneInfo.filter(v => v.contentType === undefined || !showContentTypes.includes(v.contentType)), ] -const websocketConnected = ref(false) +const useType = ref('ws' as 'ws' | 'act') async function onLoad() { if (window.location.href.indexOf('OVERLAY_WS') > 0) { + useType.value = 'ws' let resolvePromise: (value: boolean | PromiseLike) => void const promise = new Promise((resolve) => { resolvePromise = resolve @@ -69,7 +70,6 @@ async function onLoad() { ElMessageBox.close() res(true) resolvePromise(true) - websocketConnected.value = true }) }), new Promise((res) => { @@ -99,12 +99,14 @@ async function onLoad() { clearInterval(loop) ElMessageBox.close() resolvePromise(true) - websocketConnected.value = true }) }, 1000) } return promise } + else { + useType.value = 'act' + } } onMounted(() => { @@ -287,6 +289,7 @@ onMounted(() => { + {{ useType }}
@@ -416,8 +419,8 @@ onMounted(() => { -