From dba4d4180d6d504238560b1b6e0926c28a05d2aa Mon Sep 17 00:00:00 2001 From: devil_gong Date: Fri, 22 Nov 2019 14:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E5=8D=95=E8=87=AA=E6=8F=90=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=9F=A5=E7=9C=8B=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/view/default/buy/index.html | 12 +++++++ public/static/index/default/css/buy.css | 32 +++++++++++++++++++ public/static/index/default/js/buy.js | 21 +++++++++++- 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/application/index/view/default/buy/index.html b/application/index/view/default/buy/index.html index 387594b22..f8e08824e 100755 --- a/application/index/view/default/buy/index.html +++ b/application/index/view/default/buy/index.html @@ -171,6 +171,7 @@ {{$address.city_name}} {{$address.county_name}} {{$address.address}} + 查看地图

{{if !isset($params['address_id']) or $params['address_id'] neq $key}} @@ -178,6 +179,14 @@ {{/foreach}} + +
+
+ 地图位置 + +
+
+
@@ -474,6 +483,9 @@ {{/foreach}} {{/if}} + + + {{include file="public/footer" /}} diff --git a/public/static/index/default/css/buy.css b/public/static/index/default/css/buy.css index 0932446a0..059933dda 100755 --- a/public/static/index/default/css/buy.css +++ b/public/static/index/default/css/buy.css @@ -248,3 +248,35 @@ strong.total-price-content { color: #d2364c; font-size: 16px; } top: 15px; right: 5px; } +/** + * 自提地址-弹层-查看地图 + */ +.extraction-address-map-container { + position: fixed; + top: 0; + left: 0; + background: rgba(0, 0, 0, 0.3); + z-index: 1001; + padding: 10%; + width: 100%; + height: 100%; + display: none; +} +.extraction-address-map-container .map-title { + font-weight: bold; + font-size: 16px; + color: #333; +} +.extraction-address-map-container .map-inner { + height: 43px; + line-height: 43px; + background: #fff; + border-bottom: 1px solid #dedede; +} +.extraction-address-map-container .map-inner .am-close { + margin: 9px 9px 0 0; +} +#map { + width: 100%; + height: calc(100% - 43px); +} diff --git a/public/static/index/default/js/buy.js b/public/static/index/default/js/buy.js index 278897348..84f752f99 100755 --- a/public/static/index/default/js/buy.js +++ b/public/static/index/default/js/buy.js @@ -133,5 +133,24 @@ $(function() $extraction_popup.modal(); } }); - + + // 自提点地址 - 查看地图/关闭地图 + var $extraction_map_container = $('.extraction-address-map-container'); + $extraction_popup.find('.extraction-address-map-submit').on('click', function() + { + var lng = $(this).data('lng') || null; + var lat = $(this).data('lat') || null; + if(lng == null || lat == null) + { + Prompt('坐标有误'); + return false; + } + + $extraction_map_container.show(); + MapInit(lng, lat, null, null, false); + }); + $extraction_map_container.find('.map-inner .am-close').on('click', function() + { + $('.extraction-address-map-container').hide(); + }); }); \ No newline at end of file