Преглед изворни кода

Merge branch 'master' of http://www.sysuimars.cn:3000/feiniao/feiniao-youwei-uniapp

wangsisi пре 1 дан
родитељ
комит
a120624493

+ 6 - 2
manifest.json

@@ -54,8 +54,12 @@
         "setting" : {
             "urlCheck" : false
         },
-        "usingComponents" : true,
-		"mergeVirtualHostAttributes" : true
+		  "permission": {
+		    "scope.userLocation": {
+		      "desc": "需要获取您的位置以显示地图"
+		    }
+		  },
+        "usingComponents" : true
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 3 - 1
package.json

@@ -1,6 +1,8 @@
 {
   "dependencies": {
     "clipboard": "^2.0.11",
-    "dayjs": "^1.11.13"
+    "dayjs": "^1.11.13",
+    "qqmap-wx-jssdk": "^1.0.0"
+    
   }
 }

+ 1 - 1
pages.json

@@ -14,7 +14,7 @@
 		},
 		{
 			"path": "pages/tabBar/mine/mine"
-		}
+		},
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 325 - 7
pages/tabBar/home/home.vue

@@ -1,38 +1,356 @@
 <template>
-	<view class="home-wrap basic-container">
-		<view class="home-search">
-			<view class="search-wrap">
-				<input />
+	<view class="home-wrap base-container">
+		<view class="home-top">
+			<view class="home-search">
+				<view class="search-wrap">
+					<input />
+				</view>
+				<view class="search-btn">
+					搜索
+				</view>
 			</view>
-			<view class="search-btn">
-				搜索
+			<view class="map-wrap">
+				 <map
+				      id="myMap"
+					  class="map-dom"
+				      :latitude="center.latitude"
+				      :longitude="center.longitude"
+				      :markers="clusters"
+				      :polyline="[]"
+				      :include-points="includePoints"
+				      @regionchange="onRegionChange"
+				      show-location
+				    ></map>
 			</view>
 		</view>
+		<view class="type-wrap">
+			<swiper class="swiper" circular :indicator-dots="true" :autoplay="false" :interval="5000"
+				:duration="duration">
+				<swiper-item>
+					<view class="swiper-item">
+						<view class="item-type">
+							<image class="type-img" src="https://birdseye-img.sysuimars.com/youwei-uniapp/home/type-icon.png" alt="" />
+							<view class="type-text">
+								全部
+							</view>
+						</view>
+						<view class="item-type">
+							<image class="type-img" src="https://birdseye-img.sysuimars.com/youwei-uniapp/home/type-icon-2.png" alt="" />
+							<view class="type-text">
+								龙眼
+							</view>
+						</view>
+						<view class="item-type">
+							<image class="type-img" src="https://birdseye-img.sysuimars.com/youwei-uniapp/home/type-icon-3.png" alt="" />
+							<view class="type-text">
+								葡萄
+							</view>
+						</view>
+						<view class="item-type">
+							<image class="type-img" src="https://birdseye-img.sysuimars.com/youwei-uniapp/home/type-icon.png" alt="" />
+							<view class="type-text">
+								水蜜桃
+							</view>
+						</view>
+						<view class="item-type">
+							<image class="type-img" src="https://birdseye-img.sysuimars.com/youwei-uniapp/home/type-icon-2.png" alt="" />
+							<view class="type-text">
+								龙眼
+							</view>
+						</view>
+						<view class="item-type">
+							<image class="type-img" src="https://birdseye-img.sysuimars.com/youwei-uniapp/home/type-icon-3.png" alt="" />
+							<view class="type-text">
+								葡萄
+							</view>
+						</view>
+					</view>
+				</swiper-item>
+				<swiper-item>
+					<view class="swiper-item">
+						<van-button type="primary">按钮</van-button>
+					</view>
+				</swiper-item>
+			</swiper>
+		</view>
 	</view>
 </template>
 
 <script setup>
