优化
Vercel Deploy / deploy (push) Successful in 1m0s

This commit is contained in:
biss committed 2026-06-14 20:24:00 +08:00
1 parent 92e13ac836
commit 73c9c7f988
16 files changed
+102 -53

No files matched your search

+4 -4
View File
@@ -9,7 +9,7 @@
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Orbitron:wght@500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../css/tech-query.css">
<link rel="stylesheet" href="../css/notice-banner.css">
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
</head>
<body>
<main class="detail-shell">
@@ -84,8 +84,8 @@
<p>© 2026 BI Intelligent Query Interface</p>
</footer>
<script src="../js/certs-certificate.js"></script>
<script src="https://cdn.jsdmirror.cn/gh/bishshi/wechat-detect@main/wechat-detect.js"></script>
<script src="../js/notice-banner.js"></script>
<script defer src="../js/certs-certificate.js?v=20260614"></script>
<script defer src="https://cdn.jsdmirror.cn/gh/bishshi/wechat-detect@main/wechat-detect.js"></script>
<script defer src="../js/notice-banner.js?v=20260614"></script>
</body>
</html>
+5 -5
View File
@@ -9,8 +9,8 @@
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Orbitron:wght@500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../css/tech-query.css">
<link rel="stylesheet" href="../css/notice-banner.css">
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script src="https://unpkg.com/html5-qrcode"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script defer src="https://unpkg.com/html5-qrcode"></script>
</head>
<body>
<main class="page-shell">
@@ -89,8 +89,8 @@
<p>© 2026 BI Intelligent Query Interface</p>
</footer>
<script src="../js/certs-index.js"></script>
<script src="https://cdn.jsdmirror.cn/gh/bishshi/wechat-detect@main/wechat-detect.js"></script>
<script src="../js/notice-banner.js"></script>
<script defer src="../js/certs-index.js?v=20260614"></script>
<script defer src="https://cdn.jsdmirror.cn/gh/bishshi/wechat-detect@main/wechat-detect.js"></script>
<script defer src="../js/notice-banner.js?v=20260614"></script>
</body>
</html>
+13 -3
View File
@@ -2,11 +2,17 @@ const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNoaXhzc3JwaGZneHZxcWlna3pvIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ2OTE0OTEsImV4cCI6MjA5MDI2NzQ5MX0.Az_Ew2J2zdOMcSV0UNAjBS-LPqGpqhsaN4IyZ5R7iqU';
const sbClient = supabase.createClient(SUPABASE_URL, SUPABASE_ANON_KEY);
const html5QrCode = new Html5Qrcode("reader");
let html5QrCode = null;
const scannerOverlay = document.getElementById('scanner-overlay');
document.getElementById('startScanBtn').addEventListener('click', async () => {
if (typeof Html5Qrcode === 'undefined') {
alert("扫码组件加载失败,请刷新页面后重试。");
return;
}
scannerOverlay.style.display = 'flex';
html5QrCode = html5QrCode || new Html5Qrcode("reader");
const config = {
fps: 15,
@@ -46,7 +52,7 @@ const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
});
async function closeScanner() {
if (html5QrCode.isScanning) {
if (html5QrCode && html5QrCode.isScanning) {
await html5QrCode.stop();
}
scannerOverlay.style.display = 'none';
@@ -111,6 +117,10 @@ const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
}[char]));
}
function encodeUrlParam(value) {
return encodeURIComponent(String(value ?? ''));
}
function renderAwardStats(data, awardRecipientCounts) {
const holderCounts = (data || []).reduce((counts, item) => {
const holderName = item.holder_name || '未填写';
@@ -205,7 +215,7 @@ const SUPABASE_URL = 'https://chixssrphfgxvqqigkzo.supabase.co';
<td>${escapeHtml(item.holder_name || '-')}</td>
<td>${escapeHtml(item.honor_title || '-')}</td>
<td>${escapeHtml(item.issue_date || '-')}</td>
<td><button class="tech-link-button secondary" type="button" onclick="goToDetail('${item.id}')">查看详情</button></td>
<td><a class="tech-link-button secondary" href="certificate.html?id=${encodeUrlParam(item.id)}">查看详情</a></td>
</tr>
`;
});
Loaded 3 of 16 files, more files were not shown because too many files have changed in this diff. Show more