Files
g.hnyhua.cn/Mtxfw.VipSite/mobile/bzmap.html
2026-02-07 15:48:27 +08:00

371 lines
13 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>在线支付</title>
<link rel="stylesheet" type="text/css" href="/css/api.css" />
<link rel="stylesheet" type="text/css" href="/css/content.css" />
<script type="text/javascript" src="/scripts/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="/script/main.js?t=0"></script>
<script type="text/javascript" src="/layer/layer.js"></script>
<script type="text/javascript" src="/Scripts/long.js"></script>
<script type="text/javascript" src="/script/moment.js"></script>
<script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: 'e6f03bbeeef0f9e993f83e11b2770733',
}
</script>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=7f3003c477e8cd4851d4552c7dce9059&plugin=AMap.Autocomplete,AMap.PlaceSearch"></script>
<script type="text/javascript" src="http://webapi.amap.com/ui/1.0/main.js"></script>
<script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
<style type="text/css">
html, body {
overflow: hidden;
}
#wrapper {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.pullDown {
position: absolute;
top: -1.25rem;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
display: none;
}
.pullUp {
position: absolute;
bottom: -1.25rem;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
display: none;
}
.pullDown.loading, .pullUp.loading, .pullDown.refresh, .pullUp.refresh {
display: block;
}
.mapbox {
width: 100%;
height: 100%;
margin: 0 auto;
}
.mapbox .mapbtn {
width: 200px;
margin: 10px auto;
}
.mapbox .mapbtn #keyword {
position: relative;
display: inline-block;
width: 200px;
height: 31px;
text-align: center;
line-height: 31px;
border: 1px solid #10780a;
background-color: #fff;
text-indent: 0px;
-webkit-border-radius: 3px 0px 0px 3px;
-moz-border-radius: 3px 0px 0px 3px;
border-radius: 3px 0px 0px 3px;
color: #000;
font-size: 16px;
font-weight: bold;
overflow: hidden;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.mapbox .mapbtn .abtn {
position: relative;
display: inline-block;
width: 200px;
height: 32px;
text-align: center;
line-height: 32px;
border: 1px solid #10780a;
background-color: #13b60b;
text-indent: 0px;
-webkit-border-radius: 0px 3px 3px 0px;
-moz-border-radius: 0px 3px 3px 0px;
border-radius: 0px 3px 3px 0px;
color: #fff;
font-size: 16px;
font-weight: bold;
cursor: pointer;
overflow: hidden;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.mapbox .mapbtn .abtn#qybtn {
margin-left: 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.mapbox .mapcontainer {
width: 100%;
height: 400px;
}
#myPageTop {
position: absolute;
top: 5px;
right: 10px;
background: #fff none repeat scroll 0 0;
border: 1px solid #ccc;
margin: 10px auto;
padding: 6px;
font-family: "Microsoft Yahei", "微软雅黑", "Pinghei";
font-size: 14px;
}
#myPageTop label {
margin: 0 20px 0 0;
color: #666666;
font-weight: normal;
}
#myPageTop input {
width: 170px;
border: 1px solid #10780a;
background-color: #fff;
text-indent: 0px;
-webkit-border-radius: 3px 0px 0px 3px;
-moz-border-radius: 3px 0px 0px 3px;
border-radius: 3px 0px 0px 3px;
}
#myPageTop .column2 {
padding-left: 25px;
}
.map_name {
display: block;
background: rgba(0,0,0, 0.5);
width: 6em;
padding: 0.4em;
border-radius: 0.5em;
text-align: center;
color: #fff;
}
</style>
<script type="text/javascript">
var userId = null;
var LoginId = null;
var opentimes = null;
var t = 0;
var xcoo = "", ycoo = "", cityid = "", key = "";
var map = null;
var myScroll = null;
var pullDown = 1; // 下拉刷新避免多次执行
var pullUp = 1; // 上拉加载避免多次执行
var downHeight = 0;
var upHeight = 0;
var isload = true;//设置是否终止滚动加载
var curScrollHeight = 0;//当前滚动位置
var curCount = 1;//计数器,防止滚动时重复执行加载下一页
$(document).ready(function () {
userId = getlocalStorage("userId");
LoginId = getlocalStorage("LoginId");
var tt = $.getUrlParam("t");
if (tt != null) {
t = tt;
}
xcoo = $.getUrlParam("xcoo");
ycoo = $.getUrlParam("ycoo");
key = $.getUrlParam("key");
$(".mapbtn").addClass("uhide");
$("#myPageTop").addClass("uhide");
$(".mapbox .mapcontainer").css("height", ($("#wrapper").height()) + "px");
if (t == 0) {
$(".mapbtn").removeClass("uhide");
$("#myPageTop").removeClass("uhide");
if ((xcoo == "" && ycoo == "") || (xcoo == "0.0000" && ycoo == "0.0000")) {
$("#tipinput").val(key);
cityid = $.getUrlParam("cityid");
}
$(".mapbox .mapcontainer").css("height", ($("#wrapper").height() - 62) + "px");
}
rdata();
});
function rdata() {
$(".ajaxLoader").removeClass("uhide");
AMapUI.loadUI(['misc/PositionPicker'], function (PositionPicker) {
if (t == 0) {
map = new AMap.Map('container', {
zoom: 15,
resizeEnable: true
});
var positionPicker = new PositionPicker({
mode: 'dragMarker',
zoom: 6,
map: map,
iconStyle: { //自定义外观
url: '/images/position-picker2.png',
ancher: [24, 40],
size: [58, 58]
}
});
positionPicker.on('success', function (positionResult) {
var pos = positionResult.position.toString().split(",");
xcoo = pos[0];
ycoo = pos[1];
});
positionPicker.on('fail', function (positionResult) {
});
if (cityid != "") {
map.setCity(cityid);
}
if (xcoo != "" && ycoo != "") {
var pos = new Array(2);
pos[0] = xcoo;
pos[1] = ycoo;
positionPicker.start(pos);
} else {
positionPicker.start();
}
//输入提示
var autoOptions = {
input: "tipinput"
};
var auto = new AMap.Autocomplete(autoOptions);
var placeSearch = new AMap.PlaceSearch({
map: map
}); //构造地点查询类
AMap.event.addListener(auto, "select", select); //注册监听,当选中某条记录时会触发
function select(e) {
placeSearch.setCity(e.poi.adcode);
placeSearch.search(e.poi.name); //关键字查询查询
}
map.on('click', function (e) {
var pos = new Array(2);
pos[0] = e.lnglat.getLng();
pos[1] = e.lnglat.getLat();
positionPicker.start(pos);
xcoo = pos[0];
ycoo = pos[1];
});
} else {
map = new AMap.Map('container', {
zoom: 15,
center: [xcoo, ycoo],
resizeEnable: true
});
try {
var marker = new AMap.Marker({
icon: '/images/position-picker2.png',
position: [xcoo, ycoo], //点标记在地图上显示的位置,默认为地图中心点
offset: new AMap.Pixel(-10, -34),//位置偏移量默认值为Pixel(-10-34),(0,0)时marker左上角对准position的位置
title: key, //鼠标滑过标记时的文字提示,不设置则鼠标滑过时没有文字提示
//content:name+"["+address+"]",
map: map //要显示该Marker的地图对象
});
var content = "<div class=\"map_name\">" + key + "</div>";
marker = new AMap.Marker({
position: [xcoo, ycoo], //点标记在地图上显示的位置,默认为地图中心点
offset: new AMap.Pixel(-35, -62),//位置偏移量默认值为Pixel(-10-34),(0,0)时marker左上角对准position的位置
content: content,
map: map //要显示该Marker的地图对象
});
} catch (err) {
alert(err);
}
}
$(".ajaxLoader").addClass("uhide");
});
}
function qybz() {
setlocalStorage("bzmap_position", xcoo + "|" + ycoo);
parent.layer.closeAll();
}
</script>
</head>
<body class="wrap">
<header>
<div class="ub">
<div class="nav-btn" id="nav-left" style=" margin:0; padding:0; padding-top:0.2em; min-width:3em" onclick="parent.layer.closeAll();">
<img src="../image/faifei.png" style="margin-left:0; margin-top:0em; height:1.2em;width:1.2em;" />
</div>
<h1 class="ub-f1">
</h1>
<div class="nav-btn blue" id="nav-right" style=" margin:0; padding:0; min-width:3em; padding-right:1em;">
</div>
</div>
</header>
<section class="ub-f1" id="wrapper">
<div id="wrapper_content">
<div class="mapbox">
<div class="mapcontainer" id="container"></div>
<div class="mapbtn uhide"><input type="button" id="startbtn" onclick="qybz()" class="abtn" value="标注好了,关闭" /></div>
</div>
<div id="myPageTop" class="uhide">
<table>
<tr>
<td>
<label>请输入关键字:</label>
</td>
</tr>
<tr>
<td>
<input id="tipinput" />
</td>
</tr>
<tr>
<td>
<label>单击地图位置标注</label>
</td>
</tr>
</table>
</div>
</div>
</section>
<div class="ajaxLoader ub ub-ac uhide" onclick="reload()">
<div class="ub ub-ac ub-ver"><img src="image/load.gif" /><br>正在加载...</div>
</div>
</body>
</html>