Files
x-server-mobile/frontend/index.html
T

57 lines
1.9 KiB
HTML
Raw Normal View History

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>frontend</title>
2026-02-27 21:47:34 +08:00
<!-- 飞书扫码登录 SDK -->
2026-02-26 11:19:46 +08:00
<script src="https://lf-package-cn.feishucdn.com/obj/feishu-static/lark/passport/qrcode/LarkSSOSDKWebQRCode-1.0.3.js"></script>
2026-02-27 22:34:03 +08:00
<!-- 飞书 H5 JSBridge SDK(多 CDN 备用) -->
<script>
// 尝试加载飞书 JSBridge,如果失败则尝试其他 CDN
var scripts = [
'https://lf1-cdn-tos.bytegoofy.com/goofy/lark/passport/h5-jsbridge-1.0.3.js',
'https://lf9-cn.feishucdn.com/obj/lark/passport/h5-jsbridge-1.0.3.js'
];
function loadScript(url) {
return new Promise(function(resolve, reject) {
var script = document.createElement('script');
script.src = url;
script.onload = function() { console.log('JSBridge loaded from:', url); resolve(); };
script.onerror = function() { reject(url); };
document.head.appendChild(script);
});
}
// 按顺序尝试加载 JSBridge
function loadJSBridge() {
var index = 0;
function tryNext() {
if (index < scripts.length) {
loadScript(scripts[index])
.catch(function() {
console.warn('JSBridge load failed:', scripts[index]);
index++;
tryNext();
});
} else {
console.error('All JSBridge CDNs failed');
}
}
tryNext();
}
// 页面加载后尝试加载 JSBridge
if (navigator.userAgent.includes('Lark') || navigator.userAgent.includes('feishu')) {
loadJSBridge();
}
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>