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