This commit is contained in:
Владимир Фёдоров 2025-12-07 23:09:35 +07:00
parent 5b3203e5aa
commit 9bde8ff7ee

View File

@ -67,7 +67,9 @@
router.push('/login'); router.push('/login');
return return
} }
return response.json() const res = response.json()
console.log(res)
return res
}) })
.then(data => { .then(data => {
team.value = data team.value = data
@ -157,13 +159,17 @@
intervalId = setInterval(() => { intervalId = setInterval(() => {
getTeam() getTeam()
getGame() getGame()
}, 1000); }, 2000);
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
clearInterval(intervalId); clearInterval(intervalId);
next(); next();
}); });
}); });
// function formatText(text: string) {
// return text.replaceAll(' ', ' ')
// }
</script> </script>
<template> <template>
@ -181,19 +187,12 @@
<div class="center-block-custom"> <div class="center-block-custom">
<form @submit.prevent="addAction"> <form @submit.prevent="addAction">
<div> <div>
<input <input class="input-custom" v-model="place" type="text" placeholder="Место назначения (А-1, а-1, а1)"
class="input-custom"
v-model="place"
type="text"
placeholder="Место назначения (А-1, а-1, а1)"
:disabled="gameState !== 'RUN'"> :disabled="gameState !== 'RUN'">
</div> </div>
<div class="button-container"> <div class="button-container">
<div class="second-color info-custom">{{ gameStateText }}</div> <div class="second-color info-custom">{{ gameStateText }}</div>
<button <button class="button-custom" type="submit" :disabled="gameState !== 'RUN'">Поехали</button>
class="button-custom"
type="submit"
:disabled="gameState !== 'RUN'">Поехали</button>
</div> </div>
</form> </form>
</div> </div>
@ -205,12 +204,7 @@
<div v-if="!team || !team.actions.length"> <div v-if="!team || !team.actions.length">
<div class="center-message"> <div class="center-message">
<div class="qr"> <div class="qr">
<VueQrcode <VueQrcode :value="qrurl" :options="qrOptions" tag="svg" class="qr-code" />
:value="qrurl"
:options="qrOptions"
tag="svg"
class="qr-code"
/>
<div> <div>
Пора решать загадку Пора решать загадку
</div> </div>
@ -298,7 +292,8 @@ body {
.message-content { .message-content {
font-weight: 500; font-weight: 500;
white-space: pre-line; /* white-space: pre-line; */
white-space: pre-wrap;
} }
.message-footer { .message-footer {
@ -332,4 +327,3 @@ body {
width: 200px; width: 200px;
} }
</style> </style>