bx-2502-qr #1

Merged
ksenia_mikhailova merged 4 commits from bx-2502-qr into dev 2025-03-19 09:23:27 +03:00
1 changed files with 10 additions and 8 deletions
Showing only changes of commit d457a9e04d - Show all commits

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="qr-container"> <div class="qr-container">
<h1 class="qr-title">QR-код</h1> <h1 class="qr-title">QR-КОД</h1>
<canvas ref="qrCanvas" class="qr-code"></canvas> <canvas ref="qrCanvas" class="qr-code"></canvas>
</div> </div>
</template> </template>
@ -12,10 +12,13 @@ export default {
name: 'QRPage', name: 'QRPage',
data() { data() {
return { return {
qrText: 'http://192.168.88.153:8106/', qrText: '', // Текст или ссылка для QR-кода
}; };
}, },
mounted() { mounted() {
// Добавляем "https://", если его нет в URL
const currentUrl = window.location.href;
this.qrText = currentUrl.startsWith('http') ? currentUrl : `https://${currentUrl}`;
this.generateQR(); this.generateQR();
}, },
methods: { methods: {
@ -43,12 +46,11 @@ export default {
} }
.qr-title { .qr-title {
font-family: 'Arial', sans-serif; /* Шрифт */ font-family: 'Arial', sans-serif;
font-size: 2.5rem; /* Размер текста */ font-size: 2rem;
color: #333; /* Цвет текста */ color: #333;
font-weight: bold; /* Жирный текст */ font-weight: bold;
text-transform: uppercase; /* Все буквы заглавные */ margin-bottom: 20px;
margin-bottom: 0px; /* Отступ снизу */
} }
.qr-code { .qr-code {