添加高德地图密钥

This commit is contained in:
jiayu 2025-02-26 15:57:09 +08:00
parent e9e25ad53d
commit 9fa14af042

View File

@ -1,13 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>
<%- title %>
</title>
<title><%- title %></title>
</head>
<body>
@ -115,9 +112,14 @@
dot.forEach(item => (item.style.background = color));
if (isDark) html.style.background = "#141414";
}
// 高德地图自2021年12月02日升级升级之后所申请的 key 必须配备安全密钥 jscode 一起使用
window._AMapSecurityConfig = { securityJsCode: "7375e94447ea4d636b3d12d639ba21ec" };
</script>
<script type="module" src="/src/main.ts"></script>
<script src="https://webapi.amap.com/maps?v=2.0&key=1eb65a4a1e436b5314d23b773cd4e658&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.MouseTool,AMap.Geocoder,AMap.Driving" defer="defer"></script>
<script
src="https://webapi.amap.com/maps?v=2.0&key=1eb65a4a1e436b5314d23b773cd4e658&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.MouseTool,AMap.Geocoder,AMap.Driving"
defer="defer"
></script>
<script src="/jquery-1.12.4.min.js"></script>
<!-- 用于前端与插件交互 -->
<script src="/jsencrypt.min.js"></script>
@ -157,7 +159,8 @@
if (event.ctrlKey === true || event.metaKey) {
event.preventDefault();
}
}, {
},
{
passive: false
}
);
@ -169,11 +172,11 @@
if (event.ctrlKey === true || event.metaKey) {
event.preventDefault();
}
}, {
},
{
passive: false
}
);
</script>
</body>
</html>