feat: implement QR code scan login system with admin control
- Add scan login service with Redis-based token management - Add scan login API routes for token generation and validation - Add QRCodeLogin component for PC-side QR code display - Add EntryQRCode component for mass login scenarios - Add ScanLoginView for mobile-side login form - Add localStorage persistence for user identity - Add logout functionality to mobile client - Add auto-redirect for logged-in users - Add admin console control for QR code display on big screen - Add socket event forwarding from admin to screen display Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -243,6 +243,21 @@ function playFanfare() {
|
||||
admin.controlMusic('play', 'fanfare');
|
||||
}
|
||||
|
||||
// QR Code display control
|
||||
function showEntryQR() {
|
||||
const socket = admin.getSocket();
|
||||
if (socket) {
|
||||
socket.emit('display:show_entry_qr' as any, {});
|
||||
}
|
||||
}
|
||||
|
||||
function hideQR() {
|
||||
const socket = admin.getSocket();
|
||||
if (socket) {
|
||||
socket.emit('display:hide_qr' as any, );
|
||||
}
|
||||
}
|
||||
|
||||
// Computed helpers
|
||||
const currentPrizeConfig = computed(() => {
|
||||
// 优先使用从服务器加载的配置
|
||||
@@ -666,6 +681,19 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- QR Code Display Control -->
|
||||
<div class="control-group">
|
||||
<h4>大屏二维码</h4>
|
||||
<div class="button-group">
|
||||
<button class="ctrl-btn primary" @click="showEntryQR">
|
||||
显示入场二维码
|
||||
</button>
|
||||
<button class="ctrl-btn outline" @click="hideQR">
|
||||
隐藏二维码
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Music Control -->
|
||||
<div class="control-group">
|
||||
<h4>音乐控制</h4>
|
||||
|
||||
Reference in New Issue
Block a user