添加高德地图密钥
This commit is contained in:
parent
e9e25ad53d
commit
9fa14af042
33
index.html
33
index.html
@ -1,16 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<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>
|
||||
</head>
|
||||
<title><%- title %></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
<div id="app">
|
||||
<style>
|
||||
html,
|
||||
@ -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>
|
||||
@ -135,7 +137,7 @@
|
||||
// 禁用鼠标滚动事件
|
||||
document.addEventListener(
|
||||
"keydown",
|
||||
function(event) {
|
||||
function (event) {
|
||||
if (
|
||||
(event.ctrlKey === true || event.metaKey === true) &&
|
||||
(event.which === 61 ||
|
||||
@ -153,11 +155,12 @@
|
||||
// Chrome IE 360
|
||||
window.addEventListener(
|
||||
"mousewheel",
|
||||
function(event) {
|
||||
function (event) {
|
||||
if (event.ctrlKey === true || event.metaKey) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
passive: false
|
||||
}
|
||||
);
|
||||
@ -165,15 +168,15 @@
|
||||
//firefox
|
||||
window.addEventListener(
|
||||
"DOMMouseScroll",
|
||||
function(event) {
|
||||
function (event) {
|
||||
if (event.ctrlKey === true || event.metaKey) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
passive: false
|
||||
}
|
||||
);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user