1 |
- {"version":3,"sources":["webpack:///D:/kongwenhao/HQT-PRO/hlm_pl_mall_h5/pages/MapSelect.vue?6d44","webpack:///D:/kongwenhao/HQT-PRO/hlm_pl_mall_h5/pages/MapSelect.vue?4377","webpack:///D:/kongwenhao/HQT-PRO/hlm_pl_mall_h5/pages/MapSelect.vue?a93b","webpack:///D:/kongwenhao/HQT-PRO/hlm_pl_mall_h5/pages/MapSelect.vue?cbc2","uni-app:///pages/MapSelect.vue","webpack:///D:/kongwenhao/HQT-PRO/hlm_pl_mall_h5/pages/MapSelect.vue?9165","webpack:///D:/kongwenhao/HQT-PRO/hlm_pl_mall_h5/pages/MapSelect.vue?67ca"],"names":["name","data","keyword","address_list","bmap","myMarker","cityCode","style","props","longitude","latitude","ifShowCurrent","type","default","watch","computed","member_point","mounted","created","methods","memberPoint","getPosition","uni","title","_this","icon","getAddressByPoint","point","lng","lat","address","creatMap","searchAddress","setPosition"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkI;AAClI;AAC6D;AACL;AACsC;;;AAG9F;AAC0L;AAC1L,gBAAgB,uMAAU;AAC1B,EAAE,+EAAM;AACR,EAAE,gGAAM;AACR,EAAE,yGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,oGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAytB,CAAgB,qvBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;ACsB7uB;AACA;AAAA;AAAA;AAAA,eACA;EACAA;EACAC;IACA;MACAC;MACAC;MACA;MACAC;MACAC;MACAC;MACAC;IACA;EACA;EACAC;IACAC;IACAC;IACAC;MACAC;MACAC;IACA;EACA;EACAC;IACAL;MACA;QACA;MACA;IACA;EACA;EACAM,4BACA;IACAC;MAAA;IAAA;EACA,GACA;EACAC,6BACA;EACAC;IACA;MACA;IACA;EACA;EACAC,yCACA;IACAC;EACA;IACAC;MACA;MACAC;QAAAC;MAAA;MACA;QACAD;QACA;UACAE;QACA;UACAF;YAAAG;YAAAF;UAAA;QACA;MACA;IACA;IACAG;MAAA;MACA;QACA;QACA;UAAAC;YAAAC;YAAAC;YAAAC;YAAAxB;UAAA;QAAA;MACA;QACAgB;UAAAG;UAAAF;QAAA;MACA;IACA;IACAQ;MAAA;MACA;MACA;MACA;QACA;QACA;MACA;QACAT;UAAAG;UAAAF;QAAA;MACA;MACA;MACA;MACA;MACA;MACA;IACA;IACAS;MAAA;MACA;QACA;QACA;MACA;QACAV;UAAAG;UAAAF;QAAA;MACA;IACA;IACAU;MACA;IACA;EAAA;AAEA;AAAA,2B;;;;;;;;;;;;;ACnHA;AAAA;AAAA;AAAA;AAAw3C,CAAgB,o2CAAG,EAAC,C;;;;;;;;;;;ACA54C;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/MapSelect.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./MapSelect.vue?vue&type=template&id=7956592f&scoped=true&\"\nvar renderjs\nimport script from \"./MapSelect.vue?vue&type=script&lang=js&\"\nexport * from \"./MapSelect.vue?vue&type=script&lang=js&\"\nimport style0 from \"./MapSelect.vue?vue&type=style&index=0&id=7956592f&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7956592f\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/MapSelect.vue\"\nexport default component.exports","export * from \"-!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./MapSelect.vue?vue&type=template&id=7956592f&scoped=true&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./MapSelect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./MapSelect.vue?vue&type=script&lang=js&\"","<template>\r\n <view class=\"div common-map-select\">\r\n <view class=\"div search-wrap\"><text class=\"i iconfont\" @click=\"searchAddress\"></text><input type=\"text\" v-model=\"keyword\"><view @click=\"searchAddress\" class=\"div btn\">搜索</view></view>\r\n <view class=\"div result-list\" >\r\n <view class=\"div\" :class=\"{'current':style}\" v-if=\"member_point && style && ifShowCurrent\">\r\n <text class=\"span notice\">当前地址<text class=\"span reset\" @click=\"getPosition\"><text class=\"i iconfont\"></text>重新定位</text></text>\r\n <view class=\"div\">\r\n <view class=\"div result-item\" style=\"border-bottom:0\" @click=\"setPosition(member_point.lat,member_point.lng,member_point.address)\">{{member_point.address}}</view>\r\n </view>\r\n </view>\r\n <view class=\"div\" :class=\"{'nearby':style}\">\r\n <text class=\"span notice\">附近地址</text>\r\n <view class=\"div\" v-for=\"(item,index) in address_list\" :key=\"index\">\r\n <view class=\"div result-item\" v-if=\"item.location\" @click=\"setPosition(item.location.lat,item.location.lng,item.name)\">{{item.name}}</view>\r\n </view>\r\n </view>\r\n\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport { getAddressByKeyword, getAddressByPoint, getPointNearby, getPosition } from '../util/bmap'\r\nimport { mapState, mapMutations } from 'vuex'\r\nexport default {\r\n name: 'MapSelect',\r\n data () {\r\n return {\r\n keyword: '',\r\n address_list: [],\r\n // wrapperHeight: 0,\r\n bmap: false,\r\n myMarker: false,\r\n cityCode: 0,\r\n style: false\r\n }\r\n },\r\n props: {\r\n longitude: {},\r\n latitude: {},\r\n ifShowCurrent:{\r\n type:Boolean,\r\n default:false\r\n },\r\n },\r\n watch: {\r\n longitude: function (newLongitude, oldLongitude) {\r\n if (newLongitude) {\r\n this.creatMap()\r\n }\r\n }\r\n },\r\n computed: {\r\n ...mapState({\r\n member_point: state => state.member.point\r\n })\r\n },\r\n mounted () {\r\n },\r\n created () {\r\n if (this.longitude) {\r\n this.creatMap()\r\n }\r\n },\r\n methods: {\r\n ...mapMutations({\r\n memberPoint: 'memberPoint'\r\n }),\r\n getPosition () {\r\n let _this = this\r\n uni.showLoading({ title: '加载中' })\r\n getPosition(function (res) {\r\n uni.hideLoading()\r\n if (res.code === 10000) {\r\n _this.getAddressByPoint(res.result.lat, res.result.lng)\r\n } else {\r\n uni.showToast({icon:'none',title: res.message})\r\n }\r\n }, true)\r\n },\r\n getAddressByPoint (lat, lng) {\r\n getAddressByPoint(lat + ',' + lng).then(res => {\r\n this.cityCode = res.result.cityCode\r\n this.memberPoint({ point: { lng: lng, lat: lat, address: res.result.sematic_description, cityCode: res.result.cityCode } })\r\n }).catch(function (error) {\r\n uni.showToast({icon:'none',title: error.message})\r\n })\r\n },\r\n creatMap () {\r\n this.getAddressByPoint(this.latitude, this.longitude)\r\n // 附近地址\r\n getPointNearby(this.latitude + ',' + this.longitude).then(res => {\r\n this.address_list = res.results\r\n this.style = true\r\n }).catch(function (error) {\r\n uni.showToast({icon:'none',title: error.message})\r\n })\r\n // let point = new BMap.Point(this.longitude, this.latitude)\r\n // 创建点坐标\r\n // this.bmap.centerAndZoom(point, 16)\r\n // this.myMarker = new BMap.Marker(point)\r\n // this.bmap.addOverlay(this.myMarker)\r\n },\r\n searchAddress () {\r\n getAddressByKeyword(this.keyword, this.cityCode).then(res => {\r\n this.address_list = res.result\r\n this.style = false\r\n }).catch(function (error) {\r\n uni.showToast({icon:'none',title: error.message})\r\n })\r\n },\r\n setPosition (lat, lng, name) {\r\n this.$emit('setPosition', lat, lng, name, this.cityCode)\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n .common-map-select{background: #fff;position: absolute;width:100%;height:100%;\r\n .search-wrap{height: 2rem;line-height: 2rem;position: relative;position: absolute;left:.5rem;top:$pageSpace;right:$pageSpace;background: #F5F5F5;display: flex;border-radius:.4rem;overflow: hidden;\r\n input{width: 100%;height: 2rem;line-height: 2rem;font-size:$h2;display: block;background: none;border: 0;flex:1}\r\n .i{font-size:$h1;line-height: 2rem;display: block;width:2rem;text-align: center}\r\n .btn{background: $primaryColor;color:#fff;font-size:$subFontSize;padding:0 .5rem;}\r\n }\r\n .result-list{overflow-y:auto;position: absolute;top:3rem;bottom:0rem;width:100%;\r\n .notice{display: none;padding:1rem $pageSpace 0 $pageSpace;font-size:$subFontSize;color:#aeaeae;line-height: 1.5}\r\n .reset{float: right;color:$primaryColor}\r\n .current .notice,.nearby .notice{display: block}\r\n .current{box-shadow: 0px 4px 4px #f7f7f7;}\r\n .result-item{padding:.7rem 0;font-size:$h2;color:#333;border-bottom: 1px dashed #eee;margin:0 $pageSpace;}\r\n }\r\n }\r\n</style>\r\n","import mod from \"-!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./MapSelect.vue?vue&type=style&index=0&id=7956592f&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./MapSelect.vue?vue&type=style&index=0&id=7956592f&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1683857285690\n var cssReload = require(\"D:/kongwenhao/HBuilderX.3.7.11.20230427/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}
|