acdr-ui/dist/dev/mp-weixin/pages/index/components/recommendedServices.js.map

1 line
2.7 KiB
Plaintext

{"version":3,"file":"recommendedServices.js","sources":["../../../../../../src/pages/index/components/recommendedServices.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9wYWdlcy9pbmRleC9jb21wb25lbnRzL3JlY29tbWVuZGVkU2VydmljZXMudnVl"],"sourcesContent":["<template>\n <view class=\"recommended-services\" v-if=\"services.length > 0\">\n <view class=\"masonry\">\n <view v-for=\"(item, index) in services\" @click=\"toDetail(item)\" :key=\"index\">\n <RecommendedServiceCard\n :image=\"imgUrl(item.url)\"\n :title=\"item.serviceName\"\n :description=\"item.description\"\n :price=\"item.price\"\n />\n </view>\n </view>\n </view>\n <LocalLoader v-model=\"loading\" />\n <EmptyState v-if=\"services.length == 0 && !loading\" />\n</template>\n\n<script lang=\"js\" setup>\nimport { ref } from 'vue'\nimport RecommendedServiceCard from '@/components/RecommendedServiceCard.vue'\nimport { imgUrl } from '@/utils/commUtils'\nimport { getNearbyServices } from '@/service/personalService'\nimport { getLocation } from '@/service/mapService'\nimport EmptyState from '@/components/EmptyState.vue'\nimport LocalLoader from '@/components/LocalLoader.vue'\n\nconst toDetail = (item) => {\n uni.navigateTo({\n url: '/pages/service/detail?id=' + item.id,\n })\n}\nconst loading = ref(false)\n\nconst services = ref([])\n\nconst getQuickServices = async () => {\n // 获取当前用户的经纬度\n const location = await getLocation()\n // 获取推送的快捷服务\n const nearbys = await getNearbyServices(location.latitude, location.longitude)\n services.value = nearbys\n}\n\nonLoad(async () => {\n loading.value = true\n await getQuickServices()\n loading.value = false\n})\n</script>\n\n<style scoped>\n.recommended-services {\n width: 100%;\n padding: 10px;\n}\n\n.masonry {\n gap: 10px;\n column-gap: 15px;\n width: 100%;\n column-count: 2;\n}\n</style>\n","import Component from 'D:/App/Work/addr/acdr-ui/src/pages/index/components/recommendedServices.vue'\nwx.createComponent(Component)"],"names":["uni","ref","getLocation","getNearbyServices","onLoad"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,yBAAyB,MAAW;AAI1C,MAAM,aAAa,MAAW;AAC9B,MAAM,cAAc,MAAW;;;;AAE/B,UAAM,WAAW,CAAC,SAAS;AACzBA,oBAAAA,MAAI,WAAW;AAAA,QACb,KAAK,8BAA8B,KAAK;AAAA,MAC5C,CAAG;AAAA,IACH;AACA,UAAM,UAAUC,cAAG,IAAC,KAAK;AAEzB,UAAM,WAAWA,cAAG,IAAC,EAAE;AAEvB,UAAM,mBAAmB,MAAY;AAEnC,YAAM,WAAW,MAAMC,+BAAa;AAEpC,YAAM,UAAU,MAAMC,wBAAiB,kBAAC,SAAS,UAAU,SAAS,SAAS;AAC7E,eAAS,QAAQ;AAAA,IACnB;AAEAC,kBAAAA,OAAO,MAAY;AACjB,cAAQ,QAAQ;AAChB,YAAM,iBAAkB;AACxB,cAAQ,QAAQ;AAAA,IAClB,EAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9CD,GAAG,gBAAgB,SAAS;"}