Files
supplier-dispatch-h5/node_modules/.cache/babel-loader/95bec4a233d9cac52df1e44f736bc453d70c87e29c9b4c82f3dc87d2e3ba8507.json
2023-08-11 10:45:20 +08:00

1 line
6.4 KiB
JSON
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.

{"ast":null,"code":"export default {\n name: \"addressMap\",\n data() {\n return {\n map: '',\n mapPosition: 60,\n source: ''\n };\n },\n created() {\n this.source = this.$route.query.source || '';\n console.log('this.source', this.source);\n },\n mounted() {\n this.initMap();\n },\n methods: {\n initMap() {\n let orderInfo = this.$store.getters.order.orderInfo;\n console.log('orderInfo', orderInfo);\n this.map = new AMap.Map('mapId', {\n viewMode: '2D',\n // 默认使用 2D 模式\n zoom: 11,\n //初始化地图层级\n center: [orderInfo.startLng, orderInfo.startLat] //初始化地图中心点\n });\n },\n\n searchHandler() {\n AMap.plugin('AMap.AutoComplete', function () {\n var autoOptions = {\n //city 限定城市,默认全国\n city: '全国'\n };\n // 实例化AutoComplete\n var autoComplete = new AMap.AutoComplete(autoOptions);\n // 根据关键字进行搜索\n autoComplete.search(keyword, function (status, result) {\n // 搜索成功时result即是对应的匹配数据\n console.log(result);\n });\n });\n }\n }\n};","map":{"version":3,"names":["name","data","map","mapPosition","source","created","$route","query","console","log","mounted","initMap","methods","orderInfo","$store","getters","order","AMap","Map","viewMode","zoom","center","startLng","startLat","searchHandler","plugin","autoOptions","city","autoComplete","AutoComplete","search","keyword","status","result"],"sources":["src/views/index/addressMap.vue"],"sourcesContent":["<template>\r\n <div>\r\n <div class=\"map_wrap\" id=\"mapId\" :style=\"{ bottom: mapPosition + '%' }\">\r\n </div>\r\n <div class=\"button_wrap\">\r\n <div class=\"cancel_btn\">取消</div>\r\n <div class=\"confirm_btn\">完成</div>\r\n </div>\r\n <div class=\"search_wrap\" :style=\"{ height: mapPosition + '%' }\">\r\n <div class=\"section\">\r\n <input type=\"text\" placeholder=\"请输入地址\" />\r\n </div>\r\n <div class=\"server_list\">\r\n <div class=\"text_box\" v-for=\"item in 10\">\r\n <div class=\"address_name\">上上谦(南京东路步行街店)</div>\r\n <div class=\"address_detail\">上海市黄浦区 南京东路300号恒基名人购物中心5楼</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: \"addressMap\",\r\n data() {\r\n return {\r\n map: '',\r\n mapPosition: 60,\r\n source: ''\r\n }\r\n },\r\n created() {\r\n this.source = this.$route.query.source || ''\r\n console.log('this.source', this.source)\r\n },\r\n mounted() {\r\n this.initMap()\r\n },\r\n methods: {\r\n initMap() {\r\n let orderInfo = this.$store.getters.order.orderInfo\r\n console.log('orderInfo', orderInfo)\r\n this.map = new AMap.Map('mapId', {\r\n viewMode: '2D', // 默认使用 2D 模式\r\n zoom:11, //初始化地图层级\r\n center: [orderInfo.startLng, orderInfo.startLat] //初始化地图中心点\r\n })\r\n },\r\n searchHandler() {\r\n AMap.plugin('AMap.AutoComplete', function(){\r\n var autoOptions = {\r\n //city 限定城市,默认全国\r\n city: '全国'\r\n };\r\n // 实例化AutoComplete\r\n var autoComplete= new AMap.AutoComplete(autoOptions);\r\n // 根据关键字进行搜索\r\n autoComplete.search(keyword, function(status, result) {\r\n // 搜索成功时result即是对应的匹配数据\r\n console.log(result);\r\n })\r\n })\r\n }\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped lang=\"less\">\r\n .map_wrap {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n z-index: -1;\r\n }\r\n .button_wrap {\r\n width: 100%;\r\n padding: 5px;\r\n box-sizing: border-box;\r\n zoom: 1;\r\n .cancel_btn {\r\n width: 50px;\r\n height: 27px;\r\n background: #F37877;\r\n font-size: 12px;\r\n text-align: center;\r\n line-height: 27px;\r\n color: #fff;\r\n border-radius: 3px;\r\n float: left;\r\n }\r\n .confirm_btn {\r\n width: 50px;\r\n height: 27px;\r\n background: rgba(5,193,98,1);\r\n font-size: 12px;\r\n text-align: center;\r\n line-height: 27px;\r\n color: #fff;\r\n border-radius: 3px;\r\n float: right;\r\n }\r\n }\r\n .search_wrap {\r\n background-color: #fff;\r\n position: absolute;\r\n width: 100%;\r\n bottom: 0;\r\n left: 0;\r\n overflow: auto;\r\n .section {\r\n height: 35px;\r\n width: 100%;\r\n background-color: #fff;\r\n position: fixed;\r\n /*top: calc(50% - 10px);*/\r\n padding-top: 10px;\r\n input {\r\n width: 90%;\r\n margin: 0 auto;\r\n display: block;\r\n border: none;\r\n height: 30px;\r\n border-radius: 3px;\r\n padding: 0 10px;\r\n background: #e2e0e0;\r\n font-size: 14px;\r\n }\r\n }\r\n .server_list {\r\n overflow-y: auto;\r\n padding-top: 30px;\r\n .text_box {\r\n margin: 10px 25px;\r\n padding-top: 10px;\r\n .address_name {\r\n font-size: 14px !important;\r\n color: rgba(0,0,0,0.8);\r\n }\r\n .address_detail {\r\n margin-top: 3px;\r\n color: #c3c3c3 !important;\r\n font-size: 12px !important;\r\n }\r\n }\r\n }\r\n }\r\n</style>\r\n"],"mappings":"AAuBA;EACAA,IAAA;EACAC,KAAA;IACA;MACAC,GAAA;MACAC,WAAA;MACAC,MAAA;IACA;EACA;EACAC,QAAA;IACA,KAAAD,MAAA,QAAAE,MAAA,CAAAC,KAAA,CAAAH,MAAA;IACAI,OAAA,CAAAC,GAAA,qBAAAL,MAAA;EACA;EACAM,QAAA;IACA,KAAAC,OAAA;EACA;EACAC,OAAA;IACAD,QAAA;MACA,IAAAE,SAAA,QAAAC,MAAA,CAAAC,OAAA,CAAAC,KAAA,CAAAH,SAAA;MACAL,OAAA,CAAAC,GAAA,cAAAI,SAAA;MACA,KAAAX,GAAA,OAAAe,IAAA,CAAAC,GAAA;QACAC,QAAA;QAAA;QACAC,IAAA;QAAA;QACAC,MAAA,GAAAR,SAAA,CAAAS,QAAA,EAAAT,SAAA,CAAAU,QAAA;MACA;IACA;;IACAC,cAAA;MACAP,IAAA,CAAAQ,MAAA;QACA,IAAAC,WAAA;UACA;UACAC,IAAA;QACA;QACA;QACA,IAAAC,YAAA,OAAAX,IAAA,CAAAY,YAAA,CAAAH,WAAA;QACA;QACAE,YAAA,CAAAE,MAAA,CAAAC,OAAA,YAAAC,MAAA,EAAAC,MAAA;UACA;UACAzB,OAAA,CAAAC,GAAA,CAAAwB,MAAA;QACA;MACA;IACA;EACA;AACA"},"metadata":{},"sourceType":"module","externalDependencies":[]}