This commit is contained in:
丹尼尔
2026-03-11 13:59:22 +08:00
parent 6da73da8d7
commit 152877cef2
18 changed files with 2930 additions and 33 deletions

View File

@@ -219,6 +219,18 @@
const API_BASE = '';
const KEY_STORAGE = 'wechat_key';
(function applyKeyFromUrl() {
try {
var params = new URLSearchParams(window.location.search);
var k = params.get('key');
if (k && k.trim()) {
k = k.trim();
if ($('key')) $('key').value = k;
try { localStorage.setItem(KEY_STORAGE, k); } catch (_) {}
}
} catch (_) {}
})();
function getKey() {
const k = ($('key') && $('key').value ? $('key').value.trim() : '') || (typeof localStorage !== 'undefined' ? (localStorage.getItem(KEY_STORAGE) || '').trim() : '');
if (!k) { alert('请先登录'); return null; }