From abfe3ffe5f6d161f2a6466c8bdbcbc17de1e64b6 Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期四, 05 十一月 2026 17:43:27 +0800
Subject: [PATCH] fix(map): v2.0 补 HOST_TYPE;诊断页延长等待并修正协议
---
public/bmap-test.html | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/public/bmap-test.html b/public/bmap-test.html
index 7d817a7..773d7b9 100644
--- a/public/bmap-test.html
+++ b/public/bmap-test.html
@@ -494,7 +494,10 @@
(function () {
var el = document.getElementById('log9');
function lg(m, c) { var d = document.createElement('div'); d.className = c || ''; d.textContent = m; el.appendChild(d); }
- lg('鍔犺浇 /bmap-sdk2d.js 骞剁洃鍚綉缁滆姹�...');
+ // v2.0 蹇呴渶锛歛pi?v=2.0 浼氳缃� window.HOST_TYPE='2'锛岀洿鎺ョ敤 getscript 鏃惰鑷繁琛ヤ笂
+ window.HOST_TYPE = '2';
+ window.BMAP_PROTOCOL = window.location.protocol.replace(':', '');
+ lg('鍔犺浇 /bmap-sdk2d.js 骞剁洃鍚綉缁滆姹�...锛�226KB锛屽甫瀹芥參鐨勮瘽瑕佺瓑 10 绉掍互涓婏級');
var s = document.createElement('script');
s.src = '/bmap-sdk2d.js';
s.addEventListener('load', function () {
@@ -527,7 +530,7 @@
if (tile.length === 0) {
lg(' 鈿� 娌℃湁浠讳綍鐡︾墖璇锋眰鍙戝嚭 鈫� SDK 鍐呴儴鐡︾墖 URL 鍙兘浠嶆寚鍚戣 IPv6 鎷︽埅鐨勫師濮嬪煙鍚�', 'bad');
}
- }, 5000);
+ }, 15000);
});
document.body.appendChild(s);
})();
--
Gitblit v1.9.3