+import { ref, onMounted } from 'vue'
+import QQMapWX from 'qqmap-wx-jssdk'
+
+
+// 广州中心坐标
+const GUANGZHOU_CENTER = {
+  latitude: 23.12911,
+  longitude: 113.26436
+}
+
+// 模拟广州的景点数据
+const GUANGZHOU_POIS = [
+  { id: 1, name: '广州塔', latitude: 23.10641, longitude: 113.32466 },
+  { id: 2, name: '白云山', latitude: 23.19746, longitude: 113.30249 },
+  { id: 3, name: '越秀公园', latitude: 23.13927, longitude: 113.26436 },
+  { id: 4, name: '沙面岛', latitude: 23.10788, longitude: 113.24365 },
+  { id: 5, name: '陈家祠', latitude: 23.12632, longitude: 113.24849 },
+  { id: 6, name: '北京路', latitude: 23.12389, longitude: 113.26799 },
+  { id: 7, name: '上下九', latitude: 23.11696, longitude: 113.24899 },
+  { id: 8, name: '荔枝博览园', latitude: 22.99405, longitude: 113.32486 },
+  { id: 9, name: '中山纪念堂', latitude: 23.13146, longitude: 113.26336 },
+  { id: 10, name: '海心沙', latitude: 23.11446, longitude: 113.32136 }
+]
+
+// 响应式数据
+const qqmapsdk = ref(null)
+const mapContext = ref(null)
+const center = ref(GUANGZHOU_CENTER)
+const allMarkers = ref([])
+const clusters = ref([])
+const includePoints = ref([])
+const currentZoom = ref(16)
+
+
+// 初始化地图
+const initMap = () => {
+  qqmapsdk.value = new QQMapWX({
+    key: 'Q5GBZ-2LP6I-LOKGM-UE3UC-TXH7Z-WCFG2' // key
+  })
+}
+
+// 加载点位数据
+const loadPoints = () => {
+  allMarkers.value = GUANGZHOU_POIS.map(item => ({
+    ...item,
+    iconPath: '../../../static/map/point.png',
+    width: 30,
+    height: 30,
+    callout: {
+      content: item.name,
+      color: '#ffffff',
+      bgColor: '#007AFF',
+      padding: 5,
+      borderRadius: 4,
+      display: 'ALWAYS'
+    }
+  }))
+  
+  updateClusters()
+}
+
+// 更新聚合点
+const updateClusters = () => {
+  if (currentZoom.value >= 15) {
+    // 放大时显示所有点
+    clusters.value = allMarkers.value
+  } else {
+    // 缩小时显示聚合点
+    const clusterRadius = 60 / currentZoom.value
+    const clustered = []
+    
+    allMarkers.value.forEach(marker => {
+      let isClustered = false
+      
+      clustered.forEach(cluster => {
+        const distance = getDistance(
+          cluster.latitude, cluster.longitude,
+          marker.latitude, marker.longitude
+        )
+        
+        if (distance < clusterRadius) {
+          isClustered = true
+          cluster.markers.push(marker)
+          cluster.callout.content = `${cluster.markers.length}个地点`
+        }
+      })
+      
+      if (!isClustered) {
+        clustered.push({
+          ...marker,
+          markers: [marker],
+          callout: {
+            ...marker.callout,
+            content: marker.name
+          }
+        })
+      }
+    })
+    
+    clusters.value = clustered.map(cluster => ({
+      id: cluster.id,
+      latitude: cluster.latitude,
+      longitude: cluster.longitude,
+      iconPath: cluster.markers.length > 1 ? '../../../static/map/point.png' : '../../../static/map/point.png',
+      width: cluster.markers.length > 1 ? 40 : 30,
+      height: cluster.markers.length > 1 ? 40 : 30,
+      callout: cluster.callout,
+      clusterData: cluster.markers
+    }))
+  }
+  
+  // 设置地图包含所有点
+  includePoints.value = allMarkers.value.map(m => ({
+    latitude: m.latitude,
+    longitude: m.longitude
+  }))
+}
+
+// 计算两点间距离
+// 更精确的距离计算函数(Haversine公式)
+const getDistance = (lat1, lng1, lat2, lng2) => {
+  // 将经纬度转换为弧度
+  const toRad = d => d * Math.PI / 180
+  const R = 6371 // 地球半径(km)
+  
+  const dLat = toRad(lat2 - lat1)
+  const dLng = toRad(lng2 - lng1)
+  const a = 
+    Math.sin(dLat / 2) * Math.sin(dLat / 2) +
+    Math.cos(toRad(lat1)) * Math.cos(toRad(lat2)) *
+    Math.sin(dLng / 2) * Math.sin(dLng / 2)
+  const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))
+  
+  return R * c * 1000 // 返回米
+}
+
+// 地图区域变化事件
+const onRegionChange = (e) => {
+  if (e.type === 'end') {
+    uni.createMapContext('myMap').getScale({
+      success: (res) => {
+        currentZoom.value = res.scale
+        updateClusters()
+      }
+    })
+  }
+}
+
+// 搜索地点
+const onSearch = (e) => {
+  qqmapsdk.value.search({
+    keyword: e.value,
+    location: center.value,
+    success: (res) => {
+      allMarkers.value = res.data.map(item => ({
+        id: item.id,
+        name: item.title,
+        latitude: item.location.lat,
+        longitude: item.location.lng,
+        iconPath: '../../../static/map/point.png',
+        callout: {
+          content: item.title,
+          color: '#ffffff',
+          bgColor: '#007AFF',
+          padding: 5,
+          borderRadius: 4,
+          display: 'ALWAYS'
+        }
+      }))
+      
+      updateClusters()
+    }
+  })
+}
+
+// 清除搜索
+const clearSearch = () => {
+  loadPoints()
+}
+
+// 生命周期钩子
+onMounted(() => {
+  // #ifdef MP-WEIXIN
+  mapContext.value = uni.createMapContext('myMap', this)
+  initMap()
+  loadPoints()
+  
+  // 获取地图区域
+  if (mapContext.value && mapContext.value.getRegion) {
+    mapContext.value.getRegion({
+      success: res => console.log('地图范围:', res),
+      fail: err => console.error('地图异常:', err) 
+    })
+  }
+  // #endif
+})
+
 </script>
 
 <style lang="scss" scoped>
 	.home-wrap {
 		background-color: #F2F3F5;
+		padding: 0;
+		.home-top {
+			padding: 20rpx 24rpx;
+			background: linear-gradient(#FFFFFF, rgba(242, 243, 245, 0));
+		}
 		.home-search {
 			display: flex;
 			align-items: center;
 			width: 100%;
-				border: 2rpx solid #FFD95E;
+			border: 2rpx solid #FFD95E;
+			border-radius: 40rpx;
+			margin-bottom: 40rpx;
 			.search-wrap {
 				flex: 1;
+				padding-left: 22rpx;
 			}
 			.search-btn {
 				text-align: center;
 				line-height: 52rpx;
 				border-radius: 40rpx;
 				font-size: 28rpx;
+				background-color: #FFD95E;
+				margin: 6rpx 8rpx;
 				width: 112rpx;
 				height: 52rpx;
 			}
 		}
+		.map-wrap {
+			height: 280rpx;
+			.map-dom {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.type-wrap {
+			margin: 20rpx;
+			padding: 20rpx 20rpx 10rpx 20rpx;
+			background-color: #fff;
+			border-radius: 16rpx;
+			height: 200rpx;
+			box-sizing: border-box;
+			.swiper-item {
+				display: flex;
+				align-items: center;
+				.item-type {
+					text-align: center;
+					font-size: 24rpx;
+					.type-img {
+						width: 92rpx;
+						height: 92rpx;
+					}
+				}
+				.item-type + .item-type {
+					padding-left: 22rpx;
+				}
+			}
+			::v-deep {
+				.uni-swiper-dot {
+					width: 12rpx;
+					height: 6rpx;
+					border-radius: 24rpx;
+					margin-right: 4rpx;
+					
+				}
+				.uni-swiper-dot.uni-swiper-dot-active {
+					background-color: #F3C11D;
+					width: 26rpx;
+				}
+			}
+			.swiper {
+				height: 170rpx;
+			}
+		}
 	}
 </style>

BIN
static/home/type-icon-2.png


BIN
static/home/type-icon-3.png


BIN
static/home/type-icon.png


BIN
static/map/point.png


+ 13 - 0
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,4 +1,5 @@
 {
+<<<<<<< HEAD
   "hash": "b02dae1c",
   "configHash": "c50a88df",
   "lockfileHash": "82d1aa46",
@@ -9,6 +10,18 @@
       "file": "dayjs_esm_index.js",
       "fileHash": "23656cf3",
       "needsInterop": false
+=======
+  "hash": "494abc23",
+  "configHash": "6ab10894",
+  "lockfileHash": "9dc990f5",
+  "browserHash": "e9632698",
+  "optimized": {
+    "qqmap-wx-jssdk": {
+      "src": "../../../../../node_modules/qqmap-wx-jssdk/qqmap-wx-jssdk.min.js",
+      "file": "qqmap-wx-jssdk.js",
+      "fileHash": "2c935c68",
+      "needsInterop": true
+>>>>>>> 0bc03f15a53f3809bcd64fd50b9fd23aba290eab
     }
   },
   "chunks": {}

+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map

@@ -1 +1 @@
-{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\n\texport default {\n\t\tonLaunch: function() {\n\t\t\tconsole.log('App Launch')\n\t\t},\n\t\tonShow: function() {\n\t\t\tconsole.log('App Show')\n\t\t},\n\t\tonHide: function() {\n\t\t\tconsole.log('App Hide')\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\">\n\t/*每个页面公共css */\n\t@import \"@/static/style/common.scss\"\n</style>\n","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n  ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n  const app = createSSRApp(App)\n  return {\n    app\n  }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;AACC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AACpBA,kBAAAA,MAAY,MAAA,OAAA,gBAAA,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,gBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACIM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}
+{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\r\n\texport default {\r\n\t\tonLaunch: function() {\r\n\t\t\tconsole.log('App Launch')\r\n\t\t},\r\n\t\tonShow: function() {\r\n\t\t\tconsole.log('App Show')\r\n\t\t},\r\n\t\tonHide: function() {\r\n\t\t\tconsole.log('App Hide')\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\t/*每个页面公共css */\r\n\t@import \"@/static/style/common.scss\";\r\n</style>\r\n","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n  ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n  const app = createSSRApp(App)\n  return {\n    app\n  }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;AACC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AACpBA,kBAAAA,MAAA,MAAA,OAAA,gBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,gBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACIM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}

+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/assets.js.map

@@ -1 +1 @@
-{"version":3,"file":"assets.js","sources":["static/aaa.png"],"sourcesContent":["export default \"__VITE_ASSET__78c47341__\""],"names":[],"mappings":";AAAA,MAAe,aAAA;;"}
+{"version":2,"file":"assets.js","sources":["static/logo.png"],"sourcesContent":["export default \"__VITE_ASSET__46719607__\""],"names":[],"mappings":";AAAA,MAAe,aAAA;;"}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/tabBar/discover/discover.js.map

@@ -1 +1 @@
-{"version":3,"file":"discover.js","sources":["pages/tabBar/discover/discover.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/wangsisi/Desktop/project/FN/App/feiniao-youwei-uniapp/pages/tabBar/discover/discover.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}
+{"version":3,"file":"discover.js","sources":["../../a-software/HBuilderX/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvdGFiQmFyL2Rpc2NvdmVyL2Rpc2NvdmVyLnZ1ZQ"],"sourcesContent":["import MiniProgramPage from 'D:/a-project/feiniao-youwei-uniapp/pages/tabBar/discover/discover.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/tabBar/home/home.js.map


+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/tabBar/mine/mine.js.map

@@ -1 +1 @@
-{"version":3,"file":"mine.js","sources":["pages/tabBar/mine/mine.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/wangsisi/Desktop/project/FN/App/feiniao-youwei-uniapp/pages/tabBar/mine/mine.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}
+{"version":3,"file":"mine.js","sources":["../../a-software/HBuilderX/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvdGFiQmFyL21pbmUvbWluZS52dWU"],"sourcesContent":["import MiniProgramPage from 'D:/a-project/feiniao-youwei-uniapp/pages/tabBar/mine/mine.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}

+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/tabBar/shopping/shopping.js.map

@@ -1 +1 @@
-{"version":3,"file":"shopping.js","sources":["pages/tabBar/shopping/shopping.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/wangsisi/Desktop/project/FN/App/feiniao-youwei-uniapp/pages/tabBar/shopping/shopping.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}
+{"version":3,"file":"shopping.js","sources":["../../a-software/HBuilderX/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvdGFiQmFyL3Nob3BwaW5nL3Nob3BwaW5nLnZ1ZQ"],"sourcesContent":["import MiniProgramPage from 'D:/a-project/feiniao-youwei-uniapp/pages/tabBar/shopping/shopping.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}

+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/tabBar/tree/tree.js.map

@@ -1 +1 @@
-{"version":3,"file":"tree.js","sources":["pages/tabBar/tree/tree.vue?type=page"],"sourcesContent":["import MiniProgramPage from '/Users/wangsisi/Desktop/project/FN/App/feiniao-youwei-uniapp/pages/tabBar/tree/tree.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}
+{"version":3,"file":"tree.js","sources":["../../a-software/HBuilderX/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvdGFiQmFyL3RyZWUvdHJlZS52dWU"],"sourcesContent":["import MiniProgramPage from 'D:/a-project/feiniao-youwei-uniapp/pages/tabBar/tree/tree.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;;;;;;AACA,GAAG,WAAW,eAAe;"}

+ 5 - 0
unpackage/dist/dev/mp-weixin/app.json

@@ -50,5 +50,10 @@
       }
     ]
   },
+  "permission": {
+    "scope.userLocation": {
+      "desc": "需要获取您的位置以显示地图"
+    }
+  },
   "usingComponents": {}
 }

+ 470 - 66
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -812,7 +812,7 @@ class MutableReactiveHandler extends BaseReactiveHandler {
       }
     }
     const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
-    const result = Reflect.set(target, key, value, receiver);
+    const result2 = Reflect.set(target, key, value, receiver);
     if (target === toRaw(receiver)) {
       if (!hadKey) {
         trigger(target, "add", key, value);
@@ -820,23 +820,23 @@ class MutableReactiveHandler extends BaseReactiveHandler {
         trigger(target, "set", key, value, oldValue);
       }
     }
-    return result;
+    return result2;
   }
   deleteProperty(target, key) {
     const hadKey = hasOwn(target, key);
     const oldValue = target[key];
-    const result = Reflect.deleteProperty(target, key);
-    if (result && hadKey) {
+    const result2 = Reflect.deleteProperty(target, key);
+    if (result2 && hadKey) {
       trigger(target, "delete", key, void 0, oldValue);
     }
-    return result;
+    return result2;
   }
   has(target, key) {
-    const result = Reflect.has(target, key);
+    const result2 = Reflect.has(target, key);
     if (!isSymbol(key) || !builtInSymbols.has(key)) {
       track(target, "has", key);
     }
-    return result;
+    return result2;
   }
   ownKeys(target) {
     track(
@@ -957,21 +957,21 @@ function deleteEntry(key) {
     checkIdentityKeys(target, has2, key);
   }
   const oldValue = get2 ? get2.call(target, key) : void 0;
-  const result = target.delete(key);
+  const result2 = target.delete(key);
   if (hadKey) {
     trigger(target, "delete", key, void 0, oldValue);
   }
-  return result;
+  return result2;
 }
 function clear() {
   const target = toRaw(this);
   const hadItems = target.size !== 0;
   const oldTarget = isMap(target) ? new Map(target) : new Set(target);
-  const result = target.clear();
+  const result2 = target.clear();
   if (hadItems) {
     trigger(target, "clear", void 0, void 0, oldTarget);
   }
-  return result;
+  return result2;
 }
 function createForEach(isReadonly2, isShallow2) {
   return function forEach(callback, thisArg) {
@@ -1252,6 +1252,9 @@ function isReadonly(value) {
 function isShallow(value) {
   return !!(value && value["__v_isShallow"]);
 }
+function isProxy(value) {
+  return isReactive(value) || isReadonly(value);
+}
 function toRaw(observed) {
   const raw = observed && observed["__v_raw"];
   return raw ? toRaw(raw) : observed;
@@ -2043,6 +2046,47 @@ function setCurrentRenderingInstance(instance) {
   instance && instance.type.__scopeId || null;
   return prev;
 }
+const COMPONENTS = "components";
+function resolveComponent(name, maybeSelfReference) {
+  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
+}
+function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
+  const instance = currentRenderingInstance || currentInstance;
+  if (instance) {
+    const Component2 = instance.type;
+    if (type === COMPONENTS) {
+      const selfName = getComponentName(
+        Component2,
+        false
+      );
+      if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
+        return Component2;
+      }
+    }
+    const res = (
+      // local registration
+      // check instance[type] first which is resolved for options API
+      resolve(instance[type] || Component2[type], name) || // global registration
+      resolve(instance.appContext[type], name)
+    );
+    if (!res && maybeSelfReference) {
+      return Component2;
+    }
+    if (warnMissing && !res) {
+      const extra = type === COMPONENTS ? `
+If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
+      warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
+    }
+    return res;
+  } else {
+    warn$1(
+      `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
+    );
+  }
+}
+function resolve(registry, name) {
+  return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
+}
 const INITIAL_WATCHER_VALUE = {};
 function watch(source, cb, options) {
   if (!isFunction(cb)) {
@@ -3657,6 +3701,12 @@ const Static = Symbol.for("v-stc");
 function isVNode(value) {
   return value ? value.__v_isVNode === true : false;
 }
+const InternalObjectKey = `__vInternal`;
+function guardReactiveProps(props) {
+  if (!props)
+    return null;
+  return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
+}
 const emptyAppContext = createAppContext();
 let uid = 0;
 function createComponentInstance(vnode, parent, suspense) {
@@ -4040,10 +4090,10 @@ function unwrapper(target) {
 const ARRAYTYPE = "[object Array]";
 const OBJECTTYPE = "[object Object]";
 function diff(current, pre) {
-  const result = {};
+  const result2 = {};
   syncKeys(current, pre);
-  _diff(current, pre, "", result);
-  return result;
+  _diff(current, pre, "", result2);
+  return result2;
 }
 function syncKeys(current, pre) {
   current = unwrapper(current);
@@ -4068,7 +4118,7 @@ function syncKeys(current, pre) {
     }
   }
 }
-function _diff(current, pre, path, result) {
+function _diff(current, pre, path, result2) {
   current = unwrapper(current);
   if (current === pre)
     return;
@@ -4076,7 +4126,7 @@ function _diff(current, pre, path, result) {
   const rootPreType = toTypeString(pre);
   if (rootCurrentType == OBJECTTYPE) {
     if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
-      setResult(result, path, current);
+      setResult(result2, path, current);
     } else {
       for (let key in current) {
         const currentValue = unwrapper(current[key]);
@@ -4086,7 +4136,7 @@ function _diff(current, pre, path, result) {
         if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
           if (currentValue != preValue) {
             setResult(
-              result,
+              result2,
               (path == "" ? "" : path + ".") + key,
               currentValue
             );
@@ -4094,14 +4144,14 @@ function _diff(current, pre, path, result) {
         } else if (currentType == ARRAYTYPE) {
           if (preType != ARRAYTYPE) {
             setResult(
-              result,
+              result2,
               (path == "" ? "" : path + ".") + key,
               currentValue
             );
           } else {
             if (currentValue.length < preValue.length) {
               setResult(
-                result,
+                result2,
                 (path == "" ? "" : path + ".") + key,
                 currentValue
               );
@@ -4111,7 +4161,7 @@ function _diff(current, pre, path, result) {
                   item,
                   preValue[index2],
                   (path == "" ? "" : path + ".") + key + "[" + index2 + "]",
-                  result
+                  result2
                 );
               });
             }
@@ -4119,7 +4169,7 @@ function _diff(current, pre, path, result) {
         } else if (currentType == OBJECTTYPE) {
           if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
             setResult(
-              result,
+              result2,
               (path == "" ? "" : path + ".") + key,
               currentValue
             );
@@ -4129,7 +4179,7 @@ function _diff(current, pre, path, result) {
                 currentValue[subKey],
                 preValue[subKey],
                 (path == "" ? "" : path + ".") + key + "." + subKey,
-                result
+                result2
               );
             }
           }
@@ -4138,22 +4188,22 @@ function _diff(current, pre, path, result) {
     }
   } else if (rootCurrentType == ARRAYTYPE) {
     if (rootPreType != ARRAYTYPE) {
-      setResult(result, path, current);
+      setResult(result2, path, current);
     } else {
       if (current.length < pre.length) {
-        setResult(result, path, current);
+        setResult(result2, path, current);
       } else {
         current.forEach((item, index2) => {
-          _diff(item, pre[index2], path + "[" + index2 + "]", result);
+          _diff(item, pre[index2], path + "[" + index2 + "]", result2);
         });
       }
     }
   } else {
-    setResult(result, path, current);
+    setResult(result2, path, current);
   }
 }
-function setResult(result, k, v) {
-  result[k] = v;
+function setResult(result2, k, v) {
+  result2[k] = v;
 }
 function hasComponentEffect(instance) {
   return queue$1.includes(instance.update);
@@ -4495,13 +4545,13 @@ function renderComponentRoot(instance) {
   instance.$ei = 0;
   pruneComponentPropsCache2(uid2);
   instance.__counter = instance.__counter === 0 ? 1 : 0;
-  let result;
+  let result2;
   const prev = setCurrentRenderingInstance(instance);
   try {
     if (vnode.shapeFlag & 4) {
       fallthroughAttrs(inheritAttrs, props, propsOptions, attrs);
       const proxyToUse = withProxy || proxy;
-      result = render.call(
+      result2 = render.call(
         proxyToUse,
         proxyToUse,
         renderCache,
@@ -4518,7 +4568,7 @@ function renderComponentRoot(instance) {
         Component2.props ? attrs : getFunctionalFallthrough(attrs)
       );
       const render2 = Component2;
-      result = render2.length > 1 ? render2(props, { attrs, slots, emit: emit2 }) : render2(
+      result2 = render2.length > 1 ? render2(props, { attrs, slots, emit: emit2 }) : render2(
         props,
         null
         /* we know it doesn't need it */
@@ -4526,11 +4576,11 @@ function renderComponentRoot(instance) {
     }
   } catch (err) {
     handleError(err, instance, 1);
-    result = false;
+    result2 = false;
   }
   setRef$1(instance);
   setCurrentRenderingInstance(prev);
-  return result;
+  return result2;
 }
 function fallthroughAttrs(inheritAttrs, props, propsOptions, fallthroughAttrs2) {
   if (props && fallthroughAttrs2 && inheritAttrs !== false) {
@@ -4825,15 +4875,15 @@ if (typeof atob !== "function") {
     }
     str += "==".slice(2 - (str.length & 3));
     var bitmap;
-    var result = "";
+    var result2 = "";
     var r1;
     var r2;
     var i = 0;
     for (; i < str.length; ) {
       bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
-      result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
+      result2 += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
     }
-    return result;
+    return result2;
   };
 } else {
   realAtob = atob;
@@ -4897,6 +4947,11 @@ function initApp(app) {
   }
 }
 const propsCaches = /* @__PURE__ */ Object.create(null);
+function renderProps(props) {
+  const { uid: uid2, __counter } = getCurrentInstance();
+  const propsId = (propsCaches[uid2] || (propsCaches[uid2] = [])).push(guardReactiveProps(props)) - 1;
+  return uid2 + "," + propsId + "," + __counter;
+}
 function pruneComponentPropsCache(uid2) {
   delete propsCaches[uid2];
 }
@@ -4937,6 +4992,102 @@ function getCreateApp() {
     return my[method];
   }
 }
+function vOn(value, key) {
+  const instance = getCurrentInstance();
+  const ctx = instance.ctx;
+  const extraKey = typeof key !== "undefined" && (ctx.$mpPlatform === "mp-weixin" || ctx.$mpPlatform === "mp-qq" || ctx.$mpPlatform === "mp-xhs") && (isString(key) || typeof key === "number") ? "_" + key : "";
+  const name = "e" + instance.$ei++ + extraKey;
+  const mpInstance = ctx.$scope;
+  if (!value) {
+    delete mpInstance[name];
+    return name;
+  }
+  const existingInvoker = mpInstance[name];
+  if (existingInvoker) {
+    existingInvoker.value = value;
+  } else {
+    mpInstance[name] = createInvoker(value, instance);
+  }
+  return name;
+}
+function createInvoker(initialValue, instance) {
+  const invoker = (e2) => {
+    patchMPEvent(e2);
+    let args = [e2];
+    if (instance && instance.ctx.$getTriggerEventDetail) {
+      if (typeof e2.detail === "number") {
+        e2.detail = instance.ctx.$getTriggerEventDetail(e2.detail);
+      }
+    }
+    if (e2.detail && e2.detail.__args__) {
+      args = e2.detail.__args__;
+    }
+    const eventValue = invoker.value;
+    const invoke = () => callWithAsyncErrorHandling(patchStopImmediatePropagation(e2, eventValue), instance, 5, args);
+    const eventTarget = e2.target;
+    const eventSync = eventTarget ? eventTarget.dataset ? String(eventTarget.dataset.eventsync) === "true" : false : false;
+    if (bubbles.includes(e2.type) && !eventSync) {
+      setTimeout(invoke);
+    } else {
+      const res = invoke();
+      if (e2.type === "input" && (isArray(res) || isPromise(res))) {
+        return;
+      }
+      return res;
+    }
+  };
+  invoker.value = initialValue;
+  return invoker;
+}
+const bubbles = [
+  // touch事件暂不做延迟,否则在 Android 上会影响性能,比如一些拖拽跟手手势等
+  // 'touchstart',
+  // 'touchmove',
+  // 'touchcancel',
+  // 'touchend',
+  "tap",
+  "longpress",
+  "longtap",
+  "transitionend",
+  "animationstart",
+  "animationiteration",
+  "animationend",
+  "touchforcechange"
+];
+function patchMPEvent(event, instance) {
+  if (event.type && event.target) {
+    event.preventDefault = NOOP;
+    event.stopPropagation = NOOP;
+    event.stopImmediatePropagation = NOOP;
+    if (!hasOwn(event, "detail")) {
+      event.detail = {};
+    }
+    if (hasOwn(event, "markerId")) {
+      event.detail = typeof event.detail === "object" ? event.detail : {};
+      event.detail.markerId = event.markerId;
+    }
+    if (isPlainObject(event.detail) && hasOwn(event.detail, "checked") && !hasOwn(event.detail, "value")) {
+      event.detail.value = event.detail.checked;
+    }
+    if (isPlainObject(event.detail)) {
+      event.target = extend({}, event.target, event.detail);
+    }
+  }
+}
+function patchStopImmediatePropagation(e2, value) {
+  if (isArray(value)) {
+    const originalStop = e2.stopImmediatePropagation;
+    e2.stopImmediatePropagation = () => {
+      originalStop && originalStop.call(e2);
+      e2._stopped = true;
+    };
+    return value.map((fn) => (e3) => !e3._stopped && fn(e3));
+  } else {
+    return value;
+  }
+}
+const o = (value, key) => vOn(value, key);
+const p = (props) => renderProps(props);
 function createApp$1(rootComponent, rootProps = null) {
   rootComponent && (rootComponent.mpType = "app");
   return createVueApp(rootComponent, rootProps).use(plugin);
@@ -5258,8 +5409,8 @@ function promisify$1(name, fn) {
     if (hasCallback(args)) {
       return wrapperReturnValue(name, invokeApi(name, fn, extend({}, args), rest));
     }
-    return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
-      invokeApi(name, fn, extend({}, args, { success: resolve, fail: reject }), rest);
+    return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
+      invokeApi(name, fn, extend({}, args, { success: resolve2, fail: reject }), rest);
     })));
   };
 }
@@ -5270,10 +5421,10 @@ function formatApiArgs(args, options) {
   }
 }
 function invokeSuccess(id, name, res) {
-  const result = {
+  const result2 = {
     errMsg: name + ":ok"
   };
-  return invokeCallback(id, extend(res || {}, result));
+  return invokeCallback(id, extend(res || {}, result2));
 }
 function invokeFail(id, name, errMsg, errRes = {}) {
   const errMsgPrefix = name + ":fail";
@@ -5379,19 +5530,19 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => {
     return 0;
   }
   let width = newDeviceWidth || deviceWidth;
-  let result = number / BASE_DEVICE_WIDTH * width;
-  if (result < 0) {
-    result = -result;
+  let result2 = number / BASE_DEVICE_WIDTH * width;
+  if (result2 < 0) {
+    result2 = -result2;
   }
-  result = Math.floor(result + EPS);
-  if (result === 0) {
+  result2 = Math.floor(result2 + EPS);
+  if (result2 === 0) {
     if (deviceDPR === 1 || !isIOS) {
-      result = 1;
+      result2 = 1;
     } else {
-      result = 0.5;
+      result2 = 0.5;
     }
   }
-  return number < 0 ? -result : result;
+  return number < 0 ? -result2 : result2;
 }, Upx2pxProtocol);
 function __f__(type, filename, ...args) {
   if (filename) {
@@ -5580,7 +5731,7 @@ function invokeGetPushCidCallbacks(cid2, errMsg) {
   getPushCidCallbacks.length = 0;
 }
 const API_GET_PUSH_CLIENT_ID = "getPushClientId";
-const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, reject }) => {
+const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve: resolve2, reject }) => {
   Promise.resolve().then(() => {
     if (typeof enabled === "undefined") {
       enabled = false;
@@ -5589,7 +5740,7 @@ const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, re
     }
     getPushCidCallbacks.push((cid2, errMsg) => {
       if (cid2) {
-        resolve({ cid: cid2 });
+        resolve2({ cid: cid2 });
       } else {
         reject(errMsg);
       }
@@ -5658,9 +5809,9 @@ function promisify(name, api) {
     if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
       return wrapperReturnValue(name, invokeApi(name, api, extend({}, options), rest));
     }
-    return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
+    return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
       invokeApi(name, api, extend({}, options, {
-        success: resolve,
+        success: resolve2,
         fail: reject
       }), rest);
     })));
@@ -6267,13 +6418,13 @@ function initRuntimeSocket(hosts, port, id) {
 }
 const SOCKET_TIMEOUT = 500;
 function tryConnectSocket(host2, port, id) {
-  return new Promise((resolve, reject) => {
+  return new Promise((resolve2, reject) => {
     const socket = index.connectSocket({
       url: `ws://${host2}:${port}/${id}`,
       multiple: true,
       // 支付宝小程序 是否开启多实例
       fail() {
-        resolve(null);
+        resolve2(null);
       }
     });
     const timer = setTimeout(() => {
@@ -6281,19 +6432,19 @@ function tryConnectSocket(host2, port, id) {
         code: 1006,
         reason: "connect timeout"
       });
-      resolve(null);
+      resolve2(null);
     }, SOCKET_TIMEOUT);
     socket.onOpen((e) => {
       clearTimeout(timer);
-      resolve(socket);
+      resolve2(socket);
     });
     socket.onClose((e) => {
       clearTimeout(timer);
-      resolve(null);
+      resolve2(null);
     });
     socket.onError((e) => {
       clearTimeout(timer);
-      resolve(null);
+      resolve2(null);
     });
   });
 }
@@ -6641,14 +6792,14 @@ function formatCSSStyleDeclaration(style, depth) {
   };
 }
 function formatObjectProperty(name, value, depth) {
-  const result = formatArg(value, depth);
-  result.name = name;
-  return result;
+  const result2 = formatArg(value, depth);
+  result2.name = name;
+  return result2;
 }
 function formatArrayElement(value, index2, depth) {
-  const result = formatArg(value, depth);
-  result.name = `${index2}`;
-  return result;
+  const result2 = formatArg(value, depth);
+  result2.name = `${index2}`;
+  return result2;
 }
 function formatSetEntry(value, depth) {
   return {
@@ -6756,9 +6907,9 @@ function isConsoleWritable() {
   return isWritable;
 }
 function initRuntimeSocketService() {
-  const hosts = "127.0.0.1,192.168.1.17";
+  const hosts = "192.168.1.10,127.0.0.1";
   const port = "8090";
-  const id = "mp-weixin_ykR89R";
+  const id = "mp-weixin_H_8Yl-";
   const lazy = typeof swan !== "undefined";
   let restoreError = lazy ? () => {
   } : initOnError();
@@ -7704,7 +7855,260 @@ const createSubpackageApp = initCreateSubpackageApp();
   wx.createPluginApp = global.createPluginApp = createPluginApp;
   wx.createSubpackageApp = global.createSubpackageApp = createSubpackageApp;
 }
+function getDefaultExportFromCjs(x) {
+  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
+}
+var _createClass = /* @__PURE__ */ function() {
+  function a(e, c) {
+    for (var b = 0; b < c.length; b++) {
+      var d = c[b];
+      d.enumerable = d.enumerable || false;
+      d.configurable = true;
+      if ("value" in d) {
+        d.writable = true;
+      }
+      Object.defineProperty(e, d.key, d);
+    }
+  }
+  return function(d, b, c) {
+    if (b) {
+      a(d.prototype, b);
+    }
+    if (c) {
+      a(d, c);
+    }
+    return d;
+  };
+}();
+function _classCallCheck(a, b) {
+  if (!(a instanceof b)) {
+    throw new TypeError("Cannot call a class as a function");
+  }
+}
+var ERROR_CONF = { KEY_ERR: 311, KEY_ERR_MSG: "key格式错误", PARAM_ERR: 310, PARAM_ERR_MSG: "请求参数信息有误", SYSTEM_ERR: 600, SYSTEM_ERR_MSG: "系统错误", WX_ERR_CODE: 1e3, WX_OK_CODE: 200 };
+var BASE_URL = "https://apis.map.qq.com/ws/";
+var URL_SEARCH = BASE_URL + "place/v1/search";
+var URL_SUGGESTION = BASE_URL + "place/v1/suggestion";
+var URL_GET_GEOCODER = BASE_URL + "geocoder/v1/";
+var URL_CITY_LIST = BASE_URL + "district/v1/list";
+var URL_AREA_LIST = BASE_URL + "district/v1/getchildren";
+var URL_DISTANCE = BASE_URL + "distance/v1/";
+var Utils = { location2query: function location2query(c) {
+  if (typeof c == "string") {
+    return c;
+  }
+  var b = "";
+  for (var a = 0; a < c.length; a++) {
+    var e = c[a];
+    if (!!b) {
+      b += ";";
+    }
+    if (e.location) {
+      b = b + e.location.lat + "," + e.location.lng;
+    }
+    if (e.latitude && e.longitude) {
+      b = b + e.latitude + "," + e.longitude;
+    }
+  }
+  return b;
+}, getWXLocation: function getWXLocation(c, b, a) {
+  wx$1.getLocation({ type: "gcj02", success: c, fail: b, complete: a });
+}, getLocationParam: function getLocationParam(b) {
+  if (typeof b == "string") {
+    var a = b.split(",");
+    if (a.length === 2) {
+      b = { latitude: b.split(",")[0], longitude: b.split(",")[1] };
+    } else {
+      b = {};
+    }
+  }
+  return b;
+}, polyfillParam: function polyfillParam(a) {
+  a.success = a.success || function() {
+  };
+  a.fail = a.fail || function() {
+  };
+  a.complete = a.complete || function() {
+  };
+}, checkParamKeyEmpty: function checkParamKeyEmpty(c, b) {
+  if (!c[b]) {
+    var a = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + b + "参数格式有误");
+    c.fail(a);
+    c.complete(a);
+    return true;
+  }
+  return false;
+}, checkKeyword: function checkKeyword(a) {
+  return !this.checkParamKeyEmpty(a, "keyword");
+}, checkLocation: function checkLocation(c) {
+  var a = this.getLocationParam(c.location);
+  if (!a || !a.latitude || !a.longitude) {
+    var b = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + " location参数格式有误");
+    c.fail(b);
+    c.complete(b);
+    return false;
+  }
+  return true;
+}, buildErrorConfig: function buildErrorConfig(a, b) {
+  return { status: a, message: b };
+}, buildWxRequestConfig: function buildWxRequestConfig(c, a) {
+  var b = this;
+  a.header = { "content-type": "application/json" };
+  a.method = "GET";
+  a.success = function(d) {
+    var e = d.data;
+    if (e.status === 0) {
+      c.success(e);
+    } else {
+      c.fail(e);
+    }
+  };
+  a.fail = function(d) {
+    d.statusCode = ERROR_CONF.WX_ERR_CODE;
+    c.fail(b.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, result.errMsg));
+  };
+  a.complete = function(d) {
+    var e = +d.statusCode;
+    switch (e) {
+      case ERROR_CONF.WX_ERR_CODE:
+        c.complete(b.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, d.errMsg));
+        break;
+      case ERROR_CONF.WX_OK_CODE:
+        var f = d.data;
+        if (f.status === 0) {
+          c.complete(f);
+        } else {
+          c.complete(b.buildErrorConfig(f.status, f.message));
+        }
+        break;
+      default:
+        c.complete(b.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG));
+    }
+  };
+  return a;
+}, locationProcess: function locationProcess(f, e, c, a) {
+  var d = this;
+  c = c || function(g) {
+    g.statusCode = ERROR_CONF.WX_ERR_CODE;
+    f.fail(d.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, g.errMsg));
+  };
+  a = a || function(g) {
+    if (g.statusCode == ERROR_CONF.WX_ERR_CODE) {
+      f.complete(d.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, g.errMsg));
+    }
+  };
+  if (!f.location) {
+    d.getWXLocation(e, c, a);
+  } else {
+    if (d.checkLocation(f)) {
+      var b = Utils.getLocationParam(f.location);
+      e(b);
+    }
+  }
+} };
+var QQMapWX = function() {
+  function b(i) {
+    _classCallCheck(this, b);
+    if (!i.key) {
+      throw Error("key值不能为空");
+    }
+    this.key = i.key;
+  }
+  _createClass(b, [{ key: "search", value: function f(i) {
+    var l = this;
+    i = i || {};
+    Utils.polyfillParam(i);
+    if (!Utils.checkKeyword(i)) {
+      return;
+    }
+    var k = { keyword: i.keyword, orderby: i.orderby || "_distance", page_size: i.page_size || 10, page_index: i.page_index || 1, output: "json", key: l.key };
+    if (i.address_format) {
+      k.address_format = i.address_format;
+    }
+    if (i.filter) {
+      k.filter = i.filter;
+    }
+    var n = i.distance || "1000";
+    var j = i.auto_extend || 1;
+    var m = function m2(o2) {
+      k.boundary = "nearby(" + o2.latitude + "," + o2.longitude + "," + n + "," + j + ")";
+      wx$1.request(Utils.buildWxRequestConfig(i, { url: URL_SEARCH, data: k }));
+    };
+    Utils.locationProcess(i, m);
+  } }, { key: "getSuggestion", value: function h(i) {
+    var k = this;
+    i = i || {};
+    Utils.polyfillParam(i);
+    if (!Utils.checkKeyword(i)) {
+      return;
+    }
+    var j = { keyword: i.keyword, region: i.region || "全国", region_fix: i.region_fix || 0, policy: i.policy || 0, output: "json", key: k.key };
+    wx$1.request(Utils.buildWxRequestConfig(i, { url: URL_SUGGESTION, data: j }));
+  } }, { key: "reverseGeocoder", value: function a(i) {
+    var k = this;
+    i = i || {};
+    Utils.polyfillParam(i);
+    var j = { coord_type: i.coord_type || 5, get_poi: i.get_poi || 0, output: "json", key: k.key };
+    if (i.poi_options) {
+      j.poi_options = i.poi_options;
+    }
+    var l = function l2(m) {
+      j.location = m.latitude + "," + m.longitude;
+      wx$1.request(Utils.buildWxRequestConfig(i, { url: URL_GET_GEOCODER, data: j }));
+    };
+    Utils.locationProcess(i, l);
+  } }, { key: "geocoder", value: function g(i) {
+    var k = this;
+    i = i || {};
+    Utils.polyfillParam(i);
+    if (Utils.checkParamKeyEmpty(i, "address")) {
+      return;
+    }
+    var j = { address: i.address, output: "json", key: k.key };
+    wx$1.request(Utils.buildWxRequestConfig(i, { url: URL_GET_GEOCODER, data: j }));
+  } }, { key: "getCityList", value: function c(i) {
+    var k = this;
+    i = i || {};
+    Utils.polyfillParam(i);
+    var j = { output: "json", key: k.key };
+    wx$1.request(Utils.buildWxRequestConfig(i, { url: URL_CITY_LIST, data: j }));
+  } }, { key: "getDistrictByCityId", value: function d(i) {
+    var k = this;
+    i = i || {};
+    Utils.polyfillParam(i);
+    if (Utils.checkParamKeyEmpty(i, "id")) {
+      return;
+    }
+    var j = { id: i.id || "", output: "json", key: k.key };
+    wx$1.request(Utils.buildWxRequestConfig(i, { url: URL_AREA_LIST, data: j }));
+  } }, { key: "calculateDistance", value: function e(i) {
+    var k = this;
+    i = i || {};
+    Utils.polyfillParam(i);
+    if (Utils.checkParamKeyEmpty(i, "to")) {
+      return;
+    }
+    var j = { mode: i.mode || "walking", to: Utils.location2query(i.to), output: "json", key: k.key };
+    var l = function l2(m) {
+      j.from = m.latitude + "," + m.longitude;
+      wx$1.request(Utils.buildWxRequestConfig(i, { url: URL_DISTANCE, data: j }));
+    };
+    if (i.from) {
+      i.location = i.from;
+    }
+    Utils.locationProcess(i, l);
+  } }]);
+  return b;
+}();
+var qqmapWxJssdk_min = QQMapWX;
+const QQMapWX$1 = /* @__PURE__ */ getDefaultExportFromCjs(qqmapWxJssdk_min);
+exports.QQMapWX = QQMapWX$1;
 exports._export_sfc = _export_sfc;
 exports.createSSRApp = createSSRApp;
 exports.index = index;
+exports.o = o;
+exports.onMounted = onMounted;
+exports.p = p;
+exports.ref = ref;
+exports.resolveComponent = resolveComponent;
 //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map

+ 147 - 4
unpackage/dist/dev/mp-weixin/pages/tabBar/home/home.js

@@ -1,9 +1,152 @@
 "use strict";
 const common_vendor = require("../../../common/vendor.js");
-const _sfc_main = {};
-function _sfc_render(_ctx, _cache) {
-  return {};
+if (!Array) {
+  const _component_van_button = common_vendor.resolveComponent("van-button");
+  _component_van_button();
 }
-const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-15dac74a"]]);
+const _sfc_main = {
+  __name: "home",
+  setup(__props) {
+    const GUANGZHOU_CENTER = {
+      latitude: 23.12911,
+      longitude: 113.26436
+    };
+    const GUANGZHOU_POIS = [
+      { id: 1, name: "广州塔", latitude: 23.10641, longitude: 113.32466 },
+      { id: 2, name: "白云山", latitude: 23.19746, longitude: 113.30249 },
+      { id: 3, name: "越秀公园", latitude: 23.13927, longitude: 113.26436 },
+      { id: 4, name: "沙面岛", latitude: 23.10788, longitude: 113.24365 },
+      { id: 5, name: "陈家祠", latitude: 23.12632, longitude: 113.24849 },
+      { id: 6, name: "北京路", latitude: 23.12389, longitude: 113.26799 },
+      { id: 7, name: "上下九", latitude: 23.11696, longitude: 113.24899 },
+      { id: 8, name: "荔枝博览园", latitude: 22.99405, longitude: 113.32486 },
+      { id: 9, name: "中山纪念堂", latitude: 23.13146, longitude: 113.26336 },
+      { id: 10, name: "海心沙", latitude: 23.11446, longitude: 113.32136 }
+    ];
+    const qqmapsdk = common_vendor.ref(null);
+    const mapContext = common_vendor.ref(null);
+    const center = common_vendor.ref(GUANGZHOU_CENTER);
+    const allMarkers = common_vendor.ref([]);
+    const clusters = common_vendor.ref([]);
+    const includePoints = common_vendor.ref([]);
+    const currentZoom = common_vendor.ref(16);
+    const initMap = () => {
+      qqmapsdk.value = new common_vendor.QQMapWX({
+        key: "Q5GBZ-2LP6I-LOKGM-UE3UC-TXH7Z-WCFG2"
+        // key
+      });
+    };
+    const loadPoints = () => {
+      allMarkers.value = GUANGZHOU_POIS.map((item) => ({
+        ...item,
+        iconPath: "../../../static/map/point.png",
+        width: 30,
+        height: 30,
+        callout: {
+          content: item.name,
+          color: "#ffffff",
+          bgColor: "#007AFF",
+          padding: 5,
+          borderRadius: 4,
+          display: "ALWAYS"
+        }
+      }));
+      updateClusters();
+    };
+    const updateClusters = () => {
+      if (currentZoom.value >= 15) {
+        clusters.value = allMarkers.value;
+      } else {
+        const clusterRadius = 60 / currentZoom.value;
+        const clustered = [];
+        allMarkers.value.forEach((marker) => {
+          let isClustered = false;
+          clustered.forEach((cluster) => {
+            const distance = getDistance(
+              cluster.latitude,
+              cluster.longitude,
+              marker.latitude,
+              marker.longitude
+            );
+            if (distance < clusterRadius) {
+              isClustered = true;
+              cluster.markers.push(marker);
+              cluster.callout.content = `${cluster.markers.length}个地点`;
+            }
+          });
+          if (!isClustered) {
+            clustered.push({
+              ...marker,
+              markers: [marker],
+              callout: {
+                ...marker.callout,
+                content: marker.name
+              }
+            });
+          }
+        });
+        clusters.value = clustered.map((cluster) => ({
+          id: cluster.id,
+          latitude: cluster.latitude,
+          longitude: cluster.longitude,
+          iconPath: cluster.markers.length > 1 ? "../../../static/map/point.png" : "../../../static/map/point.png",
+          width: cluster.markers.length > 1 ? 40 : 30,
+          height: cluster.markers.length > 1 ? 40 : 30,
+          callout: cluster.callout,
+          clusterData: cluster.markers
+        }));
+      }
+      includePoints.value = allMarkers.value.map((m) => ({
+        latitude: m.latitude,
+        longitude: m.longitude
+      }));
+    };
+    const getDistance = (lat1, lng1, lat2, lng2) => {
+      const toRad = (d) => d * Math.PI / 180;
+      const R = 6371;
+      const dLat = toRad(lat2 - lat1);
+      const dLng = toRad(lng2 - lng1);
+      const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(toRad(lat1)) * Math.cos(toRad(lat2)) * Math.sin(dLng / 2) * Math.sin(dLng / 2);
+      const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
+      return R * c * 1e3;
+    };
+    const onRegionChange = (e) => {
+      if (e.type === "end") {
+        common_vendor.index.createMapContext("myMap").getScale({
+          success: (res) => {
+            currentZoom.value = res.scale;
+            updateClusters();
+          }
+        });
+      }
+    };
+    common_vendor.onMounted(() => {
+      mapContext.value = common_vendor.index.createMapContext("myMap", this);
+      initMap();
+      loadPoints();
+      if (mapContext.value && mapContext.value.getRegion) {
+        mapContext.value.getRegion({
+          success: (res) => common_vendor.index.__f__("log", "at pages/tabBar/home/home.vue:270", "地图范围:", res),
+          fail: (err) => common_vendor.index.__f__("error", "at pages/tabBar/home/home.vue:271", "地图异常:", err)
+        });
+      }
+    });
+    return (_ctx, _cache) => {
+      return {
+        a: center.value.latitude,
+        b: center.value.longitude,
+        c: clusters.value,
+        d: [],
+        e: includePoints.value,
+        f: common_vendor.o(onRegionChange),
+        g: common_vendor.p({
+          type: "primary"
+        }),
+        h: _ctx.duration
+      };
+    };
+  }
+};
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-15dac74a"]]);
 wx.createPage(MiniProgramPage);
 //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/tabBar/home/home.js.map

Разлика између датотеке није приказан због своје велике величине
+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/tabBar/home/home.wxml


+ 53 - 0
unpackage/dist/dev/mp-weixin/pages/tabBar/home/home.wxss

@@ -25,21 +25,74 @@
 /* 文章场景相关 */
 .home-wrap.data-v-15dac74a {
   background-color: #F2F3F5;
+  padding: 0;
+}
+.home-wrap .home-top.data-v-15dac74a {
+  padding: 20rpx 24rpx;
+  background: linear-gradient(#FFFFFF, rgba(242, 243, 245, 0));
 }
 .home-wrap .home-search.data-v-15dac74a {
   display: flex;
   align-items: center;
   width: 100%;
   border: 2rpx solid #FFD95E;
+  border-radius: 40rpx;
+  margin-bottom: 40rpx;
 }
 .home-wrap .home-search .search-wrap.data-v-15dac74a {
   flex: 1;
+  padding-left: 22rpx;
 }
 .home-wrap .home-search .search-btn.data-v-15dac74a {
   text-align: center;
   line-height: 52rpx;
   border-radius: 40rpx;
   font-size: 28rpx;
+  background-color: #FFD95E;
+  margin: 6rpx 8rpx;
   width: 112rpx;
   height: 52rpx;
+}
+.home-wrap .map-wrap.data-v-15dac74a {
+  height: 280rpx;
+}
+.home-wrap .map-wrap .map-dom.data-v-15dac74a {
+  width: 100%;
+  height: 100%;
+}
+.home-wrap .type-wrap.data-v-15dac74a {
+  margin: 20rpx;
+  padding: 20rpx 20rpx 10rpx 20rpx;
+  background-color: #fff;
+  border-radius: 16rpx;
+  height: 200rpx;
+  box-sizing: border-box;
+}
+.home-wrap .type-wrap .swiper-item.data-v-15dac74a {
+  display: flex;
+  align-items: center;
+}
+.home-wrap .type-wrap .swiper-item .item-type.data-v-15dac74a {
+  text-align: center;
+  font-size: 24rpx;
+}
+.home-wrap .type-wrap .swiper-item .item-type .type-img.data-v-15dac74a {
+  width: 92rpx;
+  height: 92rpx;
+}
+.home-wrap .type-wrap .swiper-item .item-type + .item-type.data-v-15dac74a {
+  padding-left: 22rpx;
+}
+.home-wrap .type-wrap.data-v-15dac74a .uni-swiper-dot {
+  width: 12rpx;
+  height: 6rpx;
+  border-radius: 24rpx;
+  margin-right: 4rpx;
+}
+.home-wrap .type-wrap.data-v-15dac74a .uni-swiper-dot.uni-swiper-dot-active {
+  background-color: #F3C11D;
+  width: 26rpx;
+}
+.home-wrap .type-wrap .swiper.data-v-15dac74a {
+  height: 170rpx;
 }

Неке датотеке нису приказане због велике количине промена