xlcs/xlcs-user/unpackage/dist/dev/.sourcemap/mp-weixin/pagesLocation/choosePickUpLocation/choosePickUpLocation.js.map
2024-01-07 01:10:08 +08:00

1 line
19 KiB
Plaintext
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.

{"version":3,"sources":["uni-app:///main.js","webpack:////Users/yovinchen/Desktop/project/xlcs/xlcs-user/pagesLocation/choosePickUpLocation/choosePickUpLocation.vue?506b","webpack:////Users/yovinchen/Desktop/project/xlcs/xlcs-user/pagesLocation/choosePickUpLocation/choosePickUpLocation.vue?c754","webpack:////Users/yovinchen/Desktop/project/xlcs/xlcs-user/pagesLocation/choosePickUpLocation/choosePickUpLocation.vue?60d8","webpack:////Users/yovinchen/Desktop/project/xlcs/xlcs-user/pagesLocation/choosePickUpLocation/choosePickUpLocation.vue?72a1","uni-app:///pagesLocation/choosePickUpLocation/choosePickUpLocation.vue","webpack:////Users/yovinchen/Desktop/project/xlcs/xlcs-user/pagesLocation/choosePickUpLocation/choosePickUpLocation.vue?de4f","webpack:////Users/yovinchen/Desktop/project/xlcs/xlcs-user/pagesLocation/choosePickUpLocation/choosePickUpLocation.vue?98fe"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","searchKeyword","filter","page","limit","latitude","longitude","searchResult","content","last","scale","markerId","covers","iconPath","width","height","computed","methods","getSearchLeader","Object","o","result","id","loadMore","mapMarkertap","selectPickUpLocation","leaderId","onReady","mounted","uni","type","success"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,6BAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6I;AAC7I;AACwE;AACL;AACsC;;;AAGzG;AACmN;AACnN,gBAAgB,iNAAU;AAC1B,EAAE,0FAAM;AACR,EAAE,2GAAM;AACR,EAAE,oHAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,+GAAU;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,aAAa,sTAEN;AACP,KAAK;AACL;AACA,aAAa,yNAEN;AACP,KAAK;AACL;AACA,aAAa,oPAEN;AACP,KAAK;AACL;AACA,aAAa,qOAEN;AACP,KAAK;AACL;AACA,aAAa,2OAEN;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC1EA;AAAA;AAAA;AAAA;AAAi2B,CAAgB,kzBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;ACmCr3B;AAAA;AAAA;AAAA,eAEA;EACAC;IACA;MACAC;MACAC;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;MACA;;MACAC;QACAC;QACAC;MACA;MACAC;MAAA;MACAC;MAAA;MACAC,SACA;QACAP;QACAC;QACAO;QACAC;QACAC;MACA;IAEA;EACA;EACAC,0CACA,mEACA,kEACA;EACAC,yCACA;IACAC;MAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBACA;gBACA;kBACAC;kBACAA;gBACA;;gBACA;gBACA;gBAEAC;kBACAhB;kBACAD;kBACAG;kBACAD;gBACA;gBAAA;gBAAA,OAEA;cAAA;gBAAAgB;gBACA;kBAAAb;gBAAA;;gBAEA;gBACA;kBACAI;kBACA;oBACAA;sBACAU;sBACAjB;sBACAC;sBACAO;sBACAC;sBACAC;oBACA;kBACA;;kBAEA;kBACA;kBACA;kBACAV;kBACAC;kBACA;oBAAAD;oBAAAC;kBAAA;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACA;IACAiB;MACA;QACA;QACA;MACA;IACA;IACA;IACAC;MAAA;MACA;IACA;IACA;IACAC;MACA;QAAAC;MAAA;IACA;EAAA,EACA;EACAC;IACA;EACA;EACAC;IAAA;IACAC;MACAC;MACAC;QAAA;UAAA;UAAA;YAAA;cAAA;gBAAA;kBACA;kBACA;;kBAEA;kBACA;kBAAA;kBAAA;kBAAA,OAEA;oBAAA1B;oBAAAC;kBAAA;gBAAA;kBAAAe;kBAAA;kBAAA;gBAAA;kBAAA;kBAAA;kBAEA;gBAAA;kBAGA;gBAAA;gBAAA;kBAAA;cAAA;YAAA;UAAA;QAAA,CACA;QAAA;UAAA;QAAA;QAAA;MAAA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;;ACtJA;AAAA;AAAA;AAAA;AAAomD,CAAgB,y8CAAG,EAAC,C;;;;;;;;;;;ACAxnD;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pagesLocation/choosePickUpLocation/choosePickUpLocation.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesLocation/choosePickUpLocation/choosePickUpLocation.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./choosePickUpLocation.vue?vue&type=template&id=e6e995ca&scoped=true&\"\nvar renderjs\nimport script from \"./choosePickUpLocation.vue?vue&type=script&lang=js&\"\nexport * from \"./choosePickUpLocation.vue?vue&type=script&lang=js&\"\nimport style0 from \"./choosePickUpLocation.vue?vue&type=style&index=0&id=e6e995ca&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../../Applications/HBuilderX.app/Contents/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 \"e6e995ca\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pagesLocation/choosePickUpLocation/choosePickUpLocation.vue\"\nexport default component.exports","export * from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./choosePickUpLocation.vue?vue&type=template&id=e6e995ca&scoped=true&\"","var components\ntry {\n components = {\n PickUpLocationHeader: function () {\n return import(\n /* webpackChunkName: \"components/PickUpLocationHeader/PickUpLocationHeader\" */ \"@/components/PickUpLocationHeader/PickUpLocationHeader.vue\"\n )\n },\n uGap: function () {\n return import(\n /* webpackChunkName: \"node-modules/uview-ui/components/u-gap/u-gap\" */ \"uview-ui/components/u-gap/u-gap.vue\"\n )\n },\n PickUpLocationItem: function () {\n return import(\n /* webpackChunkName: \"components/PickUpLocationItem/PickUpLocationItem\" */ \"@/components/PickUpLocationItem/PickUpLocationItem.vue\"\n )\n },\n uEmpty: function () {\n return import(\n /* webpackChunkName: \"node-modules/uview-ui/components/u-empty/u-empty\" */ \"uview-ui/components/u-empty/u-empty.vue\"\n )\n },\n uButton: function () {\n return import(\n /* webpackChunkName: \"node-modules/uview-ui/components/u-button/u-button\" */ \"uview-ui/components/u-button/u-button.vue\"\n )\n },\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范文档https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var g0 = _vm.searchResult.content.length\n var l0 =\n g0 > 0\n ? _vm.__map(_vm.searchResult.content, function (item, index) {\n var $orig = _vm.__get_orig(item)\n var m0 = _vm.checkIsCurrent(item.id)\n return {\n $orig: $orig,\n m0: m0,\n }\n })\n : null\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0,\n l0: l0,\n },\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./choosePickUpLocation.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./choosePickUpLocation.vue?vue&type=script&lang=js&\"","<template>\n <view class=\"gg u-p-20\">\n <!-- 利用.sync修饰符将searchKeyword传递到子组件 -->\n <PickUpLocationHeader :searchKeyword.sync=\"searchKeyword\" @getSearchLeader=\"getSearchLeader\"/>\n\n <u-gap height=\"20\"/>\n\n <map id=\"pickUpLocationMap\" :latitude=\"latitude\" :longitude=\"longitude\" :markers=\"covers\" :scale=\"scale\"\n class=\"gg-location-map\" show-location @markertap=\"mapMarkertap\"></map>\n\n <view class=\"gg-location\">\n <!-- 利用scroll-into-view进行选中提货点的定位操作 -->\n <scroll-view :scroll-into-view=\"`map-${markerId}`\" class=\"gg-location-scroll\" scroll-with-animation scroll-y\n @scrolltolower=\"loadMore\">\n <block v-if=\"searchResult.content.length > 0\">\n <view v-for=\"(item, index) in searchResult.content\" :id=\"`map-${item.id}`\" :key=\"item.id\" class=\"u-m-b-20\">\n <PickUpLocationItem\n :isCurrent=\"checkIsCurrent(item.id)\"\n :location=\"item\"\n :selected=\"markerId === item.id\"\n @selectPickUpLocation=\"selectPickUpLocation\"\n ></PickUpLocationItem>\n </view>\n </block>\n <u-empty v-else mode=\"list\"></u-empty>\n </scroll-view>\n </view>\n\n <view class=\"gg-confirm-pick-up-location\">\n <u-button type=\"warning\">确认提货点</u-button>\n </view>\n </view>\n</template>\n\n<script>\nimport {mapState, mapGetters, mapMutations, mapActions} from 'vuex';\n\nexport default {\n data() {\n return {\n searchKeyword: '',\n filter: {\n page: 1, // 当前页码\n limit: 5, // 每页记录数\n latitude: '', // 经度\n longitude: '' // 纬度\n },\n searchResult: {\n content: [],\n last: false\n },\n scale: 12, // 缩放尺寸\n markerId: 0, // 当前选中标记\n covers: [\n {\n latitude: 39.909,\n longitude: 116.39742,\n iconPath: '/static/images/location.png',\n width: 30,\n height: 30\n }\n ]\n };\n },\n computed: {\n ...mapState('pickUpLocationModule', ['leaderAddressVo']),\n ...mapGetters('pickUpLocationModule', ['checkIsCurrent'])\n },\n methods: {\n ...mapActions('pickUpLocationModule', ['selectLeaderAddressVoAction']),\n async getSearchLeader(data) {\n // 查询数据\n if (data) {\n Object.assign(this.$data.searchResult, this.$options.data().searchResult); // 这里重置 searchResult 下的所有数据\n Object.assign(this.$data.filter, this.$options.data().filter); // 这里重置 filter 下的所有数据\n }\n this.filter.latitude = data ? data.latitude : this.filter.latitude;\n this.filter.longitude = data ? data.longitude : this.filter.longitude;\n\n const o = {\n limit: this.filter.limit,\n page: this.filter.page,\n longitude: this.filter.longitude,\n latitude: this.filter.latitude\n };\n\n let result = await this.$u.api.getSearchLeader(o);\n this.searchResult = {...result, content: [...this.searchResult.content, ...result.content]};\n\n // marker标记点的设置\n if (this.searchResult.content.length > 0) {\n let covers = [];\n this.searchResult.content.map(item => {\n covers.push({\n id: item.id,\n latitude: item.location.lat,\n longitude: item.location.lon,\n iconPath: '/static/images/location.png',\n width: 30,\n height: 30\n });\n });\n\n // 需要将查询结果地图上标识\n this.covers = covers;\n // 先将位置移动到第一个位置\n let latitude = this.searchResult.content[0].location.lat;\n let longitude = this.searchResult.content[0].location.lon;\n this.pickUpLocationMapCtx.moveToLocation({latitude, longitude}); // 移动到该位置\n this.scale = 12;\n }\n },\n // 加载更多数据\n loadMore() {\n if (!this.searchResult.last) {\n this.filter.page = this.filter.page + 1;\n this.getSearchLeader();\n }\n },\n // 标记点点击操作\n mapMarkertap({detail: {markerId}}) {\n this.markerId = markerId\n },\n // 选择提货点\n selectPickUpLocation(leaderId) {\n this.selectLeaderAddressVoAction({leaderId});\n },\n },\n onReady: function (e) {\n this.pickUpLocationMapCtx = uni.createMapContext('pickUpLocationMap');\n },\n mounted() {\n uni.getLocation({\n type: 'gcj02',\n success: async res => {\n this.covers[0]['latitude'] = res.latitude;\n this.covers[0]['longitude'] = res.longitude;\n\n // 通过网页接口从经纬度获取地址信息\n // 会报Unhandled promise rejection的错误可以利用trycatch在error阶段获取数据\n try {\n const result = await this.$u.api.getBaiduMapAddress({latitude: res.latitude, longitude: res.longitude});\n } catch (error) {\n this.searchKeyword = error.result.addressComponent.district + error.result.addressComponent.street;\n }\n\n this.pickUpLocationMapCtx.moveToLocation();\n }\n });\n }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n.gg {\n display: flex;\n flex-direction: column;\n\n /* 地图设置 */\n &-location-map {\n width: 100%;\n height: calc(100vh - 120rpx - 400rpx - 140rpx);\n }\n\n /* 滚动区域 */\n &-location {\n padding: 20rpx 20rpx 20rpx 20rpx;\n\n &-scroll {\n height: 400rpx;\n }\n }\n}\n</style>\n","import mod from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./choosePickUpLocation.vue?vue&type=style&index=0&id=e6e995ca&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./choosePickUpLocation.vue?vue&type=style&index=0&id=e6e995ca&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1704555671927\n var cssReload = require(\"/Applications/HBuilderX.app/Contents/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":""}