Pārlūkot izejas kodu

地图组件调试

yfso 2 gadi atpakaļ
vecāks
revīzija
07df3f4118
3 mainītis faili ar 11 papildinājumiem un 8 dzēšanām
  1. 7 2
      components/hch-position/hch-position.vue
  2. 3 5
      pages/map/map.vue
  3. 1 1
      setting.js

+ 7 - 2
components/hch-position/hch-position.vue

@@ -9,7 +9,7 @@
 					:layerStyle="mapStyle"  
 					:layerStyle="mapStyle"  
 					@markertap='markertap'
 					@markertap='markertap'
 					@anchorpointtap='anchorpointtap'
 					@anchorpointtap='anchorpointtap'
-					@updated="$emit('rendered')"
+					@updated="rendered"
 				>
 				>
 				</map>
 				</map>
 			</view>
 			</view>
@@ -183,7 +183,7 @@
 			},
 			},
 			canvasFail(){
 			canvasFail(){
 				if(this.isActiveMarkerIndex == -1)return;
 				if(this.isActiveMarkerIndex == -1)return;
-				this.markersIn[this.isActiveMarkerIndex].width = '82rpx';
+				this.markersIn[this.isActiveMarkerIndex].width = '80rpx';
 				this.markersIn[this.isActiveMarkerIndex].height = '90rpx';
 				this.markersIn[this.isActiveMarkerIndex].height = '90rpx';
 				this.markersIn[this.isActiveMarkerIndex].iconPath = "";
 				this.markersIn[this.isActiveMarkerIndex].iconPath = "";
 				this.markersIn = Object.assign(this.markersIn);
 				this.markersIn = Object.assign(this.markersIn);
@@ -218,6 +218,11 @@
 						return item.marker;
 						return item.marker;
 					}))
 					}))
 				}
 				}
+			},
+			rendered(){
+				if(this.markersIn.length > 0){
+					this.$emit('rendered');
+				}
 			}
 			}
 		},
 		},
 		watch:{
 		watch:{

+ 3 - 5
pages/map/map.vue

@@ -435,7 +435,7 @@
 					})
 					})
 					this.$refs.map.updateContent(this.hotelList, true);
 					this.$refs.map.updateContent(this.hotelList, true);
 					if(res.data.data.length >= 15){
 					if(res.data.data.length >= 15){
-						this.requestHotelPage(tempobj)
+						// this.requestHotelPage(tempobj)
 					}else if(this.beginConfig.hotel_id&&this.beginConfig.isBegin){
 					}else if(this.beginConfig.hotel_id&&this.beginConfig.isBegin){
 						let targetIndex = 0;
 						let targetIndex = 0;
 						
 						
@@ -454,10 +454,8 @@
 			mapRendered(){
 			mapRendered(){
 				if((this.beginConfig.isBegin && !this.beginConfig.hotel_id)||this.search.isSearch){
 				if((this.beginConfig.isBegin && !this.beginConfig.hotel_id)||this.search.isSearch){
 					this.beginConfig.isBegin = false
 					this.beginConfig.isBegin = false
-					setTimeout(()=>{
-						this.$refs.map.markertap(0,true,this.search.isSearch)
-						this.search.isSearch = false
-					},500)
+					this.$refs.map.markertap(0,true,this.search.isSearch)
+					this.search.isSearch = false
 				}
 				}
 			},
 			},
 			//去预定页面
 			//去预定页面

+ 1 - 1
setting.js

@@ -1,7 +1,7 @@
 /**
 /**
  * Created by JianJia.Zhou<jianjia.zhou> on 2022/3/18.
  * Created by JianJia.Zhou<jianjia.zhou> on 2022/3/18.
  */
  */
-const IS_DEV = process.env.NODE_ENV === 'development1'
+const IS_DEV = process.env.NODE_ENV === 'development'
 
 
 // const URL = 'https://t9.9026.com'
 // const URL = 'https://t9.9026.com'
 const URL = 'https://ihg.9026.com'
 const URL = 'https://ihg.9026.com'