init
This commit is contained in:
63
ruoyi-ui/public/baidu/anchor.html
Normal file
63
ruoyi-ui/public/baidu/anchor.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
// 这里一定要配置ak 否则无法使用
|
||||
window.BMAP_AUTHENTIC_KEY = "t6k6UC2IZR40Un8kkqM4RXlaQb4FulyM"
|
||||
</script>
|
||||
<script>
|
||||
const result = new URLSearchParams(window.location.search)
|
||||
const params = {}
|
||||
for (const [key, value] of result) {
|
||||
params[key] = value
|
||||
}
|
||||
if(params.NODE_ENV === 'production'){
|
||||
document.write('<link rel="stylesheet" type="text/css" href="./script/bmap.pro.css" />')
|
||||
document.write('<script type="text/javascript" src="./script/getscript.pro.js?type=webgl&v=1.0&services=&t=20230529114224"><\/script>')
|
||||
}else if(params.NODE_ENV === 'pre'){
|
||||
document.write('<link rel="stylesheet" type="text/css" href="./script/bmap.pre.css" />')
|
||||
document.write('<script type="text/javascript" src="./script/getscript.pre.js?type=webgl&v=1.0&services=&t=20230529114224"><\/script>')
|
||||
}else{
|
||||
document.write('<link rel="stylesheet" type="text/css" href="./script/bmap.css" />')
|
||||
document.write('<script type="text/javascript" src="./script/getscript.js?type=webgl&v=1.0&services=&t=20230529114224"><\/script>')
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container"></div>
|
||||
<script>
|
||||
|
||||
var map = new BMapGL.Map('container', {
|
||||
backgroundColor: [192, 214, 213, 100]
|
||||
});
|
||||
|
||||
function addMarker(x, y) {
|
||||
window.parent['mapProps']('MAP_LOADING');
|
||||
map.clearOverlays();
|
||||
var point = new BMapGL.Point(x, y);
|
||||
var marker = new BMapGL.Marker(point);
|
||||
map.centerAndZoom(point, 18);
|
||||
map.addOverlay(marker);
|
||||
window.parent['mapProps']('MAP_LOADING_FINISH');
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user