加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.html 2.97 KB
一键复制 编辑 原始数据 按行查看 历史
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- <link rel="icon" href="/favicon.ico" /> -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- 内联脚本加载配置文件并动态添加资源 -->
<link rel="stylesheet" href="/static/minemap.css" />
<link rel="stylesheet" href="/static/minemap-edit.css" />
<script src="/static/echarts.5.5.0.min.js"></script>
<script src="/static/minemap.js"></script>
<script src="/static/minemap-util.js"></script>
<script src="/static/template.js"></script>
<script src="/static/lbs-minemap-service.js"></script>
<script src="/static/turf.min.js"></script>
<script src="/static/minemap-edit.js"></script>
<script src="/static/map.config.js"></script>
<script src="/static/EasyWasmPlayer.js"></script>
<script>
function loadScriptsSequentially(scriptUrls, index) {
index = index || 0;
if (index < scriptUrls.length) {
var script = document.createElement('script');
script.src = scriptUrls[index];
script.type = 'text/javascript';
script.onload = function() {
// 当前脚本加载完成后,递归加载下一个脚本
loadScriptsSequentially(scriptUrls, index + 1);
};
document.head.appendChild(script);
}
}
var xhr = new XMLHttpRequest();
xhr.open('GET', '/mineMap.json', true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
var config = JSON.parse(xhr.responseText);
// if (config.assets && config.assets.jsUrls) {
// loadScriptsSequentially(config.assets.jsUrls);
// }
// if (config.assets && config.assets.cssUrls) {
// config.assets.cssUrls.forEach(function(url) {
// var cssLink = document.createElement('link');
// cssLink.rel = 'stylesheet';
// cssLink.href = url;
// document.head.appendChild(cssLink);
// })
// }
// 把配置保存为全局参数
window.mapConfig = config;
}
};
xhr.send();
var xhrAppConfig = new XMLHttpRequest();
xhrAppConfig.open('GET', '/appConfig.json', true);
xhrAppConfig.onreadystatechange = function() {
if (xhrAppConfig.readyState === 4 && xhrAppConfig.status === 200) {
var configApp = JSON.parse(xhrAppConfig.responseText);
// 保存为全局参数
window.appConfig = configApp;
}
};
xhrAppConfig.send();
</script>
<title></title>
</head>
<body>
<noscript>
<strong>We're sorry but yh-dashboard-starter doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化